openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[enphase] Reports 0 for all power/energy production values #16448

Open jswim788 opened 7 months ago

jswim788 commented 7 months ago

Expected Behavior

Should get power/energy production values as reported in the Enphase app, not 0's

Current Behavior

Getting 0's for all values: wattsNow, wattHoursToday, etc. from the bridge/envoy.

Note that I do get valid values from the inverters from the bridge/envoy, so the connection seems to be fine.

Possible Solution

According to this: https://support.enphase.com/s/question/0D53m00009INBskCAH/local-api-return-0-for-wh-counters-for-production-after-new-firmware-update the binding may need to use http://IP/ivp/pdm/generation to get the power values.

Steps to Reproduce (for Bugs)

Connect to an Enphase with the current firmware and get all power production values to be 0.

Log shows:

2024-02-22 16:02:17.016 [TRACE] [.internal.handler.EnvoyBridgeHandler] - Check connection
2024-02-22 16:02:17.468 [DEBUG] [nternal.handler.EnvoyEntrezConnector] - Home Response: ...

2024-02-22 16:02:17.469 [TRACE] [nternal.handler.EnvoyEntrezConnector] - Retrieving data from 'https://192.168.86.210/api/v1/production' with sessionID 'xxx'
2024-02-22 16:02:17.485 [TRACE] [hase.internal.handler.EnvoyConnector] - Envoy returned data for '/api/v1/production' with status 200: {
  "wattHoursToday": 0,
  "wattHoursSevenDays": 0,
  "wattHoursLifetime": 0,
  "wattsNow": 0
}

For the inverters we can see the data:

2024-02-22 16:02:17.569 [TRACE] [hase.internal.handler.EnvoyConnector] - Envoy returned data for '/api/v1/production/inverters' with status 200: [
  {
    "serialNumber": "121715021260",
    "lastReportDate": 1708646503,
    "devType": 1,
    "lastReportWatts": 72,
    "maxReportWatts": 244
  },

Context

Would like to collect, chart, and archive the Enphase power/energy production values.

Your Environment

OH 4.1.1 Enphase software version: D7.3.130 (91f206)

openhab-bot commented 7 months ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/new-binding-enphase-envoy-solar-system-gateway/44449/140

lsiepel commented 3 months ago

Same issue here, will fiddle with this to see if I can get it back to work. would be nice if we can somehow detect which version to use. We could use the old one as fallback, but rather detect it

lsiepel commented 3 months ago

Same issue here, will fiddle with this to see if I can get it back to work. would be nice if we can somehow detect which version to use. We could use the old one as fallback, but rather detect it

Finally had some time to look into my issue. Somehow the auto detection did not work and i had to manually set the hostname. So my issue seems different. FTR i have version R5.0.55

lsiepel commented 1 month ago

My envoy upgrade to version 8.2.4264 today and after reconfiguration of the thing, all works as expected. File based config:

Bridge enphase:envoy:010489 "Envoy" [ serialNumber="xxxxx",hostname="xxxxx", autoJwt="true", username="xxxxx",password="xxxxx", siteName="xxxxx" ] {

using openHAB 4.2.1. The channels you mention are all updated as expected. Please confirm this issue can be closed.

jswim788 commented 1 month ago

Does not work for me. Enphase firmware is D7.3.621 (150e3e). I have no control over the firmware version, but I can say that with this firmware, the ivp/pdm/energy endpoint works as expected and documented. But that does not make it into the binding.