jello1974 / duosidaEV-home-assistant

Duosida D EV Charger Integration
MIT License
6 stars 3 forks source link

Wierd errors #2

Closed gajotnt closed 1 year ago

gajotnt commented 1 year ago

Woke up and noticed after updating that the integration is giving errors, maybe it's DS charge servers

This error originated from a custom integration.

Logger: custom_components.duosida.coordinator
Source: custom_components/duosida/duosida_api.py:105
Integration: Duosida (documentation, issues)
First occurred: 8:07:50 AM (6 occurrences)
Last logged: 8:08:49 AM

Unexpected error fetching duosida-<bound method DuosidaDevice.get_device_name of <custom_components.duosida.duosida.DuosidaDevice object at 0x7f707ca75990>>-coordinator data: 'chartList'
Unexpected error fetching duosida-<bound method DuosidaDevice.get_device_name of <custom_components.duosida.duosida.DuosidaDevice object at 0x7f7071781750>>-coordinator data: 'chartList'
Unexpected error fetching duosida-<bound method DuosidaDevice.get_device_name of <custom_components.duosida.duosida.DuosidaDevice object at 0x7f7070b40c40>>-coordinator data: 'chartList'
Unexpected error fetching duosida-<bound method DuosidaDevice.get_device_name of <custom_components.duosida.duosida.DuosidaDevice object at 0x7f7083a19990>>-coordinator data: 'chartList'
Unexpected error fetching duosida-<bound method DuosidaDevice.get_device_name of <custom_components.duosida.duosida.DuosidaDevice object at 0x7f707b742140>>-coordinator data: 'chartList'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/duosida/coordinator.py", line 40, in _async_update_data
    await self.async_update_state()
  File "/config/custom_components/duosida/duosida.py", line 201, in async_update_state
    self.charging_record = await self.api.async_get_charging_record(self.id)
  File "/config/custom_components/duosida/duosida_api.py", line 105, in async_get_charging_record
    json_x = _jsonx["chartList"]
KeyError: 'chartList'
Logger: homeassistant.config_entries
Source: config_entries.py:1244
First occurred: 8:08:07 AM (1 occurrences)
Last logged: 8:08:07 AM

Config entry 'WallboxDuoSida' for duosida integration not ready yet: 'chartList'; Retrying in background

Have to leave for my trip. Next week will look more into it.

jello1974 commented 1 year ago

Check if Today Consumption and Total Consumption sensors is showing values. I update their values from application charge record. The error points to charge record loading. Either was the server down or your app connects to a different server. Ping cpam3.x-cheng.com and see if 8.211.23.109 responds and check if sometimes you receive timeout errors.

gajotnt commented 1 year ago

I'm traveling now but I can confirm that on the DS Charge app it isn't showing any information on the charge record and I charged once with the new app (only Saturday I configured the duosida with the new app I used to use the old with the orange icon)

Screenshot_2023-03-06-18-31-02-73_a1b04ade13b213170352e8cdc86048f6

Can confirm the IP address is the same

Screenshot_2023-03-06-18-27-44-80_12e6c545cbddc9efc64c258cf96f38df

jello1974 commented 1 year ago

Yeah, it seems that the chinese servers does not record all charging sesions. My app also skips now and then some sesions. The error you encounter might be because you do not have any charging records. I will threat than error so you will have a log free use of the component.

jello1974 commented 1 year ago

Done, you can check it out...

gajotnt commented 1 year ago

Yes updated it, and started right away without errors :D Thanks dude :)