-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enphase Gateway (Envoy) API changes #53
Comments
I just got the email today from Enphase regarding the push of the new firmware with update API and documentation. Good to know that this was already posted here. Thank you dlmcpaul, really appreciate your work on this project. Here is the full email for reference: 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:
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 |
Hmm a quick read suggests that not much has changed. They look to have added a more direct code friendly URL for authenticating to their website. |
I have made some code changes to support the documented method. Any volunteers to test in a real system? Hmm actually it also looks like they have removed the need to generate the session token as well so this will probably not work. Still who wants to test? |
Sadly I dont have installer access to my gateway to install the latest firmware, otherwise I would. I just have to wait I suppose. Once I get the latest firmware, I am happy to give the updates a go. If I can find a way to get into the gateway to do the update, I will let you know. Thanks for the quick updates! |
using using
|
You look to be running release 0.26 instead of from the current code base but I can see that the current code base is failing to log into the enphase website. Thinks it logged in but got a null token. Please try building from source and running that. com.hz.utils.EnphaseJWTExtractor : Attempting to Login with a Form Submit |
Please test against the 0.27 release. |
Appreciate this great project! I'd like to try it out, but I'm having trouble connecting the docker container to my V7 envoy. It seems to be having trouble with authentication (either with username/password or with ENVOY_BEARER_TOKEN). Have I overlooked something?
|
I've had a similar issue. I had to use a token instead of username/password.
…-Steffen
On Thu, May 4, 2023 at 1:21 PM rice1204 ***@***.***> wrote:
Appreciate this great project!
I'd like to try it out, but I'm having trouble connecting the docker
container to my V7 envoy. It seems to be having trouble with authentication
(either with username/password or with ENVOY_BEARER_TOKEN).
Have I overlooked something?
> docker run -it -e ENVOY_CONTROLLER_HOST=192.168.5.10 -e ***@***.*** -e ENVOY_ENPHASE_WEB_PASSWORD=xxxxxx dlmcpaul/enphasecollector
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.6)
2023-05-04T19:54:54.114Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : Starting EnphaseCollectorApplication using Java 17.0.7 with PID 7 (/app started by root in /)
2023-05-04T19:54:54.118Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-04T19:54:54.993Z INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-05-04T19:54:55.057Z INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 56 ms. Found 5 JPA repository interfaces.
2023-05-04T19:54:55.738Z WARN 7 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2023-05-04T19:54:55.756Z INFO 7 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2023-05-04T19:54:55.758Z INFO 7 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1432 ms
2023-05-04T19:54:55.960Z INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 9.5.1 by Redgate
2023-05-04T19:54:55.960Z INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.5.1
2023-05-04T19:54:55.960Z <https://flywaydb.org/documentation/learnmore/releaseNotes#9.5.12023-05-04T19:54:55.960Z> INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter :
2023-05-04T19:54:55.967Z INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2023-05-04T19:54:56.133Z INFO 7 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:/internal_db/solar_stats_db_v2 user=SA
2023-05-04T19:54:56.135Z INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2023-05-04T19:54:56.145Z INFO 7 --- [ main] o.f.c.i.database.base.BaseDatabaseType : Database: jdbc:h2:/internal_db/solar_stats_db_v2 (H2 2.1)
2023-05-04T19:54:56.190Z INFO 7 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.009s)
2023-05-04T19:54:56.196Z INFO 7 --- [ main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ...
2023-05-04T19:54:56.215Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >>
2023-05-04T19:54:56.225Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version "1 - InitSchema"
2023-05-04T19:54:56.241Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version "2 - MigrateH2DatabaseToV2"
2023-05-04T19:54:56.245Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Successfully applied 2 migrations to schema "PUBLIC", now at version v2 (execution time 00:00.031s)
2023-05-04T19:54:56.304Z INFO 7 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-05-04T19:54:56.340Z INFO 7 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.7.Final
2023-05-04T19:54:56.342Z INFO 7 --- [ main] org.hibernate.cfg.Environment : HHH000205: Loaded properties from resource hibernate.properties: {hibernate.type.preferred_instant_jdbc_type=TIMESTAMP, hibernate.bytecode.use_reflection_optimizer=false, hibernate.id.db_structure_naming_strategy=single, hibernate.bytecode.provider=none, hibernate.type.preferred_duration_jdbc_type=BIGINT}
2023-05-04T19:54:56.479Z INFO 7 --- [ main] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2023-05-04T19:54:56.499Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_duration_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T19:54:56.500Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T19:54:56.628Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.id.db_structure_naming_strategy]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T19:54:56.634Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.id.db_structure_naming_strategy]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T19:54:56.644Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_duration_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T19:54:56.644Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T19:54:57.014Z INFO 7 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-05-04T19:54:57.022Z INFO 7 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-05-04T19:54:57.524Z INFO 7 --- [ main] c.h.c.EnphaseSystemInfoConfig : Reading system information from Envoy controller endpoint http://192.168.5.10/info.xml
2023-05-04T19:55:06.059Z INFO 7 --- [ main] com.hz.utils.MetricCalculatorStandard : Standard Consumption Metric Calculator Activated
2023-05-04T19:55:06.151Z INFO 7 --- [ main] io.undertow : starting server: Undertow - 2.3.5.Final
2023-05-04T19:55:06.157Z INFO 7 --- [ main] org.xnio : XNIO version 3.8.8.Final
2023-05-04T19:55:06.165Z INFO 7 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.8.8.Final
2023-05-04T19:55:06.222Z INFO 7 --- [ main] org.jboss.threads : JBoss Threads version 3.5.0.Final
2023-05-04T19:55:06.259Z INFO 7 --- [ main] o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s) 8080 (http) with context path '/solar'
2023-05-04T19:55:06.309Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : Started EnphaseCollectorApplication in 12.552 seconds (process running for 12.916)
2023-05-04T19:55:06.450Z INFO 7 --- [ main] com.hz.services.LocalDBService : Summarising Event table prior to 2023-05-04T00:00
^C2023-05-04T19:56:21.161Z INFO 7 --- [ionShutdownHook] io.undertow : stopping server: Undertow - 2.3.5.Final
2023-05-04T19:56:21.168Z INFO 7 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-05-04T19:56:21.171Z INFO 7 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2023-05-04T19:56:21.168Z ERROR 7 --- [ scheduling-1] com.hz.services.EnvoyService : Failed to retrieve Solar stats. Exception was I/O error on GET request for "http://192.168.5.10/production.json": Socket closed
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://192.168.5.10/production.json": Socket closed
at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:888) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:868) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:764) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:378) ~[spring-web-6.0.8.jar:6.0.8]
at com.hz.services.EnvoyService.getProductionData(EnvoyService.java:130) ~[app/:na]
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2PAI7MQYCJDALCFDY6NKTXEQFVDANCNFSM6AAAAAAW6VLNYQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks for the tip. I'm getting similar results with token auth too. Is it something wrong with my docker command? docker run -it -e ENVOY_CONTROLLER_HOST=192.168.5.10 -e ENVOY_BEARER_TOKEN=[super_long_token] dlmcpaul/enphasecollector
|
This log doesn't have the error, so it looks like it's working.
That or you didn't wait long so the error hasn't show up. That "Summarising
Event table prior to" step can take a while, so be patient.
…-Steffen
On Thu, May 4, 2023 at 3:13 PM rice1204 ***@***.***> wrote:
Thanks for the tip. I'm getting similar results with token auth too. Is it
something wrong with my docker command?
*docker run -it -e ENVOY_CONTROLLER_HOST=192.168.5.10 -e
ENVOY_BEARER_TOKEN=[super_long_token] dlmcpaul/enphasecollector*
Failed to retrieve Solar stats. Exception was I/O error on GET request for "http://192.168.5.10/production.json": Socket closed
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.6)
2023-05-04T22:09:59.038Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : Starting EnphaseCollectorApplication using Java 17.0.7 with PID 7 (/app started by root in /)
2023-05-04T22:09:59.043Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-04T22:09:59.981Z INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-05-04T22:10:00.062Z INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 73 ms. Found 5 JPA repository interfaces.
2023-05-04T22:10:00.799Z WARN 7 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2023-05-04T22:10:00.818Z INFO 7 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2023-05-04T22:10:00.820Z INFO 7 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1576 ms
2023-05-04T22:10:01.047Z INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 9.5.1 by Redgate
2023-05-04T22:10:01.047Z INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter : See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.5.1
2023-05-04T22:10:01.047Z <https://flywaydb.org/documentation/learnmore/releaseNotes#9.5.12023-05-04T22:10:01.047Z> INFO 7 --- [ main] o.f.c.internal.license.VersionPrinter :
2023-05-04T22:10:01.056Z INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2023-05-04T22:10:01.253Z INFO 7 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:/internal_db/solar_stats_db_v2 user=SA
2023-05-04T22:10:01.255Z INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2023-05-04T22:10:01.268Z INFO 7 --- [ main] o.f.c.i.database.base.BaseDatabaseType : Database: jdbc:h2:/internal_db/solar_stats_db_v2 (H2 2.1)
2023-05-04T22:10:01.318Z INFO 7 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 2 migrations (execution time 00:00.009s)
2023-05-04T22:10:01.324Z INFO 7 --- [ main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table "PUBLIC"."flyway_schema_history" ...
2023-05-04T22:10:01.347Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema "PUBLIC": << Empty Schema >>
2023-05-04T22:10:01.357Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version "1 - InitSchema"
2023-05-04T22:10:01.377Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema "PUBLIC" to version "2 - MigrateH2DatabaseToV2"
2023-05-04T22:10:01.382Z INFO 7 --- [ main] o.f.core.internal.command.DbMigrate : Successfully applied 2 migrations to schema "PUBLIC", now at version v2 (execution time 00:00.037s)
2023-05-04T22:10:01.444Z INFO 7 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-05-04T22:10:01.486Z INFO 7 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.7.Final
2023-05-04T22:10:01.494Z INFO 7 --- [ main] org.hibernate.cfg.Environment : HHH000205: Loaded properties from resource hibernate.properties: {hibernate.type.preferred_instant_jdbc_type=TIMESTAMP, hibernate.bytecode.use_reflection_optimizer=false, hibernate.id.db_structure_naming_strategy=single, hibernate.bytecode.provider=none, hibernate.type.preferred_duration_jdbc_type=BIGINT}
2023-05-04T22:10:01.643Z INFO 7 --- [ main] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2023-05-04T22:10:01.665Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_duration_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T22:10:01.668Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T22:10:01.806Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.id.db_structure_naming_strategy]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T22:10:01.811Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.id.db_structure_naming_strategy]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T22:10:01.822Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_duration_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T22:10:01.822Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-04T22:10:02.198Z INFO 7 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-05-04T22:10:02.206Z INFO 7 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-05-04T22:10:02.724Z INFO 7 --- [ main] c.h.c.EnphaseSystemInfoConfig : Reading system information from Envoy controller endpoint http://192.168.5.10/info.xml
2023-05-04T22:10:12.537Z INFO 7 --- [ main] com.hz.utils.MetricCalculatorStandard : Standard Consumption Metric Calculator Activated
2023-05-04T22:10:12.655Z INFO 7 --- [ main] io.undertow : starting server: Undertow - 2.3.5.Final
2023-05-04T22:10:12.664Z INFO 7 --- [ main] org.xnio : XNIO version 3.8.8.Final
2023-05-04T22:10:12.670Z INFO 7 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.8.8.Final
2023-05-04T22:10:12.744Z INFO 7 --- [ main] org.jboss.threads : JBoss Threads version 3.5.0.Final
2023-05-04T22:10:12.788Z INFO 7 --- [ main] o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s) 8080 (http) with context path '/solar'
2023-05-04T22:10:12.845Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : Started EnphaseCollectorApplication in 14.182 seconds (process running for 14.706)
2023-05-04T22:10:12.991Z INFO 7 --- [ main] com.hz.services.LocalDBService : Summarising Event table prior to 2023-05-04T00:00
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2PAIZQ736MZYN7WMVX2IDXEQSYZANCNFSM6AAAAAAW6VLNYQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hmm, with the switch to V7 firmware I think you need SSL when connecting to the envoy. Can you try adding ENVOY_CONTROLLER_PORT=443 |
Thanks, but sadly, still no luck. At least the docker image is connecting now with https, so I'm getting closer! Just to reconfirm, the ENVOY_BEARER_TOKEN is supposed to be the one manually retrieved from https://entrez.enphaseenergy.com/entrez_tokens right?
|
Let's make sure the givens are given.
Can you go to https://192.168.5.10/home.json?
It should say not authorized, and bring you to the sign in page. Sign in
with either method and then go to https://192.168.5.10/home.json again. It
should work the second time
…On Thu, May 4, 2023, 18:21 rice1204 ***@***.***> wrote:
Thanks, but sadly, still no luck. At least the docker image is connecting
now with https, so I'm getting closer!
Looks like authentication still the hangup for me. I bet it's something
really simple I'm overlooking.
Just to reconfirm, the ENVOY_BEARER_TOKEN is supposed to be the one
manually retrieved from https://entrez.enphaseenergy.com/entrez_tokens
right?
docker run -it -e ENVOY_CONTROLLER_PORT=443 -e ENVOY_CONTROLLER_HOST=192.168.5.10 -e ENVOY_BEARER_TOKEN=[super long string] -p 8080:8080 dlmcpaul/enphasecollector
2023-05-05T01:15:54.651Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.id.db_structure_naming_strategy]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-05T01:15:54.661Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_duration_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-05T01:15:54.661Z WARN 7 --- [ main] org.hibernate.orm.incubating : HHH90006001: Encountered incubating setting [hibernate.type.preferred_instant_jdbc_type]. See javadoc on corresponding `org.hibernate.cfg.AvailableSettings` constant for details.
2023-05-05T01:15:55.020Z INFO 7 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-05-05T01:15:55.027Z INFO 7 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-05-05T01:15:55.536Z INFO 7 --- [ main] c.h.c.EnphaseSystemInfoConfig : Reading system information from Envoy controller endpoint https://192.168.5.10/info.xml
2023-05-05T01:15:56.089Z INFO 7 --- [ main] com.hz.utils.MetricCalculatorStandard : Standard Consumption Metric Calculator Activated
2023-05-05T01:15:56.175Z INFO 7 --- [ main] io.undertow : starting server: Undertow - 2.3.5.Final
2023-05-05T01:15:56.181Z INFO 7 --- [ main] org.xnio : XNIO version 3.8.8.Final
2023-05-05T01:15:56.189Z INFO 7 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.8.8.Final
2023-05-05T01:15:56.246Z INFO 7 --- [ main] org.jboss.threads : JBoss Threads version 3.5.0.Final
2023-05-05T01:15:56.285Z INFO 7 --- [ main] o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s) 8080 (http) with context path '/solar'
2023-05-05T01:15:56.327Z INFO 7 --- [ main] com.hz.EnphaseCollectorApplication : Started EnphaseCollectorApplication in 4.577 seconds (process running for 5.097)
2023-05-05T01:15:56.464Z INFO 7 --- [ main] com.hz.services.LocalDBService : Summarising Event table prior to 2023-05-05T00:00
^C2023-05-05T01:16:57.816Z INFO 7 --- [ionShutdownHook] io.undertow : stopping server: Undertow - 2.3.5.Final
2023-05-05T01:16:57.822Z INFO 7 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-05-05T01:16:57.825Z INFO 7 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2023-05-05T01:16:57.827Z INFO 7 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2023-05-05T01:16:57.823Z ERROR 7 --- [ scheduling-1] com.hz.services.EnvoyService : Failed to retrieve Solar stats. Exception was I/O error on GET request for "https://192.168.5.10/home.json": Socket closed
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://192.168.5.10/home.json": Socket closed
at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:888) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:868) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:764) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.getForEntity(RestTemplate.java:405) ~[spring-web-6.0.8.jar:6.0.8]
at com.hz.services.EnvoyService.getSystemData(EnvoyService.java:46) ~[app/:na]
at com.hz.services.EnvoyService.collectEnphaseData(EnvoyService.java:57) ~[app/:na]
at com.hz.services.OutputManager.gather(OutputManager.java:47) ~[app/:na]
at jdk.internal.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-6.0.8.jar:6.0.8]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.0.8.jar:6.0.8]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: java.net.SocketException: Socket closed
at java.base/sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:248) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:327) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803) ~[na:na]
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:976) ~[na:na]
at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:484) ~[na:na]
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:478) ~[na:na]
at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1465) ~[na:na]
at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:1069) ~[na:na]
at org.apache.hc.core5.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:149) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.core5.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.core5.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:241) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.core5.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:53) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:298) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.core5.http.impl.io.HttpRequestExecutor.execute(HttpRequestExecutor.java:175) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.core5.http.impl.io.HttpRequestExecutor.execute(HttpRequestExecutor.java:218) ~[httpcore5-5.1.5.jar:5.1.5]
at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.execute(PoolingHttpClientConnectionManager.java:583) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.execute(InternalExecRuntime.java:212) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.MainClientExec.execute(MainClientExec.java:105) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:182) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:190) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:96) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:133) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:115) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) ~[httpclient5-5.1.4.jar:5.1.4]
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:54) ~[httpclient5-5.1.4.jar:5.1.4]
at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:93) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.http.client.BufferingClientHttpRequestWrapper.executeInternal(BufferingClientHttpRequestWrapper.java:56) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-6.0.8.jar:6.0.8]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:862) ~[spring-web-6.0.8.jar:6.0.8]
... 16 common frames omitted
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2PAI5ZQJRGJ7EZRKFFEU3XERIZPANCNFSM6AAAAAAW6VLNYQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yup, works with manual sign-in :) home.json |
Well there are no errors in the logs about acquiring the token and if the token is invalid you should get an authorisation error not a socket error. Is the code working for anybody else? Also any chance I can get a copy of https://192.168.5.10/info.xml |
I'm running latest dockerimage and it's working for me.
…On Thu, May 4, 2023, 20:20 dlmcpaul ***@***.***> wrote:
Well there are no errors in the logs about acquiring the token and if the
token is invalid you should get an authorisation error not a socket error.
Is the code working for anybody else?
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2PAIYS2MN6GSRRX2ZONXLXERWYLANCNFSM6AAAAAAW6VLNYQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok so maybe it is just a version thing. Let's see what info.xml shows as the version and maybe we need some tweaks depending on what version of 7 is being run. |
|
So D7.3.120 is not working @drache42 what version you on? |
I am also running 7.3.120
This XML file does not appear to have any style information associated with
it. The document tree is shown below.
<envoy_info>
<time>1683303759</time>
<device>
<sn>202241056076</sn>
<pn>800-00655-r09</pn>
<software>D7.3.120</software>
<euaid>4c8675</euaid>
<seqnum>0</seqnum>
<apiver>1</apiver>
<imeter>true</imeter>
</device>
<web-tokens>true</web-tokens>
<package name="rootfs">
<pn>500-00001-r01</pn>
<version>02.00.00</version>
<build>1210</build>
</package>
<package name="kernel">
<pn>500-00011-r02</pn>
<version>04.04.225</version>
<build>3eb4d3</build>
</package>
<package name="boot">
<pn>590-00019-r01</pn>
<version>02.00.01</version>
<build>1f421b</build>
</package>
<package name="app">
<pn>500-00002-r01</pn>
<version>07.03.120</version>
<build>ac5b3c</build>
</package>
<package name="devimg">
<pn>500-00004-r01</pn>
<version>01.02.413</version>
<build>9c64cd</build>
</package>
<package name="geo">
<pn>500-00008-r01</pn>
<version>02.01.24</version>
<build>a74d96</build>
</package>
<package name="backbone">
<pn>500-00010-r01</pn>
<version>07.00.20</version>
<build>176d57</build>
</package>
<package name="meter">
<pn>500-00013-r01</pn>
<version>03.02.08</version>
<build>f9ead3</build>
</package>
<package name="agf">
<pn>500-00012-r01</pn>
<version>02.02.00</version>
<build>887e04</build>
</package>
<package name="essimg">
<pn>500-00020-r01</pn>
<version>22.10.09</version>
<build>983d9b</build>
</package>
<package name="security">
<pn>500-00016-r01</pn>
<version>02.00.00</version>
<build>54a6dc</build>
</package>
<package name="pkgsec">
<pn>500-00021-r01</pn>
<version>01.00.00</version>
<build>19ae14</build>
</package>
<build_info>
<build_id>ec2-user-envoy_uber-pkg_master:pkg-Oct-13-22-17:54:08</build_id>
<build_time_gmt>1665683795</build_time_gmt>
<release_ver>02.00.3244</release_ver>
<release_stage>700-GA</release_stage>
</build_info>
</envoy_info>
-Steffen
…On Thu, May 4, 2023 at 9:40 PM dlmcpaul ***@***.***> wrote:
So D7.3.120 is not working
@drache42 <https://github.com/drache42> what version you on?
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2PAI47KJL2RZDZABN6KETXESADXANCNFSM6AAAAAAW6VLNYQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
pardon me, but for some reason, I tried it again today and it's working now with the manual token! Thanks! I have a question about the parameters for getting mqtt running, but I'll start a separate thread for that. |
Wanted to chime in here and first say a big thank you for your work on this. I'm on on version D7.3.123 and having issues with the container as well. I tried adding
I appear to be on docker container version 0.27
A bit from info.xml (Let me know if you need more)
|
I will need the full set of error logs. Java is nice enough to give detailed errors but it tends to hide the error location. |
in the "select system" field, you have to type in the first 2-3 characters of your system name and then it will autocomplete (i have no idea why they hell they designed it this way). This will depend on installer, but in my case, my system name was my first name. After that, you'll get to select your gateway. |
Ok weird. I got an email with a comment on this issue and @rice1204 managed to reply to it but it not here. From the email I saw you look to be running version 0.26 and you need to be at least 0.27 as most reports have that working. Probably a good time to summarise what we need to get the new authorisation working You may also need to set ENVOY_CONTROLLER_PORT=443 @rice1204 I think you got yours working can you post the command line you used? |
Side note: I know the jump from 0.26 to 0.27 can be a big one for those running the jar directly as the internal database needs to be converted or deleted it you don't care about it's history. Happy to try and support you through conversion |
Thanks @rice1204 , @dlmcpaul, your tip helped me generate the token so thanks very much for that! And yes I also posted the question with authentication not working. After posting the question I read earlier messages above and saw you mentioned to someone else about updating the code from 0.26 so I upgraded that too and thought my issue is resolved so deleted my question. Sorry for the run around! |
@ChadDa3mon did you resolve your issue? I also seem to be having the challenge with self signed certs, full logs:
I'm running on docker-arm, on the experimental tag |
@lukegiuliani sorry which docker image are you pulling? The experimental tag for dlmcpaul/enphasecollector-arm is a little behind the release as it is about 8 months old. I have pushed a more recent build to both x86 and arm experimental tags so you can test it out. Arm releases are a bit tricky these days as there are some older Pi machines that I can no longer support. |
Sorry I should have been more specific (and also thanked you for the awesome repo!)
But either way, the new build you just pushed has fixed it, thank you very much ❤️ |
Ok good. I really should cut a release. I think I did something between the last release and the current experimental that handles some extra edge cases with the new firmware. |
I have done a new release with all the fixes identified including handling the recent change to the login API. Will close this issue soon. Please open a new issue for any bugs found. |
API Documentation can be found here
Here is a summary of the changes that will go into effect with release 07.03.120 and higher:
The text was updated successfully, but these errors were encountered: