parent
225f80587b
commit
b3a0e08cdb
4
main.py
4
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
|
||||
|
|
Loading…
Reference in New Issue