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

Non-metered Envoys return empty responses from /ivp/meters #11

Open
mleppanen opened this issue Nov 24, 2023 · 1 comment
Open

Non-metered Envoys return empty responses from /ivp/meters #11

mleppanen opened this issue Nov 24, 2023 · 1 comment

Comments

@mleppanen
Copy link

Hello,

this API seems to be just what I need for my local metering system. However, when setting this up, I did the configuration and was able to connect to the Enphase system. Trying out gateway_console.py I found out that gateway.api_call('/ivp/meters') returns an empy response. This is probably due to my gateway being a non-metered one.
The gateway_console.py script was easy to fix by adding next(..., {state: 'enabled'}) structure around the list comprehension on lines180 and 198 but I am wondering if the idea of the API would be return something where this non-meteredeness would be obvious?

Keep up the good work!
Best regards,
Marko

@catsmanac
Copy link

The /production endpoint will be missing eim types if it's a non-metered envoy and will be returning activecount=0 for eim type if it is a metered type without configured meters. It's a bit of a slow endpoint though. And the [] response (or 401 status for older firmware) for ivp/meters is as good an indication.

{
    "production": [{
            "type": "inverters",
            "activeCount": 15,
            "readingTime": 1694549655,
            "wNow": 4085,
            "whLifetime": 943236
        }, {
            "type": "eim",
            "activeCount": 1,
            "measurementType": "production",
            "readingTime": 1694549732,

This one uses the /production page and the eim type to determine if it's metered and if not fallback to using the /api/v1/production endpoint (and /api/v1/production/inverters for the individual inverters)

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