I rebooted my HAOS. Didn’t reboot the IQ Envoy. That needs to be done outside at the breaker panel.
I don’t believe Enphase forces firmware updates, but if you have issues with your Envoy or micro-inverters, you can call them and ask them to push the update to you. They don’t auto-update.
I am using this integration with async fix taken from posixx. It’s better to use posixx btw, I m just too busy with other things, not touching HA.
To use the integration you must have the enlighten app account. Then use the username and password, thick “use enlighten” option.
Ah, that was the trick.
I wrongfully assumed it would prompt me for the username and password due to the Use Enlighten box being enabled.
I am using @briancmpbll’s integration with HA 2023.3.6 but you mention that I should use @posixx’s integration, I’m confused as to why.
I mentioned posixx because he updated his. I saw brian also. So, either one should be good, we don’t have much choice.
The HA official integration hasn’t been updated, probably the developers are still using the old firmware.
I have D7 firmware, an encharge battery and solar. Would like to be able to get battery percentage(or kWH remaining) , house and battery power draw. High preference on this being local.
Does anyone have recommendations on which integration to use?
Posixx appear to be an ok integration.
Running @briancmpbll version since mid Feb when my panels where installed with D7 firmware from the get go. Envoy is connected using wire, not wifi, was auto-detected and all running fine.
I tried making the riemann helper, and added the template to my configuration.yaml but it is not working, I get errors “statistics_not_defined” & entity not available
FYI - Received the following email from Enphase on 2023-04-15. The gist is:
- they are starting to roll out the new software widely.
- They’ve renamed the Envoy to the Enphase IQ Gateway.
- Docs: https://enphase.com/download/accessing-iq-gateway-local-apis-or-local-ui-token-based-authentication
No clue as to how soon it will be. I’m considering reaching out to Enphase Support to see if I can defer the update for a while to make sure the Home Assistant integration gets updated.
Subject: Security enhancements to Enphase IQ Gateway API
To our valued partners and customers,
At Enphase, we take security seriously. We want to ensure that all customers and stakeholders have access to the most secure and reliable operating environment possible.
We’ll be updating the API security protocols associated with the software running on the IQ Gateway, and we’re writing to share information about these changes with all Enphase homeowners, installers, software developers, and partners who may be affected.
These updates have begun propagating across accounts and will continue to roll out over time to all accounts. If you’re creating, using, or maintaining custom monitoring software that relies on interactions with IQ Gateway local interfaces, formally known as Envoy, this critical information will require your review and potential action.
Here is a summary of the changes that will go into effect with release 07.03.120 and higher:
Added a new capability to generate and authenticate secure access tokens via web UI to secure all custom applications and API calls. Documentation now includes examples of how to use URLs to get tokens programmatically using shell script-based or Python-based methods. Revised documentation also explains how to connect securely using the updated IQ Gateway local UI and/or IQ Gateway APIs.
Note that if your system is a beta system, an IQ8 system, or an IQ Battery-based system, you may already be running version 07.03.120 or higher on your Gateway.
Complete and newly updated API documentation is available here.
If you have further questions or require additional support after consulting the updated API documentation, please reach out for support.
We’re here to help, and the small investment of time and resources required to enhance these security protocols will be well worth it to safeguard the health and uninterrupted function of your Enphase systems.
Thank you,
The Enphase Team
To our valued partners and customers,At Enphase, we take security seriously. We want to ensure that all customers and stakeholders have access to the most secure and reliable operating environment possible.
We’ll be updating the API security protocols associated with the software running on the IQ Gateway, and we’re writing to share information about these changes with all Enphase homeowners, installers, software developers, and partners who may be affected.
These updates have begun propagating across accounts and will continue to roll out over time to all accounts. If you’re creating, using, or maintaining custom monitoring software that relies on interactions with IQ Gateway local interfaces, formally known as Envoy, this critical information will require your review and potential action.
Here is a summary of the changes that will go into effect with release 07.03.120 and higher:
- Added a new capability to generate and authenticate secure access tokens via web UI to secure all custom applications and API calls.
- Documentation now includes examples of how to use URLs to get tokens programmatically using shell script-based or Python-based methods.
- Revised documentation also explains how to connect securely using the updated IQ Gateway local UI and/or IQ Gateway APIs.
Note that if your system is a beta system, an IQ8 system, or an IQ Battery-based system, you may already be running version 07.03.120 or higher on your Gateway.
Complete and newly updated API documentation is available here.
If you have further questions or require additional support after consulting the updated API documentation, please reach out for support.
We’re here to help, and the small investment of time and resources required to enhance these security protocols will be well worth it to safeguard the health and uninterrupted function of your Enphase systems.
Thank you,
The Enphase Team
FYI the code owner hasn’t been active for a year. I’m not sure how soon a new API would be implemented.
ugh mine just got updated today without my knowledge to version 7. what are you guys using for HACS integration now?
the integration from Posixx works like a charm.
thank you!
This just happened to me as well. Upgraded to V7 which killed connectivity for the classic integration.
I’m trying to use the posixx fork, but for the life of me, I can’t get the authentication working (times out with “unknown error” after about 60 seconds). Have I overlooked something obvious? Any tips appreciated!!
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/enphase_envoy/envoy_reader.py:197
Integration: Enphase Envoy
First occurred: 2:06:09 PM (1 occurrences)
Last logged: 2:06:09 PM
Error setting up entry Envoy 122035061711 for enphase_envoy
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/anyio/streams/tls.py", line 130, in _call_sslobject_method
result = func(*args)
File "/usr/local/lib/python3.10/ssl.py", line 917, in read
v = self._sslobj.read(len)
ssl.SSLWantReadError: The operation did not complete (read) (_ssl.c:2548)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/enphase_envoy/__init__.py", line 99, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in async_config_entry_first_refresh
await self._async_refresh(
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 195, in _async_update_data
return await self.update_method()
File "/config/custom_components/enphase_envoy/__init__.py", line 50, in async_update_data
await envoy_reader.getData()
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 387, in getData
await self.detect_model()
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 422, in detect_model
await self._update_from_pc_endpoint()
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 156, in _update_from_pc_endpoint
await self._update_endpoint(
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 181, in _update_endpoint
response = await self._async_fetch_with_retry(
File "/config/custom_components/enphase_envoy/envoy_reader.py", line 197, in _async_fetch_with_retry
resp = await client.get(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 112, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 91, in handle_async_request
) = await self._receive_response_headers(**kwargs)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 155, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 191, in _receive_event
data = await self._network_stream.read(
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 34, in read
return await self._stream.receive(max_bytes=max_bytes)
File "/usr/local/lib/python3.10/site-packages/anyio/streams/tls.py", line 195, in receive
data = await self._call_sslobject_method(self._ssl_object.read, max_bytes)
File "/usr/local/lib/python3.10/site-packages/anyio/streams/tls.py", line 137, in _call_sslobject_method
data = await self.transport_stream.receive()
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1265, in receive
await self._protocol.read_event.wait()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError
This add-on works with the token authentication and D7.0.88 you need to select use enlighten and use your enlighten username and password to login to the website so it can generate the token to gain local access.
Install GitHub - briancmpbll/home_assistant_custom_envoy by adding GitHub - briancmpbll/home_assistant_custom_envoy as a custom repositories in HACS, restart then add it as an integration
Appreciate the reply.
I was using the authentication credentials as noted, but it still came back with “unknown error” for some reason. This was on the 2022.3 release.
Upgraded HA to the 2022.4 release and it’s working now.
Thanks!
Has anyone figured out a way to get the “lifetime energy” numbers?
Before an automatic firmware update (I assume) broke the core integration for me, I had the “lifetime energy production” numbers. I now have the posixx repo running, which works for current production, but not lifetime energy.
A Riemann sum integral will be less accurate than getting the lifetime numbers from Enlighten. Has anyone figured a work around? Even polling from the cloud would be okay. I’ve tried playing (just a bit) with the v4 API but can’t seem to get it working.
I am currently using the posixx repo and I have the lifetime numbers, so they are in there.
Hi,
Here are the lifetime sensors using the built in HA core integration with D5 firmware.
https://github.com/home-assistant/core/tree/dev/homeassistant/components/enphase_envoy
In the diagram below:
energy imported is shown in blue as the transmission tower on the left
energy exported is shown as purple as the transmission tower on the left
energy production is shown as yellow the lighning bolt in the middle
energy consumption is shown as the house on the right
The lifetime figures you are asking about, only cover 2 of the 4 key elements shown in the energy dashboard.
It is impossible to obtain the blue/purple transmission tower part of this diagram (Grid Import and Grid Export) without performing Riemann sum integral on the difference between the consumption power and production power figures.
The logic used on the difference of the power figures (kW) cannot be successfully used on the energy figures (kWh).
For example, the diagram above shows 19.3 kWh production and 13.6 kWh production. If we use the difference logic, I get 19.3 production - 13.6 consumption = 5.7 kWh exported to grid.
Compare that with my dashboard, and this number does not give us seperate 1.8 kWh grid in and 7.5 kWh grid out, but rather a difference between the 2 numbers (7.5 - 1.8 = 5.7) represented as either Net returned to or Net consumed from the grid.