change location

This commit is contained in:
Robert 2024-02-01 23:34:31 +01:00
parent 94d49cf5d7
commit 3084422a9f
2 changed files with 48 additions and 6 deletions

View File

@ -93,12 +93,12 @@ def monitor(pv_power,house_power,power_import_export,house_battery_soc,house_bat
drawblack.text((2, 64), 'Batterie Entladen', font = font16, fill = 0)
drawblack.text((2, 80), 'Auto Laden', font = font16, fill = 0)
drawblack.text((180, 0), str(pv_power), font = font16, fill = 0)
drawblack.text((180, 16), str(house_power), font = font16, fill = 0)
drawblack.text((180, 32), str(power_import_export), font = font16, fill = 0)
drawblack.text((180, 48), str(house_battery_soc), font = font16, fill = 0)
drawblack.text((180, 64), str(house_battery_power), font = font16, fill = 0)
drawblack.text((180, 80), str(charge_point_power), font = font16, fill = 0)
drawblack.text((160, 0), str(pv_power), font = font16, fill = 0)
drawblack.text((160, 16), str(house_power), font = font16, fill = 0)
drawblack.text((160, 32), str(power_import_export), font = font16, fill = 0)
drawblack.text((160, 48), str(house_battery_soc), font = font16, fill = 0)
drawblack.text((160, 64), str(house_battery_power), font = font16, fill = 0)
drawblack.text((160, 80), str(charge_point_power), font = font16, fill = 0)

42
examples/test.py Normal file
View File

@ -0,0 +1,42 @@
topic0 = {
"topic" : "openWB/bat/get/soc",
"line" : "0",
"value" : ""
}
topic1 = {
"topic" : "openWB/bat/get/power",
"line" : "1",
"value" : ""
}
topic2 = {
"topic" : "openWB/counter/7/get/power",
"line" : "2",
"value" : ""
}
topic3 = {
"topic" : "openWB/pv/8/get/power",
"line" : "3",
"value" : ""
}
topic4 = {
"topic" : "openWB/graph/lastlivevaluesJson", #house-power
"line" : "4",
"value" : ""
}
topic5 = {
"topic" : "openWB/vehicle/4/get/soc",
"line" : "5",
"value" : ""
}
topic6 = {
"topic" : "openWB/internal_chargepoint/0/get/powers",
"line" : "6",
"value" : ""
}
topics = {0:topic0,1:topic1,2:topic2,3:topic3,4:topic4,5:topic5,6:topic6}
topics[3]['value'] = '20'
print(topics[3]["line"])