k
This commit is contained in:
parent
50782d9948
commit
43dcf57baf
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user