diff --git a/main.py b/main.py index f9add58..b97e8fb 100644 --- a/main.py +++ b/main.py @@ -68,9 +68,9 @@ def mqtt_on_connect(client, userdata, flags, rc): client.subscribe("server-rack-led-1/b") def mqtt_on_message(client, userdata, msg): - print("topic: " ,str(msg.topic.decode("utf-8"))) + print("topic: " ,str(msg.topic)) print("payload: " ,str(msg.payload.decode("utf-8"))) - topic = str(msg.topic.decode("utf-8")) + topic = str(msg.topic) payload = str(msg.payload.decode("utf-8")) if topic == "server-rack-led-1/power": power = payload