fix
This commit is contained in:
parent
007ed0da85
commit
055d58bc34
@ -62,16 +62,17 @@ def subscribe(client: mqtt_client, topic):
|
|||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
try:
|
|
||||||
client = connect_mqtt()
|
|
||||||
house_battery_soc = subscribe(client, topic_house_battery_soc)
|
|
||||||
house_battery_power = subscribe(client, topic_house_battery_power)
|
|
||||||
power_import_export = subscribe(client, topic_power_import_export)
|
|
||||||
pv_power = subscribe(client, topic_pv_power)
|
|
||||||
house_power = subscribe(client, topic_house_power)
|
|
||||||
car_soc = subscribe(client, topic_car_soc)
|
|
||||||
charge_point_power = subscribe(client, topic_charge_point_power)
|
|
||||||
|
|
||||||
|
client = connect_mqtt()
|
||||||
|
house_battery_soc = subscribe(client, topic_house_battery_soc)
|
||||||
|
house_battery_power = subscribe(client, topic_house_battery_power)
|
||||||
|
power_import_export = subscribe(client, topic_power_import_export)
|
||||||
|
pv_power = subscribe(client, topic_pv_power)
|
||||||
|
house_power = subscribe(client, topic_house_power)
|
||||||
|
car_soc = subscribe(client, topic_car_soc)
|
||||||
|
charge_point_power = subscribe(client, topic_charge_point_power)
|
||||||
|
|
||||||
|
try:
|
||||||
logging.info("epd2in13b_V3 Demo")
|
logging.info("epd2in13b_V3 Demo")
|
||||||
|
|
||||||
epd = epd2in13b_V3.EPD()
|
epd = epd2in13b_V3.EPD()
|
||||||
@ -107,7 +108,7 @@ def run():
|
|||||||
logging.info("Goto Sleep...")
|
logging.info("Goto Sleep...")
|
||||||
epd.sleep()
|
epd.sleep()
|
||||||
|
|
||||||
client.loop_forever()
|
client.loop_forever()
|
||||||
|
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
logging.info(e)
|
logging.info(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user