Skip to content
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

Gateway without CT's - Error when using D5 firmware #5

Closed
testuser83 opened this issue Sep 13, 2023 · 18 comments
Closed

Gateway without CT's - Error when using D5 firmware #5

testuser83 opened this issue Sep 13, 2023 · 18 comments

Comments

@testuser83
Copy link

testuser83 commented Sep 13, 2023

I installed and set firmware to d%, however I get this error:

2023-09-13 17:49:13.317477500 *** starting dbus-enphase-envoy ***
2023-09-13 17:49:16.397291500 ERROR:root:D5 firmware selected
2023-09-13 17:49:16.420323500 Exception in thread Thread-TokenManager:
2023-09-13 17:49:16.420332500 Traceback (most recent call last):
2023-09-13 17:49:16.420334500   File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
2023-09-13 17:49:16.420337500     self.run()
2023-09-13 17:49:16.420338500   File "/usr/lib/python3.8/threading.py", line 870, in run
2023-09-13 17:49:16.420341500     self._target(*self._args, **self._kwargs)
2023-09-13 17:49:16.420344500   File "/data/etc/dbus-enphase-envoy/dbus-enphase-envoy.py", line 292, in tokenManager
2023-09-13 17:49:16.420578500     token = getToken(envoy_enlighten_user, envoy_enlighten_password, envoy_serial)
2023-09-13 17:49:16.420584500 NameError: name 'envoy_enlighten_user' is not defined
2023-09-13 17:50:16.484154500 WARNING:root:token still empty
2023-09-13 17:51:16.556522500 WARNING:root:token still empty
@mr-manuel
Copy link
Owner

Thanks for reporting the error. I will take a look at it at saturday.

mr-manuel added a commit that referenced this issue Sep 18, 2023
@mr-manuel
Copy link
Owner

Please install release v0.2.0-beta3.

@testuser83
Copy link
Author

testuser83 commented Sep 18, 2023

Thank you for the quick response. I installed this release and now it loads. But I get a timeout here:

023-09-18 17:15:16.174535500 *** starting dbus-enphase-envoy ***
2023-09-18 17:15:19.376984500 ERROR:root:D5 firmware selected
2023-09-18 17:16:19.468577500 WARNING:root:--> data_production_historic not yet ready after 60 seconds.
2023-09-18 17:16:19.468586500 Try accessing http://172.16.0.115/production.json?details=1 from your PC and see,
2023-09-18 17:16:19.468590500 if it downloads a file with JSON content.
2023-09-18 17:17:19.538566500 WARNING:root:--> data_production_historic not yet ready after 120 seconds.
2023-09-18 17:17:19.538578500 Try accessing http://172.16.0.115/production.json?details=1 from your PC and see,
2023-09-18 17:17:19.538582500 if it downloads a file with JSON content.
2023-09-18 17:18:19.612555500 WARNING:root:--> data_production_historic not yet ready after 180 seconds.
2023-09-18 17:18:19.612563500 Try accessing http://172.16.0.115/production.json?details=1 from your PC and see,
2023-09-18 17:18:19.612567500 if it downloads a file with JSON content.
2023-09-18 17:19:19.683101500 WARNING:root:--> data_production_historic not yet ready after 240 seconds.
2023-09-18 17:19:19.683110500 Try accessing http://172.16.0.115/production.json?details=1 from your PC and see,
2023-09-18 17:19:19.683114500 if it downloads a file with JSON content.
2023-09-18 17:20:19.753838500 WARNING:root:--> data_production_historic not yet ready after 300 seconds.
2023-09-18 17:20:19.753848500 Try accessing http://172.16.0.115/production.json?details=1 from your PC and see,
2023-09-18 17:20:19.753851500 if it downloads a file with JSON content.
2023-09-18 17:20:20.755969500 ERROR:root:Maximum of 300 seconds wait time reached. Restarting the driver.

The JSON file is accessible and shows my inverters

@mr-manuel
Copy link
Owner

Can you increase the logging level in the config file to DEBUG and post the logs again?

@testuser83
Copy link
Author

testuser83 commented Sep 18, 2023

Yes of course:

2023-09-18 17:48:30.500194500 *** starting dbus-enphase-envoy ***
2023-09-18 17:48:33.579571500 ERROR:root:D5 firmware selected
2023-09-18 17:48:33.594543500 INFO:root:step: fetch_handler
2023-09-18 17:48:33.596151500 INFO:root:--> data_production_historic not yet ready
2023-09-18 17:48:33.596554500 INFO:root:step: fetch_production_historic
2023-09-18 17:48:33.615175500 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 172.16.0.115:80
2023-09-18 17:48:34.094929500 DEBUG:urllib3.connectionpool:http://172.16.0.115:80 "GET /production.json?details=1 HTTP/1.1" 200 None
2023-09-18 17:48:34.102451500 INFO:root:--> fetch_handler() --> fetch_production_historic(): JSON data feched. Wait 3600 seconds for next run
2023-09-18 17:48:34.103175500 INFO:root:step: fetch_devices
2023-09-18 17:48:34.117847500 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 172.16.0.115:80
2023-09-18 17:48:34.598382500 INFO:root:--> data_production_historic not yet ready
2023-09-18 17:48:35.600488500 INFO:root:--> data_production_historic not yet ready
2023-09-18 17:48:36.283800500 DEBUG:urllib3.connectionpool:http://172.16.0.115:80 "GET /inventory.json HTTP/1.1" 200 None
2023-09-18 17:48:36.310433500 INFO:root:--> fetch_handler() --> fetch_devices(): JSON data feched. Wait 3600 seconds for next run
2023-09-18 17:48:36.311363500 INFO:root:step: fetch_inverters
2023-09-18 17:48:36.323890500 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 172.16.0.115:80
2023-09-18 17:48:36.343763500 DEBUG:urllib3.connectionpool:http://172.16.0.115:80 "GET /api/v1/production/inverters HTTP/1.1" 401 90
2023-09-18 17:48:36.355639500 DEBUG:urllib3.connectionpool:Resetting dropped connection: 172.16.0.115
2023-09-18 17:48:36.468970500 DEBUG:urllib3.connectionpool:http://172.16.0.115:80 "GET /api/v1/production/inverters HTTP/1.1" 200 2674
2023-09-18 17:48:36.477124500 INFO:root:--> fetch_handler() --> fetch_inverters(): JSON data feched. Wait 300 seconds for next run
2023-09-18 17:48:36.477992500 INFO:root:step: fetch_events
2023-09-18 17:48:36.490921500 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 172.16.0.115:80
2023-09-18 17:48:36.602646500 INFO:root:--> data_production_historic not yet ready
2023-09-18 17:48:37.604751500 INFO:root:--> data_production_historic not yet ready
2023-09-18 17:48:38.606863500 INFO:root:--> data_production_historic not yet ready
2023-09-18 17:48:39.608969500 INFO:root:--> data_production_historic not yet ready

This is my JSON:

{
    "production": [
        {
            "type": "inverters",
            "activeCount": 17,
            "readingTime": 1695059186,
            "wNow": 1,
            "whLifetime": 18347663
        }
    ],
    "storage": [
        {
            "type": "acb",
            "activeCount": 0,
            "readingTime": 0,
            "wNow": 0,
            "whNow": 0,
            "state": "idle"
        }
    ]
}

@mr-manuel
Copy link
Owner

mr-manuel commented Sep 18, 2023

Very strange.

2023-09-18 17:48:34.094929500 DEBUG:urllib3.connectionpool:http://172.16.0.115:80 "GET /production.json?details=1 HTTP/1.1" 200 None

It does receive a response but the response is empty. None is the response size and 200 the HTTP status code.

Do you have production and consumption CT's installed? From your JSON this data is missing.

Could you please provide this data of your Envoy?

  • Software Version
  • Software Build Date

@testuser83
Copy link
Author

I do not have those CT's installed.
I have an Envoy S
SW version: D5.0.62 (5e57a9)
SW builddate: 02 Jun, 2021 6:38 PM

@mr-manuel
Copy link
Owner

Therefore it does not work. What do you get when you open http://172.16.0.115/stream/meter? It should start download a file, then you have to stop it manually. Open it with a text editor and post the content.

@testuser83
Copy link
Author

I followed your readme. What did I miss?
I opened the url but there is no download. It opens a blank page with nothing in it.

@mr-manuel
Copy link
Owner

Can you post a picture of your Gateway?

You missed nothing. I was convinced that every installation has at least one CT installed. It should be possible to retrofit them. https://enphase.com/store/communication/consumption-ct

@mr-manuel mr-manuel reopened this Sep 20, 2023
@testuser83
Copy link
Author

1695200733334

Yes of course.

@mr-manuel
Copy link
Owner

Is your system maybe in the Netherlands? I heard from a few people that have teir system in the Netherlands that the installers never install the CT's.

I updated the README with a requirement section.

@testuser83
Copy link
Author

Yes and it is an Envoy standard, so no CT's as I read now. Does this mean it will never work? In the app I can perfectly see what the panels are producing, so it should be possible to read that value.

@mr-manuel
Copy link
Owner

For monitoring maybe, but for real application surely not. The data is refreshed maybe all 5-15 minutes.

@testuser83
Copy link
Author

Monitoring is fine. I need to tell Cerbo the production of my solar panels. Would that still be possible and how?

@mr-manuel mr-manuel changed the title Error when using D5 firmware Gateway without CT's - Error when using D5 firmware Sep 20, 2023
@mr-manuel
Copy link
Owner

For this I have to rewrite a great part of the driver. This is not planned since it would take more time and costs for me than installing the CT's for you.

Fell free to fork this repo and do the change on your own :-)

@mr-manuel mr-manuel closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2023
@testuser83
Copy link
Author

Thank you for looking into it. Btw CT's are not possible with Envoy S Standard. I hope someone with more expertise than me can make such a fork.

@mr-manuel
Copy link
Owner

You could check Enphase-API, get the data with Node-RED (which is included in Venus OS Large) and then send the data via MQTT to dbus-mqtt-pv.

You may use this endpints:

  • /production.json?details=1
  • /api/v1/production/inverters

If you have no expertise and you Google a bit you will take about a day to achieve this. Eventually check the issues of the dbus-mqtt-pv driver. There are some examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants