foxess-ha icon indicating copy to clipboard operation
foxess-ha copied to clipboard

No data shown -- Inverter time-out

Open BenjaminKoyen opened this issue 10 months ago • 7 comments

I have been searching around on existing issues but could not find the solution. My FoxEss integration does not show any values. From the logs I get:

Logger: custom_components.foxess.sensor Bron: custom_components/foxess/sensor.py:199 integratie: foxess (documentatie, problemen) Eerst voorgekomen: 19:01:20 (24 gebeurtenissen) Laatst gelogd: 19:24:20

FoxESS has Cloud timeout or the Inverter is off-line, connection will be retried in 1 minute.

I've checked and reloaded the apiKey. It was working and is still working with the new key. The FoxEss site says it 1440 calls per day.

This issue has always been the case since the updated system from FoxEss with apiKey, but due to holidays and cloud-issues, I was giving things some time to hopefully resolve themselves... Unfortunately, they dont.

FoxEss was working before when using username en pw system. FoxEss itself is working now if I check the cloud itself.

Any suggestions?

BenjaminKoyen avatar Apr 20 '24 17:04 BenjaminKoyen

Can you start off by restarting your home assistant, then when it has restarted, go to Settings, System, Logs and ‘LOAD FULL LOGS’ If you can post any error or timeout messages you get there that relate to foxess cloud below please.

FozzieUK avatar Apr 20 '24 17:04 FozzieUK

I get the same error (trying to run Foxess-ha for the first time). The logs isn't very informative:

2024-04-22 18:53:45.302 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform foxess is taking over 10 seconds.
2024-04-22 18:54:03.293 WARNING (MainThread) [custom_components.foxess.sensor] FoxESS has Cloud timeout or the Inverter is off-line, connection will be retried in 1 minute

kskalski avatar Apr 22 '24 18:04 kskalski

If you add this to your configuration.yaml and restart it will increase the log level-

logger:
  default: warning
  logs:
    custom_components.foxess: debug

Then restart your HA and if you could paste what you get in the logs but obscure your apikey and serial number before posting.

FozzieUK avatar Apr 22 '24 19:04 FozzieUK

Hi,

Had that already in my configuration.yaml as per readme; please find below the full log:

2024-04-23 08:21:50.717 WARNING (MainThread) [custom_components.foxess.sensor] FoxESS has Cloud timeout or the Inverter is off-line, connection will be retried in 1 minute. 2024-04-23 08:21:50.717 DEBUG (MainThread) [custom_components.foxess.sensor] Auxilliary TimeSlice 66BH372022******, -1 2024-04-23 08:21:50.717 DEBUG (MainThread) [custom_components.foxess.sensor] {'report': {}, 'reportDailyGeneration': {}, 'raw': {}, 'battery': {}, 'addressbook': {'hasBattery': False, 'status': '3'}, 'online': False} 2024-04-23 08:21:50.718 DEBUG (MainThread) [custom_components.foxess.sensor] Finished fetching FoxESS data in 0.160 seconds (success: True) 2024-04-23 08:22:50.557 DEBUG (MainThread) [custom_components.foxess.sensor] Updating data from https://www.foxesscloud.com/ 2024-04-23 08:22:50.558 DEBUG (MainThread) [custom_components.foxess.sensor] Time now: 8, last 8 2024-04-23 08:22:50.559 DEBUG (MainThread) [custom_components.foxess.sensor] TimeSlice Main Poll, interval: 66BH372022******, 0 2024-04-23 08:22:50.559 DEBUG (MainThread) [custom_components.foxess.sensor] OADevice Detail fetch https://www.foxesscloud.com/op/v0/device/detail?sn=66BH372022****** 2024-04-23 08:22:50.689 DEBUG (MainThread) [custom_components.foxess.sensor] OA Device Detail Bad Response: {'errno': 41930, 'msg': 'Device does not exist or has been used by other', 'result': None} 2024-04-23 08:22:50.690 WARNING (MainThread) [custom_components.foxess.sensor] FoxESS has Cloud timeout or the Inverter is off-line, connection will be retried in 1 minute. 2024-04-23 08:22:50.690 DEBUG (MainThread) [custom_components.foxess.sensor] Auxilliary TimeSlice 66BH372022******, -1 2024-04-23 08:22:50.690 DEBUG (MainThread) [custom_components.foxess.sensor] {'report': {}, 'reportDailyGeneration': {}, 'raw': {}, 'battery': {}, 'addressbook': {'hasBattery': False, 'status': '3'}, 'online': False} 2024-04-23 08:22:50.691 DEBUG (MainThread) [custom_components.foxess.sensor] Finished fetching FoxESS data in 0.133 seconds (success: True)

When I go to FoxEss cloud itself, it says: Number of calls per day:1440 Remaining calls for today:1052

So it seems to be requesting at least. Already tried to create a new API key and restart HA; did not do the trick :)

BenjaminKoyen avatar Apr 23 '24 06:04 BenjaminKoyen

@BenjaminKoyen Ok, thanks.

The error shown from the device detail call is 41930, Device does not exist or has been used by other

That suggests that the apikey is correct but either the inverter serial number is not correct or that inverter serial number is not in the account you generated the apikey.

Can you double check that your inverter serial number is correct (note this is not the datalogger serial number), but also be careful if you manually type it as there are both numbers and characters in the serial number so a zero could in fact be an 'O' - if possible, copy and paste it from the web screen straight into your configuration.yaml

As you say something is making api calls, if you don't use the Energy Stats it must be this integration which suggest the apiKey is entered correctly and as the error suggests something is wrong with the inverter serial n umber.

FozzieUK avatar Apr 23 '24 08:04 FozzieUK

In my case it appears as actual network issue or slowness of focesscloud, since I'm getting data correctly most of the time today, just sometimes there is timeout:

2024-04-23 08:26:18.722 DEBUG (MainThread) [custom_components.foxess.sensor] OA Report Variable: dischargeEnergyToTal, Total: 0.0
2024-04-23 08:26:18.723 DEBUG (MainThread) [custom_components.foxess.sensor] OA Report Variable: loads, Total: 0.0
2024-04-23 08:26:19.225 DEBUG (MainThread) [custom_components.foxess.sensor] API enforced delay, wait: 0.5
2024-04-23 08:26:19.226 DEBUG (MainThread) [custom_components.foxess.sensor] getReportDailyGeneration fetch https://www.foxesscloud.com/op/v0/device/generation?sn=
2024-04-23 08:26:19.227 DEBUG (MainThread) [custom_components.foxess.sensor] getReportDailyGeneration OA request:{"sn":"6....","dimension":"day"}
2024-04-23 08:27:34.243 ERROR (MainThread) [homeassistant.components.rest.data] Timeout while fetching data: https://www.foxesscloud.com/op/v0/device/generation?sn=6...
2024-04-23 08:27:34.248 DEBUG (MainThread) [custom_components.foxess.sensor] Unable to get OA Daily Generation Report from FoxESS Cloud
2024-04-23 08:27:34.249 DEBUG (MainThread) [custom_components.foxess.sensor] getReportDailyGeneration False
2024-04-23 08:27:34.249 WARNING (MainThread) [custom_components.foxess.sensor] FoxESS has Cloud timeout or the Inverter is off-line, connection will be retried in 1 minute

kskalski avatar Apr 23 '24 08:04 kskalski

@kskalski The Fox cloud api does slow down from time to time when they are working on the servers, early this morning it was taking over 50 seconds for an api call - but I wouldn't expect to see more than a handful of timeouts a day. The integration copes with this by retrying one minute after a timeout, so there is usually no impact on the data unless it is continually failing, many times in a row.

Is it possible that your internet or wifi connection to your home assistant is slow/unreliable ? - if so you can modify the timeout in this file /homeassistant/custom_components/foxess/sensor.py

You can try to increase the value in line 71 for DEFAULT_TIMEOUT = 75 to be 100 seconds and see if that helps (you'll need to restart HA to action this)

FozzieUK avatar Apr 23 '24 09:04 FozzieUK

Hi. Changed nothing and is working now... I did re-do the API at FoxCloud just before my post, maybe it took some hours/days at FoxEss. Anyway, working good now! Thanks for the feedbacks

BenjaminKoyen avatar Apr 27 '24 17:04 BenjaminKoyen