print the pin number and state of received mqtt message to terminal.

This commit is contained in:
CiscoTheWolf 2023-05-31 18:37:08 +02:00
parent da9965cb41
commit 0ec2abb46e

View file

@ -136,6 +136,9 @@ def on_connect(client, userdata, flags, response_code):
def on_message(client, userdata, message):
print("Received message '" + str(message.payload) + "' on topic '"
+ message.topic + "' with QoS " + str(message.qos))
pin_number = str(message.payload)[12:13]
pin_state = str(message.payload)[6:9]
print("pin number: " + pin_number+ " pin state: " + pin_state)
proot_state = ProotState()
proot_state.blink()
@ -158,5 +161,3 @@ while True:
pass
# TODO create a splash screen to display super quick before the rest of the assets are loading