From 2e2082ea6d3b86d6f01dbd2aaaa3dd7900591611 Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 29 Sep 2026 15:20:55 +0100 Subject: Added reading zigbee plugs from a config file instead of having it static --- config.env.example | 4 +++- mqtt-client/mqtt-client.py | 2 +- 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), -- cgit v1.2.3