This commit is contained in:
Robert Borzutzki 2022-10-19 09:11:48 +02:00
parent 50782d9948
commit 43dcf57baf

View File

@ -31,7 +31,6 @@ def on_connect(client, userdata, flags, rc):
def on_message(client, userdata, msg): def on_message(client, userdata, msg):
print(f"`{msg.topic}`: `{msg.payload.decode()}`") print(f"`{msg.topic}`: `{msg.payload.decode()}`")
print("-----")
Connected = False #global variable for the state of the connection Connected = False #global variable for the state of the connection
@ -69,6 +68,7 @@ client.subscribe(topic_houseBatteryLoadUnload)
try: try:
while True: while True:
time.sleep(1) time.sleep(1)
print("-----")
except KeyboardInterrupt: except KeyboardInterrupt:
print("exiting") print("exiting")