There was something mentioned about this in readme of latest version update IIRC. Maybe check that? And if you change over, let us know the results I will wait a bit longer before deciding to switch over or not, current solution works fine and has also active development so i donāt see a real benefit ATM.
Having this issue since upgrading to 2023.9 - the Current Power Production data coming from my Enphase Integration (which has been running fine for a year) has suddenly started putting out negative data. This obviously has major effects on the Energy Dashboard data. Has anyone else seen this?
Since 2023.9 (red line is where I updated) updated the native integration, do I need to delete and re-add the Enphase module?
If you are having an issue with the native integration, I would go to
and raise a problem there.
I did days ago and I came back to Enphase DEV because a lot of issues.
I will wait a while before try to change again.
I have 2 Enphase configurations. One with 3 phases (Envoy S Standard EU D5.0.55), one with 1 phase (Envoy S Metered EU D8.2.4225).
The D5.0.55 is working flawless in HA.
The D8.2.4225 Iām trying to get integrated since version D7 but nothing work. Iām using the latest v0.20 of GitHub - briancmpbll/home_assistant_custom_envoy
But for more than a year, I cannot get it integrated. Whatever I do. Iām using the enlighten username password, it filling in the envoy serial number automatically, āuse Enlightenā ticked onā¦
What else can I do? I never got this integrated into HA while the D5 version is perfect within HA.
Hello @jnathalia,
Have you tried logging into the device yourself via the browser?
This is exactly what the integration does on your behalf.
To attempt this, I am able to visit https://envoy.local/
Once I get past the security warnings, I am presented with the following login screen.
Press Login with Enphase
And then try your Enlighten login details.
If you are successful, you will see the following
and then you will see this indicating you are successfully logged in
If you are unable to do these steps successfully, then that is probably why the integration/addon canāt perform these steps on your behalf either.
Thanks @del13r,
I have followed your clear instructions with the following results:
Then I logged in with the correct Enlighten credentials:
Then going back to integration:
But it is still failingā¦ (although the error message is now simple as far as I can remember from yesterday when tweaking around againā¦)
Does it have something to do that Iām working with duckdns.org and https, so accessing from outside? However, I tested it by using my https://192.168.1.140:8123 and it doesnāt make a difference. Same errorā¦
You can add below to your configuration.yaml in the HA config folder. Then restart HA and try adding the envoy again. Inspect the home-assistant.log file for any indication of issues.
logger:
default: warning
logs:
custom_components.enphase_envoy: debug
httpx: debug
httpcore: debug
thanks @catsmanac as well for supporting me.
I found a few lines interesting (āFound empty token:ā):
2024-10-01 21:01:35.486 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Checking Token value: (Only first 10 characters shown)
2024-10-01 21:01:35.486 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Found empty token:
2024-10-01 21:01:35.487 DEBUG (MainThread) [httpx] load_ssl_context verify=True cert=None trust_env=True http2=False
2024-10-01 21:01:35.490 DEBUG (MainThread) [httpx] load_verify_locations cafile='/usr/local/lib/python3.12/site-packages/certifi/cacert.pem'
2024-10-01 21:01:35.505 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f4cd1be4d50>,) inside the event loop by custom integration 'enphase_envoy' at custom_components/enphase_envoy/envoy_reader.py, line 253: return self._async_client or httpx.AsyncClient(verify=True, (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 147: context.load_verify_locations(cafile=cafile)), please report it to the author of the 'enphase_envoy' custom integration
a bit further I found this (seems the token is ok)
2024-10-01 21:01:35.546 DEBUG (MainThread) [httpcore.connection] connect_tcp.started host='enlighten.enphaseenergy.com' port=443 local_address=None timeout=30 socket_options=None
2024-10-01 21:01:35.655 DEBUG (MainThread) [httpcore.connection] connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f4cd1f5f890>
2024-10-01 21:01:35.655 DEBUG (MainThread) [httpcore.connection] start_tls.started ssl_context=<ssl.SSLContext object at 0x7f4cd1be4d50> server_hostname='enlighten.enphaseenergy.com' timeout=30
2024-10-01 21:01:35.757 DEBUG (MainThread) [httpcore.connection] start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f4cd26b22d0>
2024-10-01 21:01:35.758 DEBUG (MainThread) [httpcore.http11] send_request_headers.started request=<Request [b'POST']>
2024-10-01 21:01:35.761 DEBUG (MainThread) [httpcore.http11] send_request_headers.complete
2024-10-01 21:01:35.761 DEBUG (MainThread) [httpcore.http11] send_request_body.started request=<Request [b'POST']>
2024-10-01 21:01:35.762 DEBUG (MainThread) [httpcore.http11] send_request_body.complete
2024-10-01 21:01:35.763 DEBUG (MainThread) [httpcore.http11] receive_response_headers.started request=<Request [b'POST']>
2024-10-01 21:01:37.597 DEBUG (MainThread) [httpcore.http11] receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Tue, 01 Oct 2024 19:01:37 GMT'), (b'Content-Type', b'application/json; charset=utf-8'), (b'Transfer-Encoding', b'chunked'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'max-age=0, private, must-revalidate'), (b'Content-Encoding', b'gzip'), (b'Content-Security-Policy', b"font-src 'self' https: data:; img-src 'self' http://www.google-analytics.com https: blob: data:; object-src 'none'; style-src 'self' https: 'unsafe-inline'; frame-ancestors https://*.enphaseenergy.com;"), (b'Etag', b'W/"a1d04fbe80aee798ddc7f3524775eaba"'), (b'Expect-Ct', b'max-age=1728000, enforce'), (b'Set-Cookie', b'locale=en; path=/; expires=Wed, 01 Oct 2025 19:01:35 GMT; secure; HttpOnly; SameSite=Lax'), (b'Set-Cookie', b'enlighten_manager_token_production=eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InNlc3Npb25faWQiOiIzM2M4NTFkYzdiMzFmNzkwYzBlOTA1NmI3Nzk5ZDM1MCIsImNvbXBhbnlfaWQiOm51bGwsImVtYWlsX2lkIjoiamVyb2VuQG5hdGhhbGlhYmVoZWVyLm5sIiwidXNlcl9pZCI6MzAwMTM5NiwiY2xpZW50X2FwcCI6Iml0azMiLCJmaXJzdF9uYW1lIjoiSmVyb2VuIiwibGFzdF9uYW1lIjoiTmF0aGFsaWEiLCJsb2dpbl91c2VyIjpudWxsLCJpc19kaXN0cmlidXRvciI6ZmFsc2V9LCJleHAiOjE3Mjg0MTQwOTcsInN1YiI6Implcm9lbkBuYXRoYWxpYWJlaGVlci5ubCJ9.KhJChtoRfz14SfInZhLSfIGQJmjEcHSFwaSpxfjrsdE; domain=.enphaseenergy.com; path=/; SameSite=None; secure'), (b'Set-Cookie', b'_enlighten_4_session=33c851dc7b31f790c0e9056b7799d350; path=/; secure; HttpOnly; SameSite=Lax'), (b'Status', b'200 OK'), (b'Strict-Transport-Security', b'max-age=15724800; includeSubDomains'), (b'X-Content-Type-Options', b'nosniff'), (b'X-Frame-Options', b'SAMEORIGIN'), (b'X-Powered-By', b'Phusion Passenger(R) 6.0.19'), (b'X-Request-Id', b'005a7ca03287dba60d0627180d9181e4'), (b'X-Runtime', b'1.730849'), (b'X-Xss-Protection', b'1; mode=block')])
2024-10-01 21:01:37.599 INFO (MainThread) [httpx] HTTP Request: POST https://enlighten.enphaseenergy.com/login/login.json "HTTP/1.1 200 OK"
2024-10-01 21:01:37.599 DEBUG (MainThread) [httpcore.http11] receive_response_body.started request=<Request [b'POST']>
2024-10-01 21:01:37.600 DEBUG (MainThread) [httpcore.http11] receive_response_body.complete
2024-10-01 21:01:37.601 DEBUG (MainThread) [httpcore.http11] response_closed.started
2024-10-01 21:01:37.601 DEBUG (MainThread) [httpcore.http11] response_closed.complete
2024-10-01 21:01:37.603 DEBUG (MainThread) [httpcore.connection] connect_tcp.started host='entrez.enphaseenergy.com' port=443 local_address=None timeout=30 socket_options=None
2024-10-01 21:01:37.710 DEBUG (MainThread) [httpcore.connection] connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f4cd8d3e5a0>
2024-10-01 21:01:37.710 DEBUG (MainThread) [httpcore.connection] start_tls.started ssl_context=<ssl.SSLContext object at 0x7f4cd1be4d50> server_hostname='entrez.enphaseenergy.com' timeout=30
2024-10-01 21:01:37.838 DEBUG (MainThread) [httpcore.connection] start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f4cd8d3dbe0>
2024-10-01 21:01:37.839 DEBUG (MainThread) [httpcore.http11] send_request_headers.started request=<Request [b'POST']>
2024-10-01 21:01:37.841 DEBUG (MainThread) [httpcore.http11] send_request_headers.complete
2024-10-01 21:01:37.841 DEBUG (MainThread) [httpcore.http11] send_request_body.started request=<Request [b'POST']>
2024-10-01 21:01:37.843 DEBUG (MainThread) [httpcore.http11] send_request_body.complete
2024-10-01 21:01:37.843 DEBUG (MainThread) [httpcore.http11] receive_response_headers.started request=<Request [b'POST']>
2024-10-01 21:01:38.018 DEBUG (MainThread) [httpcore.http11] receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Date', b'Tue, 01 Oct 2024 19:01:37 GMT'), (b'Content-Type', b'text/plain;charset=UTF-8'), (b'Content-Length', b'419'), (b'Connection', b'keep-alive'), (b'Strict-Transport-Security', b'max-age=15724800; includeSubDomains'), (b'server', b'hide'), (b'X-Content-Type-Options', b'nosniff')])
2024-10-01 21:01:38.018 INFO (MainThread) [httpx] HTTP Request: POST https://entrez.enphaseenergy.com/tokens "HTTP/1.1 200 OK"
2024-10-01 21:01:38.019 DEBUG (MainThread) [httpcore.http11] receive_response_body.started request=<Request [b'POST']>
2024-10-01 21:01:38.019 DEBUG (MainThread) [httpcore.http11] receive_response_body.complete
2024-10-01 21:01:38.020 DEBUG (MainThread) [httpcore.http11] response_closed.started
2024-10-01 21:01:38.020 DEBUG (MainThread) [httpcore.http11] response_closed.complete
2024-10-01 21:01:38.021 DEBUG (MainThread) [httpcore.connection] close.started
2024-10-01 21:01:38.022 DEBUG (MainThread) [httpcore.connection] close.complete
2024-10-01 21:01:38.023 DEBUG (MainThread) [httpcore.connection] close.started
2024-10-01 21:01:38.024 DEBUG (MainThread) [httpcore.connection] close.complete
2024-10-01 21:01:38.024 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Obtained Token
2024-10-01 21:01:38.025 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Token expires at: 2025-10-01 21:01:37
2024-10-01 21:01:38.032 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1 of 2: https://192.168.1.192/auth/check_jwt: use token: True: Header: <Token hidden> Timeout: 60 Holdoff: 0
2024-10-01 21:01:38.032 DEBUG (MainThread) [httpx] load_ssl_context verify=False cert=None trust_env=True http2=False
2024-10-01 21:01:38.036 DEBUG (MainThread) [httpcore.connection] connect_tcp.started host='192.168.1.192' port=443 local_address=None timeout=60 socket_options=None
Further, it looks like itās trying to connect again:
2024-10-01 21:02:38.038 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP Timeout in fetch_with_retry, waiting 0 sec:
2024-10-01 21:02:38.039 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2 of 2: https://192.168.1.192/auth/check_jwt: use token: True: Header: <Token hidden> Timeout: 60 Holdoff: 0
2024-10-01 21:02:38.039 DEBUG (MainThread) [httpx] load_ssl_context verify=False cert=None trust_env=True http2=False
2024-10-01 21:02:38.043 DEBUG (MainThread) [httpcore.connection] connect_tcp.started host='192.168.1.192' port=443 local_address=None timeout=60 socket_options=None
Further on:
2024-10-01 21:03:38.046 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP Timeout in fetch_with_retry, raising:
2024-10-01 21:03:38.061 WARNING (MainThread) [custom_components.enphase_envoy.config_flow] Validate input, getdata returned HTTPError:
So, maybe there is a problem with the tokenā¦
When I call the URL https://entrez.enphaseenergy.com/login I can type in the name of my Enphase instance and then the gateway appears. I can create the token.
When I select uncommissioned I can also create a token:
Should I define this token somewhere in my yaml?
It is actually retrieving a token successfully. The empty token at the start is as expected as you are adding the envoy. Then it reaches out to enphase and obtains a token which is valid till October 1, 2025.
2024-10-01 21:01:38.024 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Obtained Token
2024-10-01 21:01:38.025 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Token expires at: 2025-10-01 21:01:37
As a next step it is reaching out to your envoy to authenticate with the envoy, but no reply is returned, a timeout occurs. And it tries again to connect to the envoy
2024-10-01 21:01:38.032 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #1 of 2: https://192.168.1.192/auth/check_jwt: use token: True: Header: <Token hidden> Timeout: 60 Holdoff: 0
2024-10-01 21:02:38.038 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP Timeout in fetch_with_retry, waiting 0 sec:
2024-10-01 21:02:38.039 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP GET Attempt #2 of 2: https://192.168.1.192/auth/check_jwt: use token: True: Header: <Token hidden> Timeout: 60 Holdoff: 0
And times-out for the second time
2024-10-01 21:03:38.046 WARNING (MainThread) [custom_components.enphase_envoy.envoy_reader] HTTP Timeout in fetch_with_retry, raising:
2024-10-01 21:03:38.061 WARNING (MainThread) [custom_components.enphase_envoy.config_flow] Validate input, getdata returned HTTPError:
So the issue is that the Envoy is not replying to authentication requests with the token.
I assume you picked some parts from the log. There may be more detailed lines between the first connection attempt to the Envoy and the last failure, These may contain some more information.
What type of Enphase account do you have, installer/diy or home owner?
Iām a homeowner when looking into account details. System maintainer is someone else (the installer) unfortunately.
I have found this article and Iām testing it: Enphase Envoy - D7 firmware with JWT - A Different Approach
Although the sun is not shining at all, the sensors have been created and measuring 0 Watt at the momentā¦ I hope the sun comes to make me more happy with some figures and overcome the autumn
EDIT: this is actually close to this threadā¦ what a mistake! When I go to top, I see the final implementation. Great workā¦! Thanks @del13r
I think things are working, however I receive 0 kWh produced.
When looking into more detail, I have noticed https://envoy.local shows 0 Watt production:
This must be an Enphase thing instead of a HA integration issue. It might go beyond this topic, but should I make some settings at the Enphase instance? Iām homeowner or do I need to kick out my system maintainer?
Also, I donāt think my installer has installed a CT clamp. But how is it possible I can see the production at https://enlighten.enphaseenergy.com? Is this because of the Envoy and its cloud connection? Does this integration only work if you have a physical CT clamp?
I do have a P1 reader, so my consumption and/or export back into net is already visable in HA.
You can check if the Enphase Website or the Enphase App are showing production data?
I was just editing my own reply aboveā¦
Yes, when using https://enlighten.enphaseenergy.com I can see the production dataā¦
Looks like you have CT clamps as the envoy page is showing a ''metering" heading as well as production and consumption. Mine, which is non metered only shows micro inverter production.
I donāt know what data Enphase all gets from the Envoy and maybe it uses inverter data to report production.
The 0 production number shown on the Envoy page at 1pm seems very low. Enphase signals 54 watt around 2 pm. Unless itās pitch dark, even under rainy conditions panels typically produce a little bit. The 54 watt reported by Enlighten over 12 panels is 4.5 watt for each panel. Almost as if the production CT is not reporting properly. Iād expect some small values and also that the lifetime value would increase over time.
If HA is reporting same values as what you see on that Envoy webpage itās indeed something with the Envoy and not HA.
I have physically checked the Envoy. There are only the phase and neutral wire connected, no wires for a clamp (1 phase).
I think it is because of the model: Envoy-S-Metered-EU. As far as I know, the connection of clamps is optionalā¦
I will look for settings to turn off the meteringā¦ or maybe someone else has experience?
Envoy metered without installed/configured CT behaves different. In the HA Enphase Envoy Core integration we have some checks for this and use data from different source data if this is the case:
envoy metered without configured CT has whLifetime and wNow in inverters
whLastSevenDays and whToday are incorrect for both so either can be used
So you may need to change your rest setup to use wattHoursLifetime and wattsNow from /api/v1/production.
{
"wattHoursToday": 36462,
"wattHoursSevenDays": 189712,
"wattHoursLifetime": 6139406,
"wattsNow": 5740
}
I found this diagram for the 230V 50hz (Europe and Australia might be the same) version of the Envoy-S Metered.
When reading, my Envoy S Metered should have a CT clamp for production (which is not installed). Optional is a CT clamp for consumption.
I will contact my installer to ask why he didnāt install.