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

green_energy_today increasing instead of energy_used_today #60

Open
Ulrar opened this issue Dec 22, 2021 · 10 comments
Open

green_energy_today increasing instead of energy_used_today #60

Ulrar opened this issue Dec 22, 2021 · 10 comments

Comments

@Ulrar
Copy link

Ulrar commented Dec 22, 2021

Version of the custom_component

Latest from HACS

Configuration

Used the UI

Describe the bug

I've just plugged the hub in and added the integration.
The green_energy_today is increasing, even though I do not have any generation and it shows 0 in the android app.
The energy_used_today is staying at 0, even though it's increasing in the android app.

Any chance these are reversed, somehow ? Surely green should be 0 and used today should correlate with the grid CT readouts.

Debug log

No logs from this integration.

@G6EJD
Copy link

G6EJD commented Dec 22, 2021

I’ve just checked mine and the green value is tracking / equivalent to the Eddi readings, so definitely a problem.

@albenex
Copy link

albenex commented Feb 18, 2022

too here

@CJNE
Copy link
Owner

CJNE commented Feb 21, 2022

Thanks for this, it's probably mixed up, will take a look!

@apbarratt
Copy link

This is a problem for me too. The only MyEnergi Kit I have is the Zappi2 and the hub that came with it. My Energy dashboard only shows the car charge usage as "Green Energy today".
When this is fixed, it would be helpful to understand how the fix is done here so we can prepare for it in such a way that we don't lose our existing data :)
Let me know if there's anything I can share on my side if you need data/testing or point me to the relevant code if I find myself with a bit of free time that you don't have right now :)

@apbarratt
Copy link

Screenshot 2022-07-20 at 15 21 03

@markruys
Copy link

markruys commented Oct 17, 2022

"Green Energy today" (energy_green) is computed from h1d + h2d + h3d, which is supposed the diversion charge (hence the 'd'). It is green in the sense it's used for charging instead of being exported to the grid.
"Energy used today" (energy_total) is computed from h1b + h2b + h3b, which is boosted charge (hence the 'b').

I think you need to add these two values to obtain the actual energy charged. It's not swapped, but the naming is really confusing.

@Ulrar
Copy link
Author

Ulrar commented Oct 17, 2022

I have no generation so nothing is getting diverted, it's 100% imported energy

@markruys
Copy link

markruys commented Oct 17, 2022

Naming here is confusing/incorrect. The myenergy API labels all non-boosted charge as diversion. It isn't necessarily green and could be very well be imported from the grid.

But I also observed that energy_green isn't computed correctly. Looking at the source I think it doesn't account for local time zone (the myenergy API is in UTC), and because it uses hourly resolution which isn't accurate to get today's data.

@G6EJD
Copy link

G6EJD commented Oct 17, 2022

The idea of GitHub is also to offer a solution to the issues found by analysing the code and finding an error, then correcting that error through revised code, then if the author agrees, they incorporate the change. All I see recently is criticism for all the hard work that Johan put into this integration without which we’d have nothing.

@markruys
Copy link

Lol, I am working on a PR. But first we need to understand the problem. I might be wrong after all.

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

6 participants