home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.73k stars 30.85k forks source link

Enphase Integration Current Power Production Negative #100554

Closed bdattilo closed 1 year ago

bdattilo commented 1 year ago

The problem

Since updating to 2023.9, the reading from Enphase Envoy for Current Power Production has been negative. This is using the native Envoy integration, but Not the cloud log in as my firmware is prior to Firmware 7.x.

6de5d67b70db2d5b19ddcfcf00beabc4933879b7_2_690x326

This affects the Energy Dashboard as it shows much larger consumption than is real.

What version of Home Assistant Core has the issue?

core-2023.9.2

What was the last working version of Home Assistant Core?

core-2023.8.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Enphase Envoy

Link to integration documentation on our website

https://www.home-assistant.io/integrations/enphase_envoy/

Diagnostics information

config_entry-enphase_envoy-99a2929531d98023e9a93178669f6c54.json.txt

Example YAML snippet

Here are the sensors that drive the energy dashboard:

template:
  - sensor:
        name: Grid Import Power
        state_class: measurement
        icon: mdi:transmission-tower
        unit_of_measurement: W
        device_class: power
        state: >
            {{ [0, states('sensor.envoy_XXX_current_power_consumption') | int(0) - states('sensor.envoy_XXX_current_power_production') | int(0) ] | max }}
  - sensor:
        name: Grid Export Power
        state_class: measurement
        icon: mdi:transmission-tower
        unit_of_measurement: W
        device_class: power
        state: >
            {{ [0, states('sensor.envoy_XXX_current_power_production') | int(0) - states('sensor.envoy_XXX_current_power_consumption') | int(0) ] | max }}
  - sensor:
        name: Solar Power Corrected
        state_class: measurement
        icon: mdi:solar-panel
        unit_of_measurement: W
        device_class: power
        state: >
            {% set value = states('sensor.envoy_XXX_current_power_production') | int %}
            {% if value  <= 4 -%}
              0
            {% elif is_state('sun.sun','below_horizon') %}
              0
            {%- else -%}
              {{ value }}
            {%- endif %}

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @bdraco, @cgarwood, @dgomes, @joostlek, mind taking a look at this issue as it has been labeled with an integration (enphase_envoy) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `enphase_envoy` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign enphase_envoy` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


enphase_envoy documentation enphase_envoy source (message by IssueLinks)

joostlek commented 1 year ago

Hey there!

Thanks for reporting, this looks really strange. To be able to help you with this we need more info from your machine. We have a script that collects all the needed info so we can research what's going on. Are you able to send me a message on discord at @joostlek?

bdattilo commented 1 year ago

Hey there!

Thanks for reporting, this looks really strange. To be able to help you with this we need more info from your machine. We have a script that collects all the needed info so we can research what's going on. Are you able to send me a message on discord at @joostlek?

Hi - I added you on Discord. Let me know where to find the script to run. Currently running HAOS on x86.

nielsbulten commented 1 year ago

@bdattilo is it fixed? if so how?

joostlek commented 1 year ago

Still trying to get some more test data :) You got the same problem?

nielsbulten commented 1 year ago

afbeelding

afbeelding

"home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.9.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.5", "docker": true, "arch": "x86_64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "6.1.45", "supervisor": "2023.09.2", "host_os": "Home Assistant OS 10.5", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true },

"custom_components": { "loqed": { "version": "0.0.1", "requirements": [ "loqedAPI==2.1.7" ] }, "powercalc": { "version": "v1.9.3", "requirements": [ "numpy>=1.21.1" ] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] } },

bdraco commented 1 year ago

Please post your fixtures using https://github.com/pyenphase/pyenphase/blob/main/devtools/fixture_collector.py

We can add them to the test lib to make sure we don't regress your configuration in the future

pip3 install pyenphase
git clone https://github.com/pyenphase/pyenphase
cd pyenphase
export ENVOY_HOST=<IP OF ENVOY HERE>
python3 devtools/fixture_collector.py
bdattilo commented 1 year ago

Some updates -

Provided @joostlek with some data, which exposed that my IQ Combiner had really old firmware (4.10). Due to this finding I got Enphase to push a firmware update to my IQ, Once I got on Firmware 7.x from Enphase this issue went away. Things on the energy dashboard are a bit messed up now, but working to recover that.

nielsbulten commented 1 year ago

Have the old firmware also asked Enphase for a update keep you informed

joostlek commented 1 year ago

Did you try 2023.9.3 already? Then we know for sure this was a fix :)

joostlek commented 1 year ago

Since bdattillo doesn't have the issue anymore, you're the deciding factor if we are going to close this issue :P

nielsbulten commented 1 year ago

stil waiting for a update, Envoy needs to do it i cannot do it and they recived my request but no response yet. Keep you informed

joostlek commented 1 year ago

No I mean, can you update HA to 2023.9.3 and check if you still have this issue

nielsbulten commented 1 year ago

updated looks like it fixed the problem 👍

joostlek commented 1 year ago

In that case we close the issue :) thanks!