Giter Site home page Giter Site logo

Comments (23)

vincentwolsink avatar vincentwolsink commented on June 2, 2024

Hi @posixx, do you have any other script/integration/job running that uses the installer account to connect to your Envoy? The Envoy only allows one installer session at a time.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

No nothing that i'm aware of. On PC and Phone i use owner account when using enlighten.

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

Does this happen only for the binary sensors (producing/communicating) or also for the other sensors? And how many solar panels do you have installed?

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

It happens on all devices so it seems like a general disconnect. I have 36 panels

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

Does it happen around a fixed time? Can you maybe enable debug logging for the integration a bit before that time and send the log to me, so I can check the response from the Envoy?

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

Around every hour, but not fixed. Enabled debug logging, will send an update when it happens again.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

It happened again after 67 minutes after restart. Upon restart and after 67 minutes what i see in hte eventlog:

2023-05-16 14:54:12.110 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Checking Token value:
2023-05-16 14:54:12.110 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Found empty token:
2023-05-16 14:54:15.562 DEBUG (MainThread) [custom_components.enphase_envoy.envoy_reader] Commissioned Token valid for 364.99999349197304 days

So it looks like it is getting a new token every hour? It sure has to do with these lines..

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

Interesting, because it claims the token validity is a year there. Owner tokens are valid for a year, installer tokens only for 12 hours. Your installer account, is it a true installer account or a DHZ one?

Can you also maybe give a bit more context around this? The HTTP request just before the token refresh for example.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

I have a installer account no DHZ.

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

@posixx The url returns a page not found.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

Well then someone else has downloaded it. Sorry i don't have any mailadres or someting to reach you

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

Hi @posixx, do you have any other script/integration/job running that uses the installer account to connect to your Envoy? The Envoy only allows one installer session at a time.

I have created an installer account and connected it to my system. The original installer (the company who installed panels and configured everything) also still has connection to my system. Could that be the issue? Cannot imagine this would cause the problem as this installer doesn’t have access to internal ip etc..

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

The limitation is on the local connection. The installer company uses the Enphase cloud so that is not an issue.

Can you please send the debug log to this (temporary) email: [email protected]

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

Done!

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

Thanks. In the logfile I see it is reusing the token like it should, but suddenly at 16:01 it either starts another update parallel to the regular one, or it crashed halfway during the run and lost the token (although I don't see any exceptions or errors).

Which version of Home Assistant are you running?

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

Thanks. In the logfile I see it is reusing the token like it should, but suddenly at 16:01 it either starts another update parallel to the regular one, or it crashed halfway during the run and lost the token (although I don't see any exceptions or errors).

Which version of Home Assistant are you running?

Latest, 2023.5.3

Also, every day at exactly 23:00 and/or 0:00 i get a timeout on the envoy:

2023-05-16 23:00:42.448 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data
2023-05-17 23:01:36.229 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data
2023-05-18 23:01:46.359 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data
2023-05-19 00:01:19.357 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data
2023-05-20 23:01:47.160 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data
2023-05-21 00:01:25.252 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data
2023-05-22 00:00:49.062 ERROR (MainThread) [custom_components.enphase_envoy] Timeout fetching envoy Envoy xxxxxxxxxxxxxx data

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

The timeout on the Envoy must be something outside the integration, so either on the Envoy itself, the network etc. I cannot reproduce the issue with the token currently. It is very suspicious that the token issue happens every hour. Actually the code around tokens did not change between this and your integration at all. What if you run your own versions of the integration with your installer account, does it also have the issue? And what about if you run it with your owner account?

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

I never used my own fork with the D7 firmware; i switched over to yours. Also i didn't touch the token code nor did i look at it to understand it; i only expanded the repo from brian to include the 3-phase sensors. I will do some test if i find the time for it.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

I switched to my fork with installer login and will update tomorrow.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

Vincent,

Not a single disconnect using my fork for mort than a day:

afbeelding

The timeout messages are still there in the HA log at 23u or 00u.

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

Then the issue is not in the token code, since that didn’t change between forks. Maybe something with the high number of sensors. But currently I have no way of debugging this since I cannot reproduce the issue.

from home_assistant_enphase_envoy_installer.

posixx avatar posixx commented on June 2, 2024

OK, then i will continue to use my fork for now..

from home_assistant_enphase_envoy_installer.

vincentwolsink avatar vincentwolsink commented on June 2, 2024

@posixx You could also help me and maybe others by doing some debugging for me, since you are also somewhat familiar with the code.

from home_assistant_enphase_envoy_installer.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.