This commit is contained in:
Robert 2024-02-01 23:51:18 +01:00
parent eb48c868c6
commit 2242de8b48

View File

@ -35,32 +35,32 @@ topic0 = {
} }
topic1 = { topic1 = {
"topic" : "openWB/bat/get/power", "topic" : "openWB/bat/get/power",
"line" : "1", "line" : "16",
"value" : "" "value" : ""
} }
topic2 = { topic2 = {
"topic" : "openWB/counter/7/get/power", "topic" : "openWB/counter/7/get/power",
"line" : "2", "line" : "32",
"value" : "" "value" : ""
} }
topic3 = { topic3 = {
"topic" : "openWB/pv/8/get/power", "topic" : "openWB/pv/8/get/power",
"line" : "3", "line" : "48",
"value" : "" "value" : ""
} }
topic4 = { topic4 = {
"topic" : "openWB/graph/lastlivevaluesJson", #house-power "topic" : "openWB/graph/lastlivevaluesJson", #house-power
"line" : "4", "line" : "64",
"value" : "" "value" : ""
} }
topic5 = { topic5 = {
"topic" : "openWB/vehicle/4/get/soc", "topic" : "openWB/vehicle/4/get/soc",
"line" : "5", "line" : "80",
"value" : "" "value" : ""
} }
topic6 = { topic6 = {
"topic" : "openWB/internal_chargepoint/0/get/powers", "topic" : "openWB/internal_chargepoint/0/get/powers",
"line" : "6", "line" : "80",
"value" : "" "value" : ""
} }
@ -125,7 +125,7 @@ def monitor(topics):
for key in topic_info: for key in topic_info:
print(key + ':', topic_info[key]) print(key + ':', topic_info[key])
drawblack.text((160, int(topic_info["line"])*16), topic_info["value"], font = font16, fill = 0) drawblack.text((160, topic_info["line"]), topic_info["value"], font = font16, fill = 0)
topic_info["value"] = subscribe(client, topic_info["topic"]) topic_info["value"] = subscribe(client, topic_info["topic"])
#drawblack.text((160, 16), str(house_power), font = font16, fill = 0) #drawblack.text((160, 16), str(house_power), font = font16, fill = 0)