This commit is contained in:
robert 2024-01-31 23:33:08 +00:00
parent 24e4bac203
commit d5710eaa20

View File

@ -62,6 +62,7 @@ def subscribe(client: mqtt_client, topic):
def run(): def run():
try:
client = connect_mqtt() client = connect_mqtt()
house_battery_soc = subscribe(client, topic_house_battery_soc) house_battery_soc = subscribe(client, topic_house_battery_soc)
house_battery_power = subscribe(client, topic_house_battery_power) house_battery_power = subscribe(client, topic_house_battery_power)
@ -108,15 +109,15 @@ def run():
client.loop_forever() client.loop_forever()
except IOError as e:
logging.info(e)
except KeyboardInterrupt:
logging.info("ctrl + c:")
epd2in13b_V3.epdconfig.module_exit()
exit()
if __name__ == '__main__': if __name__ == '__main__':
run() run()
#except IOError as e:
# logging.info(e)
#except KeyboardInterrupt:
# logging.info("ctrl + c:")
# epd2in13b_V3.epdconfig.module_exit()
# exit()