core: After recent Enphase Envoy integration upgrade, missing all enphase sensors except microinverters.
The problem
I have been using the Enphase Envoy integration for a few months - I LOVE IT!!! Thank you so much. I live in New York and have an island in the Bahamas and I use Home Assistant to monitor it. A few weeks ago, I noticed the Solar Production was no longer reporting. And I see that the integration is only showing the 92 inverter panels. They are correctly reporting, but not the production.
I can only think that there is some remnant from the previous install that is causing issues.
What is version of Home Assistant Core has the issue?
core-2021.5.5
What was the last working version of Home Assistant Core?
about 3 or 4 versions ago
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Enphase Envoy
Link to integration documentation on our website
https://www.home-assistant.io/integrations/enphase_envoy
Example YAML snippet
No response
Anything in the logs that might be useful for us?
I see a lot of errors in the Core Log - but often it is because the internet is so bad (I have a combination of LTE and PTP Ubnt to the island.
2021-05-19 16:14:16 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 127, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 259, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 319, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
state = self.state
File "/config/custom_components/emporia_vue/sensor.py", line 83, in state
usage = self.coordinator.data[self._id]["usage"]
KeyError: '17351-1-1S'
2021-05-19 16:14:17 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 127, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 259, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 319, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
state = self.state
File "/config/custom_components/emporia_vue/sensor.py", line 83, in state
usage = self.coordinator.data[self._id]["usage"]
KeyError: '17351-1-1S'
2021-05-19 16:14:19 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 127, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 259, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 319, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
state = self.state
File "/config/custom_components/emporia_vue/sensor.py", line 83, in state
usage = self.coordinator.data[self._id]["usage"]
KeyError: '17351-1-1S'
2021-05-19 16:14:21 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 127, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 259, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 319, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
state = self.state
File "/config/custom_components/emporia_vue/sensor.py", line 83, in state
usage = self.coordinator.data[self._id]["usage"]
KeyError: '17351-1-1S'
2021-05-19 16:14:22 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 127, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 259, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 319, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
state = self.state
File "/config/custom_components/emporia_vue/sensor.py", line 83, in state
usage = self.coordinator.data[self._id]["usage"]
KeyError: '17351-1-1S'
Additional information

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 36 (15 by maintainers)
Commits related to this issue
- Fix missing unique id in enphase_envoy - Fixes #50872 — committed to bdraco/home-assistant by bdraco 3 years ago
- Provide a hint on which username to use for enphase_envoy - Resolves confusion seen in #50872 — committed to bdraco/home-assistant by bdraco 3 years ago
I will open a PR, but I don’t know about the code 😅
Here is the before and after screenshots
Before
14 Inverters w/Unique IDs and 4 Energy entities w/o Unique IDs:

After
Now all have a Unique ID and a Enphase Envoy is listed as a Device:
There are some examples in
samsungtvandyeelightfor cases where we had to add the unique id later@lnlp NO!!! I mean serial number in unique_id … right now you have it null like i have… change it and the it will work The password is the last 6 numbers… but you can use the serial number as a unique id, config integrations appear to MUST have unique_it set…
So set unique_id, restart home assistant. Check if the now you have entities/devices in the integration config. if not, remove the integration restart, add integration again
I’ve asked the author if the code could be released to PyPi as a library then I could include it in
envoy-reader. Also once newer Envoys are upgraded to D7.x firmware the local API might become a moot point, but that’s a whole other discussion 😄