briancmpbll/home_assistant_custom_envoy

All connection attempts failed

Closed this issue · 16 comments

Since this morning my Envoy Sensors are unavailable in Home Assistant.
I saw an update was pending, so i've already updated the integration via HACS
Also a complete restart of HA did not solve the problem.
The token is populated and still valid.

Any bright ideas? :)

After debugging the following log was created:

2024-03-15 09:41:49.927 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, raising: All connection attempts failed
2024-03-15 09:41:52.998 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, waiting 0 sec: All connection attempts failed
2024-03-15 09:41:56.070 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, raising: All connection attempts failed
2024-03-15 09:43:16.161 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Checking Token value: yJraWQiOi (Only first 10 characters shown)
2024-03-15 09:43:16.162 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Token is populated: yJraWQiOi (Only first 10 characters shown)
2024-03-15 09:43:16.163 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Token expires at: 2024-10-03 12:23:06
2024-03-15 09:43:16.168 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Detect Model running
2024-03-15 09:43:16.169 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1 of 2: https://192.168.2.5/production.json?details=1: use token: True: Header: Timeout: 30 Holdoff: 0
2024-03-15 09:43:19.270 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, waiting 0 sec: All connection attempts failed
2024-03-15 09:43:19.274 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2 of 2: https://192.168.2.5/production.json?details=1: use token: True: Header: Timeout: 30 Holdoff: 0
2024-03-15 09:43:22.342 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, raising: All connection attempts failed
2024-03-15 09:43:22.344 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1 of 2: https://192.168.2.5/info: use token: True: Header: Timeout: 30 Holdoff: 0
2024-03-15 09:43:25.413 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, waiting 0 sec: All connection attempts failed
2024-03-15 09:43:25.414 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2 of 2: https://192.168.2.5/info: use token: True: Header: Timeout: 30 Holdoff: 0
2024-03-15 09:43:28.485 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] Error in fetch_with_retry, raising: All connection attempts failed
2024-03-15 09:43:28.486 DEBUG (MainThread) [custom_components.enphase_envoy] Finished fetching envoy Envoy 122240059986 data in 12.325 seconds (success: False)

The error All connection attempts failed you typically get if the Envoy is not reachable on the network. I.e. if the network cable is unplugged or the Envoy is powered down.

I assume Envoy is running and has no red LED? Could it be Enphase is upgrading the firmware in the Envoy?

I have the same issue with one if my two emphase sites, started exactly at midnight.

Are both sites running same envoy, envoy firmware, integration version, using cable or WiFi?

Can you connect to envoy from your browser? Try like http://envoy.local/info that should return some xml with firmware.

If you can connect are they still on same ip as before? Is the Envoy still reporting to the Enphase site?

The sites are not the same. They are both envoy-s metered, but from different years with different firmware.


Unexpected error fetching envoy Envoy 1220320XXXXX data: Could not connect or determine Envoy model. Check that the device is up at 'http://192.168.1.65'.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 274, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/enphase_envoy/__init__.py", line 66, in async_update_data
    await envoy_reader.getData()
  File "/config/custom_components/enphase_envoy/envoy_reader.py", line 590, in getData
    await self.detect_model()
  File "/config/custom_components/enphase_envoy/envoy_reader.py", line 697, in detect_model
    raise RuntimeError(
RuntimeError: Could not connect or determine Envoy model. Check that the device is up at 'http://192.168.1.65'.

http://192.168.1.65/info Is providing data.

The IP is the same and it does report to enlighten

The error you are seeing happens when http errors occur when it tries to determine the model at startup, If no reply at all comes back it will report that error. The status 'All connection attempts failed' is returned by the network layer, so something is wound up somewhere.

I wonder if cycling the Envoy may free up things, assuming on HA side things are cycled already.

I have power cycled the envoy, but no result. Strange thing is that it stopped exactly at midnight.

That is a curious moment to happen indeed. Is the second one connected to the same HA instance or is that a different HA?

A different HA, both running the same HA version 2024.3.1 and the same version of the integration.

You mentioned different fw versions for the Envoy. Is it the older or newer FW having the issue?

The one not working is on D7.0.88 4c8675 and the one working is on D7.6.175 4c8675.

@Trappist1-b , what firmware is your Envoy running?

@Trappist1-b , what firmware is your Envoy running?

I'm running firmware 7.6.168

I've looked further into this, my envoy also stopped reporting via the enlighten app.
Since later yesterday afternoon, it spontaneously came back with all data for the complete day, except the hourly data
No more errors since then.

Hi, indeed, the issue is resolved now.

Never a dull moment with Enphase Envoy ;-)

Thanks for the feedback.