This commit is contained in:
Robert Borzutzki 2022-10-19 09:42:57 +02:00
parent f727a3ff4d
commit f23f00bdb1

View File

@ -43,7 +43,8 @@ try:
drawblack.text((5, 30), 'Strom Import/Export', font = font10, fill = 0) drawblack.text((5, 30), 'Strom Import/Export', font = font10, fill = 0)
drawblack.text((5, 45), 'Batterie %', font = font10, fill = 0) drawblack.text((5, 45), 'Batterie %', font = font10, fill = 0)
drawblack.text((5, 60), 'Batterie Laden/Entladen', font = font10, fill = 0) drawblack.text((5, 60), 'Batterie Laden/Entladen', font = font10, fill = 0)
epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRYimage)) #epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRYimage))
epd.display(epd.getbuffer(HRYimage))
time.sleep(2) time.sleep(2)
except IOError as e: except IOError as e:
@ -65,7 +66,8 @@ def on_connect(client, userdata, flags, rc):
print("Failed to connect, return code %d\n", rc) print("Failed to connect, return code %d\n", 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()}`")
Connected = False #global variable for the state of the connection Connected = False #global variable for the state of the connection