Hi
In meinem Logfile steht wie bei cacciac auch folgendes:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.mypv.communicate
Quelle: helpers/update_coordinator.py:354
Integration: myPV (Dokumentation)
Erstmals aufgetreten: 19. Oktober 2024 um 20:03:26 (42 Vorkommnisse)
Zuletzt protokolliert: 18:08:51
Unexpected error fetching mypv data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mypv/communicate.py", line 100, in _async_update_data
await mpv_dev.update()
File "/config/custom_components/mypv/mypv_device.py", line 149, in update
self.state = int(self.state_dict["State"])
~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'State'
Auf die Anfrage http://device.ip/mypv_dev.jsn bekomme ich die folgende Antwort, wobei ich die Seriennummer mal mit x versehen habe:
{
"device": "AC-THOR",
"acthor9s": 2,
"number": 1,
"sn": "xxxxxxxxxxxxxxxxxxxx",
"fwversion": "a0021002"
}
Auf die Anfrage http://device.ip/data.jsn kommt folgendes:
{
"device":"ACTHOR",
"acthor9s":2,
"fwversion":"a0021002",
"psversion":110,
"p9sversion":102,
"fsetup":0,
"screen_mode_flag":0,
"power_act":null,
"power_solar_act":null,
"power_grid_act":null,
"power_ac9":0,
"power_solar_ac9":0,
"power_grid_ac9":0,
"power1_solar":0,
"power1_grid":0,
"power2_solar":0,
"power2_grid":0,
"power3_solar":0,
"power3_grid":0,
"load_state":" 1:1 2:1 3:1",
"load_nom":0,
"rel1_out":"0001",
"pump_pwm":0,
"temp1":303,
"temp2":null,
"temp3":null,
"temp4":null,
"boostactive":0,
"legboostnext":"null",
"date":"21.10.24",
"loctime":"18:16:27",
"unixtime":1729527387,
"wp_flag":0,
"wp_time1_ctr":0,
"wp_time2_ctr":0,
"wp_time3_ctr":0,
"schicht_flag":0,
"act_night_flag":0,
"ctrlstate":"Conn. to Home Manager",
"blockactive":0,
"error_state":0,
"meter1_id":null,
"meter1_ip":"null",
"meter2_id":null,
"meter2_ip":"null",
"meter3_id":null,
"meter3_ip":"null",
"meter4_id":null,
"meter4_ip":"null",
"meter5_id":null,
"meter5_ip":"null",
"meter6_id":null,
"meter6_ip":"null",
"meter_ss":null,
"meter_ssid":"null",
"surplus":null,
"m0sum":null,
"m0l1":null,
"m0l2":null,
"m0l3":null,
"m0bat":null,
"m1sum":null,
"m1l1":null,
"m1l2":null,
"m1l3":null,
"m1devstate":null,
"m2sum":null,
"m2l1":null,
"m2l2":null,
"m2l3":null,
"m2soc":null,
"m2state":null,
"m2devstate":null,
"m3sum":null,
"m3l1":null,
"m3l2":null,
"m3l3":null,
"m3soc":null,
"m3devstate":null,
"m4sum":null,
"m4l1":null,
"m4l2":null,
"m4l3":null,
"m4devstate":null,
"ecarstate":"null",
"ecarboostctr":null,
"mss2":"null",
"mss3":"null",
"mss4":"null",
"mss5":"null",
"mss6":"null",
"mss7":"null",
"mss8":"null",
"mss9":"null",
"mss10":"null",
"mss11":"null",
"volt_mains":230,
"curr_mains":0,
"volt_L2":1,
"curr_L2":0,
"volt_L3":1,
"curr_L3":0,
"volt_out":0,
"freq":49986,
"temp_ps":266,
"fan_speed":0,
"ps_state":7,
"cur_ip":"192.168.2.27",
"cur_sn":"255.255.255.0",
"cur_gw":"192.168.2.1",
"cur_dns":"192.168.2.1",
"fwversionlatest":"a0021702",
"psversionlatest":111,
"p9sversionlatest":102,
"upd_state":1,
"upd_files_left":0,
"ps_upd_state":1,
"p9s_upd_state":0,
"cloudstate":4,
"debug_ip":"0.0.0.0"
}
Die Variable State gibt es so nicht.
Viele Werte sind jetzt bei Null, da es schon dunkel ist und auch nichts an Energie im Überschuss vorhanden ist. Aber eventuell kommst du ja mit den Infos weiter…
Gruß
bigbaerchen