change order
This commit is contained in:
parent
4765690f8e
commit
84a7423cb4
@ -60,22 +60,7 @@ def subscribe(client: mqtt_client, topic):
|
||||
client.subscribe(topic)
|
||||
client.on_message = on_message
|
||||
|
||||
|
||||
def run():
|
||||
|
||||
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)
|
||||
|
||||
monitor(charge_point_power)
|
||||
|
||||
|
||||
def monitor(charge_point_power)
|
||||
def monitor(charge_point_power):
|
||||
try:
|
||||
logging.info("epd2in13b_V3 Demo")
|
||||
|
||||
@ -123,5 +108,18 @@ def monitor(charge_point_power)
|
||||
#client.loop_forever()
|
||||
|
||||
|
||||
def run():
|
||||
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)
|
||||
|
||||
monitor(charge_point_power)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
Loading…
Reference in New Issue
Block a user