Page 1 of 1

Daily usage from accumulated data

Posted: Sunday 20 October 2024 16:18
by lagerberg
Hi,
I have a Shelly power meter connected to my heat pump.
I can get total consumption of energy from one of the counters in the MQTT integration but I would like to display the usage by day, instead of a line showing increasing numbers. Is there a way to do this directly in Dashticz, or do I need a script to subtract yesterday’s consumption from the figure to get the net change by day?

Re: Daily usage from accumulated data

Posted: Tuesday 22 October 2024 0:08
by FlyingDomotic
Did you tried using a P1 smart meter (energy)? It does it by default.

Re: Daily usage from accumulated data

Posted: Tuesday 22 October 2024 0:34
by waltervl
The same for a Domoticz Electricity (instant and counter) device.
https://www.domoticz.com/wiki/Dummy_for ... counter.29

Re: Daily usage from accumulated data

Posted: Tuesday 22 October 2024 19:35
by lagerberg
Hi,
Thanks a lot for your replies @waltervi and @FlyingDomotic. I started to experiment in that direction using dzvents script, and I think I'm getting the hang of it. I can feed power and energy data to the object, and I can see that data comes in.

Should I make the script so that I read the values (reading from Shelly device via MQTT) for power, which seems to update more often, and then read and update the usage at that time? I guess the meter will use the actual time of update to do its calculations..

Best regards

Re: Daily usage from accumulated data

Posted: Tuesday 22 October 2024 20:28
by FlyingDomotic
lagerberg wrote: Tuesday 22 October 2024 19:35 Should I make the script so that I read the values (reading from Shelly device via MQTT) for power, which seems to update more often, and then read and update the usage at that time? I guess the meter will use the actual time of update to do its calculations..
I don't understand why you want to make a script. Wouldn't it be possible to directly send MQTT data to device each time value changes in MQTT?

Re: Daily usage from accumulated data

Posted: Tuesday 22 October 2024 22:36
by waltervl
Your Shelly power device should have created a Domoticz Electricity (instant and counter) device. So go to the author of that integration to ask to create a proper Domoticz device

What Shelly integration do you use?