-
Notifications
You must be signed in to change notification settings - Fork 3
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
History data #4
Comments
You are totally right. The problem I faced when developing this plugin is
that the Domoticz energy meter can be set to 'from device' or 'computed'.
For the first you need access to a running total (meterstand), for the
second you can just provide it the wattage and it'll calculate the kWh's
from there. As the myenergi cloud API doesn't return any running totals I
saw no other option than using the 'computed' setting.
However:
1) A lot of time has passed. I could check the output of the API nowadays.
2) Maybe it's possible to use the totals from the current month as the
running totals. I'm not sure if Domoticz handles overflows/resets of these
values gracefully. I think I saw it calculating negative values when I
tested this.
3) Maybe it's possible to add additional meters for each month and then
feed those with the total for the current month as returned by the API.
The last option would actually mean that the plugin creates new meters
every month. Not great but at least it would guarantee historical data to
be stored.
I'll have a look when I have some spare time. I don't look the 'computed'
situation myself as well.
…On Tue, 15 Feb 2022, 16:46 Danny Bloemendaal, ***@***.***> wrote:
So, the plugin is indeed monitoring the Zappi and logs this into Domoticz.
Eventually the totals should match with what's stored in the hub and with
MyEnergi. However, if you miss a couple of checks (e.g. Domoticz was
offline a bit) then your logs in Domoticz are off with the 'truth'.
So I was wondering if we could come up with some scheme that updates stuff
in Domoticz based on the historical data. Like a device that constantly
calculates how much you charged today and update that total. And perhaps a
similar device for charged this week, this month and this year. Wouldn't
that be safer and more accurate eventually?
I'm still looking for a good way to export this data properly so I can
charge my company with the most accurate data.
Cheers,
Danny
—
Reply to this email directly, view it on GitHub
<#4>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABQ47TED3ZKKU4IR6SUWHLU3JYNPANCNFSM5OO5NA2A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I have started developing a new version of this plugin which has both 'instant' (like the current version) and 'today' meters. This is based on the data I can get from the app API quite easily. I am currently working on adding the 'today' data up so that I can also add 'total' meters. Some thoughts/comments:
@dannybloe Let me know your thoughts if you have any. |
I sent you a message via your site. Perhaps you can send me a pm. |
I follow a similar scheme for my SolarEdge scripts. I download the daily total and put that in a general energy dummy (not computed) and I just update whatever the service gives me. So this should work 🙂 |
Must be something wrong with my site because I didn't get your message and also not a test message I sent to myself and I think PMs are non-existant on Github, aren't they? |
You mean you use the daily total as the counter for the instant+counter energy meter? I think the daily wrapping of the counter causes an error in Domoticz because it's not supposed to wrap. Are you sure this works without problems? |
This is what happens when I use the daily values as the counter for an instant+counter electricity meter: Notice the negative today values for the meters. This happens during the transition from computed to from device mode so maybe it does work correctly when setup in from device mode from the beginning. I have just removed it and I'll check it tomorrow again. |
Nope. That doesn't work. Apparently Domoticz compares the last value of yesterday with the latest value received and starts reporting negative numbers for today after wrapping, so I'll have to come up with another strategy. @dannybloe Can you comment on what you're doing? As suspected using the daily running totals as the counter doesn't work. |
Thanks. The trick here is that the solaredge cloud service returns the lifetime value. The Domoticz instant+counter meter needs this lifetime value to operate properly. The problem is that the myenergi cloud doesn't return this value. ;-) I'm trying a few strategies right now and I'm sure I will come up with something. I can always try and keep a running total myself although this would probably be fragile. |
Yeah. Well, you could perhaps get the totals and correct the local values if you miss a couple of readings. I think there are totals. |
There are no totals in the myenergi API. That's why it's so hard to get this right. Still experimenting with different kinds of meters in Domoticz... Will let you know if I get it to work. |
So, the plugin is indeed monitoring the Zappi and logs this into Domoticz. Eventually the totals should match with what's stored in the hub and with MyEnergi. However, if you miss a couple of checks (e.g. Domoticz was offline a bit) then your logs in Domoticz are off with the 'truth'.
So I was wondering if we could come up with some scheme that updates stuff in Domoticz based on the historical data. Like a device that constantly calculates how much you charged today and update that total. And perhaps a similar device for charged this week, this month and this year. Wouldn't that be safer and more accurate eventually?
I'm still looking for a good way to export this data properly so I can charge my company with the most accurate data.
Cheers,
Danny
The text was updated successfully, but these errors were encountered: