home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.43k stars 30.67k forks source link

After recent Enphase Envoy integration upgrade, missing all enphase sensors except microinverters. #50872

Closed wreuvers closed 2 years ago

wreuvers commented 3 years ago

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

Snap005 Snap001 Snap002 Snap003 Snap008

probot-home-assistant[bot] commented 3 years ago

enphase_envoy documentation enphase_envoy source (message by IssueLinks)

DavidDeSloovere commented 3 years ago

A recent update move the config from yaml to the UI. I remember vaguely that I removed the integration and then added it again manually. Took a few attempts though.

Weird that you don't have a device. Works on my install. image

Entity names did change after readding the integration, if I remember correctly. They include a long number. But I just renamed them back. I have micro inverters, but probably an older gateway as they don't report in HA, only have the 4 values.

image

Don't know if this helps you in any way, but I wanted to respond because you wrote you have an island ๐Ÿ˜‰

wreuvers commented 3 years ago

Hi David - I have removed and added it 4 times to no avail. Really weird that when I have it removed, I see nothing with enphase or envoy in the Entities list. But when I add the integration, I get all 92 inverters correctly added, but it adds these weird, old naming convention items for the current energy production and consumption. There must be some remnants here.

Anyone who can solve this is welcome to stay on the island for a few days - and tinker with all the automations I am running (reclaimed Tesla batteries, UDP copntrolled charge controllers, "tricked" solar inverters to thining the Tesla batteries are solar arrays, ywatermakers, irrigation, etc.) Snap011

rschulzUK commented 3 years ago

I can confirm this issue. The integration worked flawlessly upon the initial install, detecting 19 microinverters and 8 entities corresponding to consumption and production (current, day, 7 days, lifetime). Had Encharge batteries installed and was hoping that removing and reinstalling the integration would pick up additional entities corresponding to the batteries. However, now only the 19 microinverters show up.

rschulzUK commented 3 years ago

I removed and re-added the integration, and toggled the integration's auto-detection and polling switches to "off" and then to "on" again. Initially that had no effect. After a few hours, instead of just the 19 microinverters, the envoy device and the 8 entities corresponding to consumption and production also showed up. Am unsure what if any of the above actions helped. The batteries remain undiscovered.

codedmind commented 3 years ago

I have this issue also. Using latest 2021.07.4 the integration only report the 4 entities (4 inverters) but i have others sensors like sensor.enphase_current_energy_consumption however after upgrade to 2021.08.b10 i have the same inverters sensors but all the others sensors are missing

With both versions the integratons page is the same image

But with the 2021.07.4 version i have a lot more sensors image

bdraco commented 3 years ago

You may need to remove the integration and authenticate with the installer password if you have an older envoy to see all the entities.

https://thecomputerperson.wordpress.com/2016/08/28/reverse-engineering-the-enphase-installer-toolkit/

codedmind commented 3 years ago

@bdraco i already have done that... remove and add the integration again... still no sucess. I then create a new VM with Home assistant and try add the integration (same settings) and then it works ok. So the issue is with my main Home Assistant, that instance initial was yaml, then it was migrated... but for some reason with version 2021.07.04 i have all the sensors when upgrade to the new version (2021.08) i loose a lot of sensors

I think my envoy is recent as the initial login was the last 6 digits from SN

codedmind commented 3 years ago

Ok i found a way how to solve the problem!!! Like i mention i used this integration from yaml, than the migration to zeroconf don't migrate all the settings, so i ompare the .storage/core.config_entries and even removing the integration and add it again some values never change, source and unique_id, so i put some values in their and now everything works... the yaml migration keeps break things...

wreuvers commented 3 years ago

Hi codemind Please elaborate on what you mean by "put some values in there". Even if I delete all the references to enphase_envoy and delete the integration, reboot and reinstall, I still do not see the main items

codedmind commented 3 years ago

@wreuvers Short story: edit .storage/core.config_entries search for the enphase integration and put gateway SN i unique_id

Long story: i install a new instance of Home Assistant and add the integration, everything works ok. So then i compare the core.* files inside .storage from both installations (let call them Main and DEBUG) the MAIN install where the sensors are missing i have the envoy integration a long time ago, since yaml... so then the integration from yaml as deprecated but imported... everything works until 2021.08.

So comparing the files from MAIN and DEBUG i can see that in the MAIN some keys of the integration have null in the value, so i change the keys, i change a lot to them to make it equal and try to get it working, but i will suggest you, after make a backup put an id in unique_id and then restart the core, the unique_id in the DEBUG and the one that i put in the MAIN was the gateway SN

gtdiehl commented 3 years ago

You may need to remove the integration and authenticate with the installer password if you have an older envoy to see all the entities.

https://thecomputerperson.wordpress.com/2016/08/28/reverse-engineering-the-enphase-installer-toolkit/

There is also a Python script that was created by @sarnau, https://github.com/sarnau/EnphaseEnergy. Easier if you don't have an Android phone!

bdraco commented 3 years ago

There is also a Python script that was created by @sarnau, sarnau/EnphaseEnergy. Easier if you don't have an Android phone!

If envoy-reader knew how to generate the installer password, we could ask it to try to login on discovery and skip all the password entry since it would already know how to authenticate.

gtdiehl commented 3 years ago

There is also a Python script that was created by @sarnau, sarnau/EnphaseEnergy. Easier if you don't have an Android phone!

If envoy-reader knew how to generate the installer password, we could ask it to try to login on discovery and skip all the password entry since it would already know how to authenticate.

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 ๐Ÿ˜„

ideal2545 commented 3 years ago

I'm not getting any microinverters at all, just 4 entities, but my envoy is older, could that be why? I just added the integration thinking I would see the microinverters which is what lead me to this thread. I believe its an "Envoy-R"

wreuvers commented 3 years ago

@wreuvers Short story: edit .storage/core.config_entries search for the enphase integration and put gateway SN i unique_id

Long story: i install a new instance of Home Assistant and add the integration, everything works ok. So then i compare the core.* files inside .storage from both installations (let call them Main and DEBUG) the MAIN install where the sensors are missing i have the envoy integration a long time ago, since yaml... so then the integration from yaml as deprecated but imported... everything works until 2021.08.

So comparing the files from MAIN and DEBUG i can see that in the MAIN some keys of the integration have null in the value, so i change the keys, i change a lot to them to make it equal and try to get it working, but i will suggest you, after make a backup put an id in unique_id and then restart the core, the unique_id in the DEBUG and the one that i put in the MAIN was the gateway SN

Hi @codedmind

This worked - thanks. And as promised, as you helped me solve this, you are welcome to spend a week or so on the Cay (island). Please reach out to me when you would likely be/plan to be in the Abacos (The Bahamas). And I will organized to have you shuttled to the island and back.

Thanks Wayne

codedmind commented 3 years ago

Glad it work.

Cheers

A domingo, 22/08/2021, 20:09, wreuvers @.***> escreveu:

@wreuvers https://github.com/wreuvers Short story: edit .storage/core.config_entries search for the enphase integration and put gateway SN i unique_id

Long story: i install a new instance of Home Assistant and add the integration, everything works ok. So then i compare the core.* files inside .storage from both installations (let call them Main and DEBUG) the MAIN install where the sensors are missing i have the envoy integration a long time ago, since yaml... so then the integration from yaml as deprecated but imported... everything works until 2021.08.

So comparing the files from MAIN and DEBUG i can see that in the MAIN some keys of the integration have null in the value, so i change the keys, i change a lot to them to make it equal and try to get it working, but i will suggest you, after make a backup put an id in unique_id and then restart the core, the unique_id in the DEBUG and the one that i put in the MAIN was the gateway SN

Hi @codedmind https://github.com/codedmind

This worked - thanks. And as promised, as you helped me solve this, you are welcome to spend a week or so on the Cay (island). Please reach out to me when you would likely be/plan to be in the Abacos (The Bahamas). And I will organized to have you shuttled to the island and back.

Thanks Wayne

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/50872#issuecomment-903316269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWGOX52XBSPMZ2N7A3AVS3T6FDNBANCNFSM45FNOSOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

bdraco commented 3 years ago

The batteries remain undiscovered.

https://github.com/home-assistant/core/blob/dev/homeassistant/components/enphase_envoy/const.py#L19

Batteries are not in the list

bdraco commented 3 years ago

envoy_reader supports pulling the battery storage, but the integration doesn't know what to do that with data.

I don't have storage connected to my envoy so I can't guess how the data is formatted

@rschulzUK Can you post your http://<ip>/production.json ?

rschulzUK commented 3 years ago

@bdraco Thank you for your interest!

http://<ip>/production.json (see at bottom) has no information about storage. Storage information is provided at http://<ip>/ivp/ensemble/inventory, which looks like this [ { "type": "ENCHARGE", "devices": [ { "part_num": "830-00703-r76", "installed": 1630490293, "serial_num": "122104023734", "device_status": [ "envoy.global.ok", "prop.done" ], "last_rpt_date": 1630525061, "admin_state": 6, "admin_state_str": "ENCHG_STATE_READY", "created_date": 1630490293, "img_load_date": 1630490293, "img_pnum_running": "1.2.2883_release/20.34", "zigbee_dongle_fw_version": "0x100A", "operating": true, "communicating": true, "sleep_enabled": false, "percentFull": 100, "temperature": 23, "maxCellTemp": 24, "comm_level_sub_ghz": 4, "comm_level_2_4_ghz": 4, "led_status": 14, "real_power_w": -18, "dc_switch_off": false, "encharge_rev": 1, "encharge_capacity": 3300 }, { "part_num": "830-00703-r76", "installed": 1630490315, "serial_num": "122104023737", "device_status": [ "envoy.global.ok", "prop.done" ], "last_rpt_date": 1630525339, "admin_state": 6, "admin_state_str": "ENCHG_STATE_READY", "created_date": 1630490315, "img_load_date": 1630490315, "img_pnum_running": "1.2.2883_release/20.34", "zigbee_dongle_fw_version": "0x100A", "operating": true, "communicating": true, "sleep_enabled": false, "percentFull": 100, "temperature": 23, "maxCellTemp": 24, "comm_level_sub_ghz": 4, "comm_level_2_4_ghz": 4, "led_status": 14, "real_power_w": -127, "dc_switch_off": false, "encharge_rev": 1, "encharge_capacity": 3300 }, { "part_num": "830-00703-r76", "installed": 1630490295, "serial_num": "122104023738", "device_status": [ "envoy.global.ok", "prop.done" ], "last_rpt_date": 1630525311, "admin_state": 6, "admin_state_str": "ENCHG_STATE_READY", "created_date": 1630490295, "img_load_date": 1630490295, "img_pnum_running": "1.2.2883_release/20.34", "zigbee_dongle_fw_version": "0x100A", "operating": true, "communicating": true, "sleep_enabled": false, "percentFull": 100, "temperature": 23, "maxCellTemp": 24, "comm_level_sub_ghz": 3, "comm_level_2_4_ghz": 3, "led_status": 14, "real_power_w": -16, "dc_switch_off": false, "encharge_rev": 1, "encharge_capacity": 3300 } ] }, { "type": "ENPOWER", "devices": [ { "part_num": "860-00276-r47", "installed": 1630490307, "serial_num": "122108046873", "device_status": [ "envoy.global.ok", "prop.done" ], "last_rpt_date": 1630525434, "admin_state": 24, "admin_state_str": "ENPWR_STATE_OPER_CLOSED", "created_date": 1630490307, "img_load_date": 1630490307, "img_pnum_running": "1.2.2064_release/20.34", "zigbee_dongle_fw_version": "0x100A", "operating": true, "communicating": true, "temperature": 72, "comm_level_sub_ghz": 4, "comm_level_2_4_ghz": 4, "mains_admin_state": "closed", "mains_oper_state": "closed", "Enpwr_grid_mode": "multimode-ongrid", "Enchg_grid_mode": "multimode-ongrid", "Enpwr_relay_state_bm": 496, "Enpwr_curr_state_id": 16 } ] }, { "grid_profile_name": "IEEE 1547 Mainland alternate", "id": "91937832-159a-410a-9594-0a964372e096:0", "grid_profile_version": "1.0.6", "item_count": 2997 } ]

http://<ip>/production.json looks like this: {"production":[{"type":"inverters","activeCount":19,"readingTime":1630525114,"wNow":6,"whLifetime":321292},{"type":"eim","activeCount":1,"measurementType":"production","readingTime":1630525196,"wNow":23.67,"whLifetime":3881452.838,"varhLeadLifetime":0.068,"varhLagLifetime":2307009.143,"vahLifetime":5508754.064,"rmsCurrent":3.249,"rmsVoltage":240.249,"reactPwr":384.245,"apprntPwr":390.276,"pwrFactor":0.06,"whToday":4229.838,"whLastSevenDays":111473.838,"vahToday":6418.064,"varhLeadToday":0.068,"varhLagToday":3909.143}],"consumption":[{"type":"eim","activeCount":1,"measurementType":"total-consumption","readingTime":1630525196,"wNow":2206.985,"whLifetime":3399540.235,"varhLeadLifetime":2222425.434,"varhLagLifetime":2423722.673,"vahLifetime":6081115.912,"rmsCurrent":22.113,"rmsVoltage":240.213,"reactPwr":-451.329,"apprntPwr":5311.718,"pwrFactor":0.42,"whToday":7716.235,"whLastSevenDays":133402.235,"vahToday":10179.912,"varhLeadToday":3931.434,"varhLagToday":3936.673},{"type":"eim","activeCount":1,"measurementType":"net-consumption","readingTime":1630525196,"wNow":2183.315,"whLifetime":2005101.426,"varhLeadLifetime":2222425.367,"varhLagLifetime":116713.53,"vahLifetime":6081115.912,"rmsCurrent":18.864,"rmsVoltage":240.178,"reactPwr":-67.084,"apprntPwr":2270.782,"pwrFactor":0.96,"whToday":0,"whLastSevenDays":0,"vahToday":0,"varhLeadToday":0,"varhLagToday":0}],"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}

bdraco commented 3 years ago

When storage is importing or exporting energy, what does the "storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"} line look like in /production.json?

rschulzUK commented 3 years ago

The acb entry has never looked different from above, before and after storage installation. Is it actually being used by Enphase?

bdraco commented 3 years ago

The acb entry has never looked different from above, before and after storage installation. Is it actually being used by Enphase?

No idea

[{
    "type": "ENCHARGE",
    "devices": [{
        "part_num": "830-00703-r76",
        "installed": 1630490293,
        "serial_num": "122104023734",
        "device_status": ["envoy.global.ok", "prop.done"],
        "last_rpt_date": 1630525061,
        "admin_state": 6,
        "admin_state_str": "ENCHG_STATE_READY",
        "created_date": 1630490293,
        "img_load_date": 1630490293,
        "img_pnum_running": "1.2.2883_release/20.34",
        "zigbee_dongle_fw_version": "0x100A",
        "operating": true,
        "communicating": true,
        "sleep_enabled": false,
        "percentFull": 100,
        "temperature": 23,
        "maxCellTemp": 24,
        "comm_level_sub_ghz": 4,
        "comm_level_2_4_ghz": 4,
        "led_status": 14,
        "real_power_w": -18,
        "dc_switch_off": false,
        "encharge_rev": 1,
        "encharge_capacity": 3300
    }, {
        "part_num": "830-00703-r76",
        "installed": 1630490315,
        "serial_num": "122104023737",
        "device_status": ["envoy.global.ok", "prop.done"],
        "last_rpt_date": 1630525339,
        "admin_state": 6,
        "admin_state_str": "ENCHG_STATE_READY",
        "created_date": 1630490315,
        "img_load_date": 1630490315,
        "img_pnum_running": "1.2.2883_release/20.34",
        "zigbee_dongle_fw_version": "0x100A",
        "operating": true,
        "communicating": true,
        "sleep_enabled": false,
        "percentFull": 100,
        "temperature": 23,
        "maxCellTemp": 24,
        "comm_level_sub_ghz": 4,
        "comm_level_2_4_ghz": 4,
        "led_status": 14,
        "real_power_w": -127,
        "dc_switch_off": false,
        "encharge_rev": 1,
        "encharge_capacity": 3300
    }, {
        "part_num": "830-00703-r76",
        "installed": 1630490295,
        "serial_num": "122104023738",
        "device_status": ["envoy.global.ok", "prop.done"],
        "last_rpt_date": 1630525311,
        "admin_state": 6,
        "admin_state_str": "ENCHG_STATE_READY",
        "created_date": 1630490295,
        "img_load_date": 1630490295,
        "img_pnum_running": "1.2.2883_release/20.34",
        "zigbee_dongle_fw_version": "0x100A",
        "operating": true,
        "communicating": true,
        "sleep_enabled": false,
        "percentFull": 100,
        "temperature": 23,
        "maxCellTemp": 24,
        "comm_level_sub_ghz": 3,
        "comm_level_2_4_ghz": 3,
        "led_status": 14,
        "real_power_w": -16,
        "dc_switch_off": false,
        "encharge_rev": 1,
        "encharge_capacity": 3300
    }]
}, {
    "type": "ENPOWER",
    "devices": [{
        "part_num": "860-00276-r47",
        "installed": 1630490307,
        "serial_num": "122108046873",
        "device_status": ["envoy.global.ok", "prop.done"],
        "last_rpt_date": 1630525434,
        "admin_state": 24,
        "admin_state_str": "ENPWR_STATE_OPER_CLOSED",
        "created_date": 1630490307,
        "img_load_date": 1630490307,
        "img_pnum_running": "1.2.2064_release/20.34",
        "zigbee_dongle_fw_version": "0x100A",
        "operating": true,
        "communicating": true,
        "temperature": 72,
        "comm_level_sub_ghz": 4,
        "comm_level_2_4_ghz": 4,
        "mains_admin_state": "closed",
        "mains_oper_state": "closed",
        "Enpwr_grid_mode": "multimode-ongrid",
        "Enchg_grid_mode": "multimode-ongrid",
        "Enpwr_relay_state_bm": 496,
        "Enpwr_curr_state_id": 16
    }]
}, {
    "grid_profile_name": "IEEE 1547 Mainland alternate",
    "id": "91937832-159a-410a-9594-0a964372e096:0",
    "grid_profile_version": "1.0.6",
    "item_count": 2997
}]

It looks like we could report the % charged. The real_power_w values look useful, but I'm not sure what they are measuring.

gtdiehl commented 3 years ago

Does this page require the installer account?

http:///ivp/ensemble/inventory

gtdiehl commented 3 years ago

I'm not getting any microinverters at all, just 4 entities, but my envoy is older, could that be why? I just added the integration thinking I would see the microinverters which is what lead me to this thread. I believe its an "Envoy-R"

If your Enphase Envoy is running firmware <3.9, then you won't be able to see the Inverter sensors

rschulzUK commented 3 years ago

Yes, it does.

Greg @.***> schrieb am Mi., 1. Sep. 2021, 21:38:

Does this page require the installer account?

http:///ivp/ensemble/inventory

โ€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/50872#issuecomment-911010952, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJOVTOBIZRXXIJERD2HLOLT73IQ3ANCNFSM45FNOSOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lnlp commented 3 years ago

These Home Assistant updates are driving me crazy. Every few HA updates something else that worked perfectly before breaks...

I updated from HA 2021.5.x to 2021.9.1 some days ago. After the upgrade things were wrong/not working with my Envoy sensors in HA:

sensor.envoy_current_energy_production was not reporting actual values anymore. I thought maybe the sensor might have been renamed. Other stuff (not Envoy) in HA was also recently renamed/removed. I then saw sensor sensor.envoy_current_power_production which is almost similar in name. Is this new? Is this a replacement?

I checked my Envoy integration (which previously worked, integration - not based on yaml config settings anymore since it was changed to an integration months ago). It currently only shows my micro-inverters as devices, but no other sensors.

In the regular UI no settings are availble for the Envoy integration. Everything seems to be hidden away. I preferred the yaml config settings as used previously. The yaml allows easy checking and modifying any settings. With integrations not so much/not at all.

@wreuvers

i have the envoy integration a long time ago, since yaml... so then the integration from yaml as deprecated but imported... everything works until 2021.08.

Same here. ๐Ÿ™„โ˜น

Long story: i install a new instance of Home Assistant and add the integration, everything works ok. So then i compare the core.* files inside .storage from both installations (let call them Main and DEBUG) the MAIN install where the sensors are missing i have the envoy integration a long time ago, since yaml... so then the integration from yaml as deprecated but imported... everything works until 2021.08.

Today I updated HA again to 2021.9.3 but unfortunately that did not fix it. (My Envoy (EU) runs firmware R4.10.35 (build date 13 nov 2018) and was not updated so one of the recent HA updates is to blame.)

I'm using a HASS OS based Docker install of HA. Where can I find these Main and DEBUG configurations, how can I check and edit/correct them?

codedmind commented 3 years ago

@lnlp that two files are from two different instalations... i used them to compare because in my "MAIN" installation i have the issues you have, but in the debug everything works ok... like i said the migration from yaml to config don't create a unique id and the ui config need that.

Short story: edit .storage/core.config_entries search for the enphase integration and put gateway SN i unique_id

lnlp commented 3 years ago

Thanks I had not used .storage before but was able to access it in VSCode (add-on).

Short story: edit .storage/core.config_entries search for the enphase integration and put gateway SN i unique_id

Do you mean mean update the password value in the section below?

{
    "entry_id": "xxxxxxxx5765bb01eea3339fxxxxxxxx",
    "version": 1,
    "domain": "enphase_envoy",
    "title": "Envoy",
    "data": {
        "host": "envoy.xxxxxxxx.xxx",
        "username": "envoy",
        "password": "xxxxxx",
        "name": "Envoy"
    },
    "options": {},
    "pref_disable_new_entities": false,
    "pref_disable_polling": false,
    "source": "import",
    "unique_id": null,
    "disabled_by": null
}

Everything appears to be set correctly already, password included (the xxx shown above are for anonimisation).

It is now daylight again so I was able to do some further testing.

Obeservations:

As I noted before:

sensor.envoy_current_energy_production was not reporting actual values anymore. I thought maybe the sensor might have been renamed. Other stuff (not Envoy) in HA was also recently renamed/removed. I then saw sensor sensor.envoy_current_power_production which is almost similar in name. Is this new? Is this a replacement?

I have checked and can now confirm this: During one of my recent HA updates one of the Envoy sensors was changed: sensor.envoy_current_energy_production appears to have been replaced by sensor.envoy_current_power_production. Both sensors do (still) exist however.

Below graph that shows both sensor values for the last 100 hours clearly shows this:

capture 2021-09-06 10ยท16ยท40 Showing sensor.envoy_current_energy_production and sensor.envoy_current_power_production values from the last 100 hours (capture taken at 2021-09-06 10:16 CET).

Where the values jump from one sensor to the other is when I updated HA from 2021.5.x to 2021.9.1 some days ago.

Maybe I missed an announcement about this naming change?

codedmind commented 3 years ago

@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

lnlp commented 3 years ago

Ah clear (thats what you wrote but I misread).

I added the SN and restarted HA. All sensors are now listed when checking the Envoy integration. ๐Ÿ‘

However, what I described above about the change of sensor name still holds. Was this change previously announced?

Normally when a sensor does not exist (anymore) you get an error in the HA UI card/element that tries to use it, but I get no error for sensor.envoy_current_energy_production.

gtdiehl commented 3 years ago

Finally got time to look into the issue.

Starting from the initial issue, the entities do not appear on the Integrations page due to the Unique ID not getting set. The Integrations page only shows entities for the integration that has a matching integration name. This match occurs when a unique id is set. If the unique id is not set the entity is still created but to view it from the Entities page you have to clear the Filter and search for entities with a type of Sensor. I believe this has been mentioned in a few comments above.

Looking into the code the Unique ID is not getting set for entities that are not inverters.

The async_setup_entry() method in sensor.py should get a config_entry with a parameter of unique_id. This parameter only gets set during async_step_zeroconf() in config_flow.py during initial setup.

I will look into adding the Envoy's device serial number during other methods in config_flow.py so the other entities have a unique id.

bdraco commented 3 years ago

I will look into adding the Envoy's device serial number during other methods in config_flow.py so the other entities have a unique id.

There are some examples in samsungtv and yeelight for cases where we had to add the unique id later

gtdiehl commented 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: Screen Shot 2021-09-06 at 12 44 24 PM Screen Shot 2021-09-06 at 12 44 49 PM Screen Shot 2021-09-06 at 12 45 00 PM

After

Now all have a Unique ID and a Enphase Envoy is listed as a Device: Screen Shot 2021-09-06 at 12 50 46 PM

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment ๐Ÿ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

bdraco commented 2 years ago

blocked by https://github.com/home-assistant/core/issues/60965