homeassistant-alphaESS icon indicating copy to clipboard operation
homeassistant-alphaESS copied to clipboard

Doesn't work from midnight until 1p.m.

Open ahmedhoumeci opened this issue 1 year ago • 7 comments

Hi, I have the following error and I don't know how to solve it:

Logger: custom_components.alphaess Source: helpers/update_coordinator.py:300 Integration: Alpha ESS (documentation, issues) First occurred: 14 gennaio 2024 alle ore 01:09:45 (956 occurrences) Last logged: 07:55:09

Unexpected error fetching alphaess data: unsupported operand type(s) for -: 'NoneType' and 'NoneType' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alphaess/coordinator.py", line 56, in _async_update_data inverterdata.update({"Solar to Load": _pv - _feedin}) ~~~~^~~~~~~~~ TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'**

And the integration doesn't work from midnight until 1 p.m. more or less.

Any suggestion? Thanks

ahmedhoumeci avatar Jan 15 '24 07:01 ahmedhoumeci

what does your API response look like during that time? i recently had the same issue, but was caused due to one of the sites being offline (cant connect to the internet), therefore everything returned as "none" in the API response

See here: Screenshot 2024-01-15 at 9 00 29 am

Im working on a fix to catch this an alert the end user, could you be having the same issue?

Poshy163 avatar Jan 15 '24 08:01 Poshy163

@Poshy163 thank you for your answer. I can reach the cloud site without any problems if is that your question.

ahmedhoumeci avatar Jan 15 '24 08:01 ahmedhoumeci

Apologies, let me rephrase.

During 12-1 am;

  • Does the integration start up at all? or does it fail to boot?
  • Is your AlphaESS device connected to the internet during that hour?
  • What does the logs show during that hour? do you get a returned API call in the logs? (something like this?) Screenshot 2024-01-15 at 2 31 30 pm

If you are unsure, you can just send the logs through and i can have a look at what might be causing the issue

Poshy163 avatar Jan 15 '24 13:01 Poshy163

Hi @Poshy163. To answer to your question:

  1. The integration failed to boot
  2. Yes, it is correctly connette to internet
  3. I don't find anything in the logs exept this:

2024-01-15 09:34:00.056 ERROR (MainThread) [custom_components.alphaess] Unexpected error fetching alphaess data: unsupported operand type(s) for -: 'NoneType' and 'NoneType' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alphaess/coordinator.py", line 56, in _async_update_data inverterdata.update({"Solar to Load

ahmedhoumeci avatar Jan 16 '24 07:01 ahmedhoumeci

@Poshy163 the entire error logs of my home assistant istance error_log-4.txt

ahmedhoumeci avatar Jan 16 '24 21:01 ahmedhoumeci

@ahmedhoumeci during that time, was your system connected to the internet? As i stated recently i had the same issue, but was caused due to one of the sites being offline (cant connect to the internet), and that threw me the "supported operand type(s) for -: 'NoneType' and 'NoneType'" error

if you know how to program/edit the source file, do you want to play a debug output for "feedin" and "_pv", as i have a feeling they are "none". if not dont stress as i can show you how a bit later.

i am currently away, but i arrive in antwerp tomorrow so i can work on a bit more of the debugging/bypass because it seems like a common issue that some people have

Poshy163 avatar Jan 17 '24 21:01 Poshy163

Hi @Poshy163 did you find a workaround for the issue?

ahmedhoumeci avatar Apr 20 '24 06:04 ahmedhoumeci

@ahmedhoumeci can you try the new beta release and see if it has been resolved? seems to be fixed on my end (from midnight to next API call)

(to get the beta, go to the HACS page for AlphaESS, click on the 3 dots at the top right. click show beta versions, and download the latest beta. restart)

Poshy163 avatar Jul 26 '24 07:07 Poshy163