aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2026-09-29 15:20:55 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2026-09-29 15:20:55 +0100
commit2e2082ea6d3b86d6f01dbd2aaaa3dd7900591611 (patch)
treeb04201e2ea00e58c92530851286693a8a35afa08
parent9980f4eca62d056136cbcc3e0ba520f7149ad0c4 (diff)
downloadHomelabPowerLogger-master.tar.gz
HomelabPowerLogger-master.zip
Added reading zigbee plugs from a config file instead of having it staticHEADmaster
-rw-r--r--config.env.example4
-rw-r--r--mqtt-client/mqtt-client.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/config.env.example b/config.env.example
index 4878ec2..782f945 100644
--- a/config.env.example
+++ b/config.env.example
@@ -3,10 +3,12 @@ MQTT_PASSWD=*******************
OMADA_SWITCHES=192.168.69.26
+ZIGBEE_PLUGS=MikroTikZigbeePlug,DehumidifierZigbeePlug
+
DOCKER_INFLUXDB_INIT_MODE=setup
DOCKER_INFLUXDB_INIT_USERNAME=eden
DOCKER_INFLUXDB_INIT_PASSWORD=********************
DOCKER_INFLUXDB_INIT_ORG=poweredagay
DOCKER_INFLUXDB_INIT_BUCKET=edenbucket
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=****************
-DOCKER_INFLUXDB_DB=power \ No newline at end of file
+DOCKER_INFLUXDB_DB=power
diff --git a/mqtt-client/mqtt-client.py b/mqtt-client/mqtt-client.py
index 363e57e..a738a16 100644
--- a/mqtt-client/mqtt-client.py
+++ b/mqtt-client/mqtt-client.py
@@ -54,7 +54,7 @@ class MQTTClient:
labelnames = ["location"]
)
- self.zigbee_plugs = {"MikroTikZigbeePlug"}
+ self.zigbee_plugs = os.environ["ZIGBEE_PLUGS"].split(",")
self.zigbee_to_tasmota_transformations = {
"RMSVoltage": ("Voltage", int),
"ActivePower": ("Power", int),