aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbigclown-leds7
1 files changed, 6 insertions, 1 deletions
diff --git a/bigclown-leds b/bigclown-leds
index 2871d52..9bb3b0b 100755
--- a/bigclown-leds
+++ b/bigclown-leds
@@ -2,7 +2,7 @@
import paho.mqtt.client as mqtt
-def on_connect(client, userdata, rc):
+def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
client.subscribe("node/lcd-thermostat:0/led/#")
@@ -15,10 +15,15 @@ def on_message(client, userdata, msg):
payload=msg.payload)
+#def on_log(mqttc, obj, level, string):
+# print(string)
+
+
def main():
client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
+ #client.on_log = on_log
client.connect("127.0.0.1", 1883, 60)
client.loop_forever()