aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mqtt_watch.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mqtt_watch.py')
-rw-r--r--scripts/mqtt_watch.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/mqtt_watch.py b/scripts/mqtt_watch.py
index e2c4e21..22105c6 100644
--- a/scripts/mqtt_watch.py
+++ b/scripts/mqtt_watch.py
@@ -1,17 +1,17 @@
#!/usr/bin/env python3
""" Listen for mqtt-events, and trigger for some """
-import os
from datetime import datetime
+import common
import paho.mqtt.client as mqtt
-mqtt_server = os.environ["el_mqtt_server"]
-mqtt_port = int(os.environ["el_mqtt_port"])
-keepalive = int(os.environ["el_mqtt_keepalive"])
-mqtt_topic = os.environ["el_mqtt_topic"]
-mqtt_user = os.environ["el_mqtt_user"]
-mqtt_pass = os.environ["el_mqtt_pass"]
+mqtt_server = common.env("el_mqtt_server")
+mqtt_port = int(common.env("el_mqtt_port"))
+keepalive = int(common.env("el_mqtt_keepalive"))
+mqtt_topic = common.env("el_mqtt_topic")
+mqtt_user = common.env("el_mqtt_user")
+mqtt_pass = common.env("el_mqtt_pass")
# The callback for when the client receives a CONNACK response from the server.