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

Homey Energy #53

Open
SmartHomeEnthusiast opened this issue Feb 23, 2023 · 32 comments
Open

Homey Energy #53

SmartHomeEnthusiast opened this issue Feb 23, 2023 · 32 comments
Assignees

Comments

@SmartHomeEnthusiast
Copy link

This seems to have appeared after recent app update. The energy tab in Homey app shows Eddi power level from Harvi and not what Eddi is actually consuming. It is dark so no solar PV and Eddi showing 2.49KW consumption. Eddi is off, waiting for surplus.

@bisand
Copy link
Owner

bisand commented Feb 24, 2023

Hi,

Eddi measures the power usage from CT1-CT3 and uses these values for calculating the energy usage since last update. you should be able to select which CT clamp to include in your calculation on the settings page, but I see that the Eddi device is not currently honoring that setting.

I will fix that and publish a new version very soon. I do not own an Eddi device, so it would be very helpful if you are able to post an anonymized output from myenergi API. Use the following URL to get the data. https://s18.myenergi.net/cgi-jstatus-*
You will have to use the same login as you used when you installed the Homey app.

Could you also provide some information on what the different CT clamps are connected to?

Thanks!

@bisand
Copy link
Owner

bisand commented Feb 24, 2023

I have just published a new test version. You can install it from here: https://homey.app/a/net.biseth.myenergi/test/

The total power and energy calculation is changed to honor the settings under "Advanced Settings". I would b happy if you could install the test version and report back with your findings.

Thanks!

@SmartHomeEnthusiast
Copy link
Author

Evening, thanks for your responses. I have installed the test version and now the correct numbers are being shown again in Homey energy tab. I tried the cgi-jstatus link and the resulting page showed hardly any information. There is one CT clamp that I am aware of and, as far as I know, it is connected to the mains connection to monitor the direction and amount of electric energy

@SmartHomeEnthusiast
Copy link
Author

CT1 shows measurements, CT 2 & 3 show nothing

@SmartHomeEnthusiast
Copy link
Author

Interesting discovery. Several of the tag names have changed so had to amend a few flows, that's easy enough of course but can't find one to display the amount transferred today

@SmartHomeEnthusiast
Copy link
Author

The numbers displayed in the Homey app for Energy and Energy CT1, these seem to be the same, are not what the android myenergie app shows

@SmartHomeEnthusiast
Copy link
Author

Homey app shows 7.69kWh, whereas myEnergie app shows 3.5kWh

@SmartHomeEnthusiast
Copy link
Author

Just looked at Insights, your app didn't reset the Energy from yesterday so it started at 4.2kWh instead of zero

@bisand
Copy link
Owner

bisand commented Feb 27, 2023

Hi,

Not sure if I understand you correctly, but I have published a new version that include a setting to subtract generated energy from total when performing the energy calculation. Hope that solves the discrepancy you see between myenergi app and Homey app when it comes to energy calculation.

Depending on how you choose to calculate energy, the CT1 energy and total energy can be the same. By default the system is automatically choosing which CTs chould be used in the power calculation. It selects the CT that is named "Internal Load". You can of course override this under "Advanced setings". See screenshot below:
image
(Note! Norwegian language in screenshot)

Just to be clear, the Homey app does not automatically reset energy usage. You will have to do that yourself by setting the offset under "Advanced settings".

Hope this solves some of your issues mentioned above. Let me know what you think.

Thanks! :)

@SmartHomeEnthusiast
Copy link
Author

Excellent thanks, installing now. In previous live versions their was a tag for energy transferred today, it has disappeared from recent live and test versions. This new setting looks to bring it back

@bisand
Copy link
Owner

bisand commented Feb 28, 2023

Perfect!
Closing this issue now and will publish the newest version to production. Thanks for your feedback!

@bisand bisand closed this as completed Feb 28, 2023
@SmartHomeEnthusiast
Copy link
Author

Morning, sorry to be a niusance but either I don't understand the changes or there is a bug/issue. I cannot manage to get your app to display energy transferred "today", it still shows cumulated since last reset, In previous versions there was a number tag for Transferred today, it has been removed, it showed the figure from the myenergie phone app for Green Energy Today. That tag would be very useful to have back again. A way to, via flows, manually reset Energy at minute after midnight might work. No sure

@SmartHomeEnthusiast SmartHomeEnthusiast changed the title Homey Enerygy Homey Energy Mar 2, 2023
@SmartHomeEnthusiast
Copy link
Author

Edit, I have created a PBTH device which should allow me to replace various tags.

@bisand
Copy link
Owner

bisand commented Mar 2, 2023

OK, so if I understand you correctly, you want to be able to display the energy consumption of your home "today" and maybe also other periods. That is currently not supported in the Homey app, but I can implement it and hopefully retrieve the data you want from myenergi. Remember, I can only supply data that exist in the API that myenergi is providing. If I cannot find it, it's a bit tricky to implement ;)
I will do some research to see if the API is able to return what you want.

@bisand bisand reopened this Mar 2, 2023
@SmartHomeEnthusiast
Copy link
Author

Not of "home", just energy sent via Eddi to hot water. A couple versions ago of your app, it used to do this via a number tag with a name similar to Energy Transfered Today. I'm not worried about other days. I am experimenting with a Power By The Hour device that may be able to do what I need, it will take a couple of days to be sure

@SmartHomeEnthusiast
Copy link
Author

App behaving very oddly today, the numbers being reported are not what is being measured and displayed in myEnergie phone app
Screenshot 2023-03-05 190455
Screenshot 2023-03-05 190938
The Energy CT1 starts at 7.48kWh at midnight, the Energy starts at 9.94kWh but the 2 graphs basically track each other

Screenshot 2023-03-05 191229

@bisand
Copy link
Owner

bisand commented Mar 5, 2023

It’s hard for me to determine what the difference between myenergi app and homey app without any data examples from myenergi app. Can you also provide a screenshot of that and pinpoint what the difference is?

CT1 and Energy will most of the time track each other because CT1 is used in the total energy calculation. It actually depend on what you have selected under «Advanced settings». If you have selected Automatic, the it will use all CTs that is named «Internal Load». If you have selected manual, then the selected CTs will be used in the calculation. It is only the Energy data that will be used by Homey when determining the total energy.

Reasons for the differences could be that CT1
‘s offset has been reset, or even multiple CTs have been used in calculation. That could lead to differences over time.

The energy for the CT clamps should only be used as a reference and will only reflect how much energy has been drawn from that particular phase.

The Homey app is only using data provided by myenergi. The energy is calculated from these data.

@SmartHomeEnthusiast
Copy link
Author

I have the app set on Automatic for the CT it uses, I haven't reset theose today, I did manually reset a couple of days ago to see if that sorted the cumulation issue.
Screenshot_20230305-184045
Screenshot_20230305-193544
I wonder are myEnergie changing/updating their api and what is published. The problem may very well be at their end

@SmartHomeEnthusiast
Copy link
Author

The imported figure of 30.8 tracks almost perfectly with what SolarEdge are reporting was imported. Total house consumption today was 42.5kWh (we have 2 Tesla) of which 12.4kWh was produced by the solar panels and used by the home, 6.4kWh was diverted by Eddi to hot water

@bisand
Copy link
Owner

bisand commented Mar 5, 2023

Does the data from Harvi reflect the 30.8 you see in your other devices?
The Api documentation from myenergi is not very detailed, and I also don not have a local Eddi for testing. Hope you have some patience while I try to sort things out. A nice help would be if you also could supply the output from the following url: https://s18.myenergi.net/cgi-jstatus-*

@bisand
Copy link
Owner

bisand commented Mar 5, 2023

You can also try to decrease the data update interval in the app settings to see if that could improve the accuracy. Minimum value here is 5 seconds. Default is 60

@SmartHomeEnthusiast
Copy link
Author

Screenshot_20230305-200909
It does yes, the consumption figure of 42.8 subtract the Used figure of 12.4 and you get 30.4. They are rarely identical, they use their own CTs but they are usually very close.
When I go to that link nd provide login details all I get in return is
{"status":"-12","statustext":""}

@SmartHomeEnthusiast
Copy link
Author

the polling interval was set at 30 seconds.
Honestly I appreciate what you are doing, it is beyond my skillset, so I very much have patience

@bisand
Copy link
Owner

bisand commented Mar 5, 2023

It does yes, the consumption figure of 42.8 subtract the Used figure of 12.4 and you get 30.4. They are rarely identical, they use their own CTs but they are usually very close.
When I go to that link nd provide login details all I get in return is
{"status":"-12","statustext":""}

Ok, you might have left out the asterisk at the end (*) Please double-check that the url ends with *

@SmartHomeEnthusiast
Copy link
Author

The * is there

@bisand
Copy link
Owner

bisand commented Mar 6, 2023

The * is there

Ok, strange. Let me re-evaluate the logic and see if I can find any discrepancies. Meanwhile, you can monitor the data to see if you can see any patterns emerge.

@SmartHomeEnthusiast
Copy link
Author

We had a power issue yesterday, was off for about half an hour, weird data though
Screenshot 2023-03-07 091355
That from a Power By The Hour device using data from your Homey myenergie app, it resets at midnight

Screenshot 2023-03-07 091605
Data in Homey myenerge app, cumulative but doesn't track with the PBTH one

@SmartHomeEnthusiast
Copy link
Author

Today so far
Screenshot 2023-03-07 091640
The numbers in the PBTH app match perfectly with myEnergie phone app. Yesterday there was no correlation in data at all

@SmartHomeEnthusiast
Copy link
Author

Both those insights show the same increase today, just that PBTH started at zero

@SmartHomeEnthusiast
Copy link
Author

Curious event, myenergie has been working grand and the PBTH app has been summarising daily production correctly.....shelly app has however been reporting
https://community.homey.app/t/app-pro-cloud-shelly/765/3750?u=philip_montgomery

@SmartHomeEnthusiast
Copy link
Author

SmartHomeEnthusiast commented Mar 12, 2023

Curious event, this is today. Homey restarts at 0220 every Sunday, seems to keep Homey running better and it is hours before any solarPV happens.
Screenshot 2023-03-12 160705
that large spike in PBTH starts after Homey restart. The PBTH app gets it's info from myenergie Homey app which didn't show similar rise at that time but the figure is of 43.74kWh which is what myenergie is at as it is summing data and not resetting. Both show, although it is not apparent due to vertical scale, the same increases from about 0930.

@SmartHomeEnthusiast
Copy link
Author

SmartHomeEnthusiast commented Apr 27, 2023

Screenshot 2023-04-27 183816
Problem and I'm not sure where it stems from. The above is from a Power By The Hour Device as I've used for a while now, it gets it's info from the myenergie app. I had a Zappi installed 2 days ago and the numbers have all changed drastically and no longer reflect what the myenergie phone app shows. The CT1-3 in your app are from the Harvi connected CTs? Eddi is showing 258.36kWh energy the past couple of days and yet the total solar production today is actually 10.41kWh. It is not drawing from the grid as it not on boost. Unsure why the numbers have been wrong. That said the install process for the Zappi and setting it up was not as straightforward as it should have been, took a while for it to actually talk to my car and for Zappi to talk to Harvi in the same way that Eddi does

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