Hi,
I've made some scripts to log the maximum values of what my solar panels produced (per system, I have 2 inverters), what the maximum return was until now and what the maximum usage has been.
Could this be built in as an extra feature so no extra Lua / dzVents scripts are needed anymore?
Maximum values meter readings
Moderators: leecollings, remb0
- mvveelen
- Posts: 697
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Maximum values meter readings
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- waltervl
- Posts: 5902
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Maximum values meter readings
Are the min/max/average values in the graphs and reports (weekly/monthly) not enough for reporting?
Why do you need them as current data?
Why do you need them as current data?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 662
- Joined: Thursday 10 November 2016 9:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Maximum values meter readings
Hello,
I think I experienced the same kind of issue: Only data for such sensors (global home power in my case, from a Qubino Smart-Meter at the head of my fuse panel, sending I/V/W/CosPhy to Domoticz on a few % change in my case) that makes it's way to DB (thus graphs) are sampled every 5mn. That may (rarely!) or may not (99.66%, considering the lucky second over 300s=5mn?) be a min/max for the 5mn sampling period.
=> Had to build a virtual sensor that gets fed by a Lua script that records true max (only for W) in my case, on a 10mn period (>5 mn Domoticz slices, to avoid loosing some samples). This allowed me to notice my true instant power maxes were almost every day/weeks several kW higher than expected from Domoticz graphs, so I was at risk of power cuts on exceeding my provider max allowed instant power drain!
So this 5mn sampling makes current data mostly false, even if I understand that this was probably done to avoid too much DB grow if recording true min/max as a core function for every sensor in the 5mn slices on top of current sample value.
Maybe another (slave) sensor type could be attached to an existing one with the option to record true slices min/max only for data that makes sense (in my case, I just choose to record true max & only for W, skipping I/V/CosPhy) and on a configurable time slice (than may exceed 5mn): This would be user decision to target records+periodicity to avoid DB size increase too much.
This would also not disturb current sensors use-cases...
Another addition I'm doing in script in the same way (somehow integrating every device samples over last_update time slices, as device last_update is luckily still updated even if data is not recorded by default, allowing to script this as a Lua device script that does not offer data persistence between calls) is calculating/recording (approx) power average values, on a 10mn time frame as well in another power average virtual sensor. Some devices are able to compute/record true averages over a configurable period but that's not the case for mine...
=> Such slave sensor introduction able to record, on user selection, min/max/average over a configurable period would be a nice Domoticz core addition, even if this can currently be scripted as Domoticz is quite flexible/well designed on this.
EDIT: Average addition would probably help a lot users in countries/regions that now have power contracts taking into account the day max average consumption over a quarter for billing! Monitoring averages over a sub-period (10mn?) would allow them to trigger targeted heavy consumer stop (for next 5mn?) to smooth their daily quarter power peaks thus keep lower electricity prices.
- mvveelen
- Posts: 697
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Maximum values meter readings
The current reports are not sufficient if you quickly want to see what the highest production so far is. I've managed to make a Lua script for this, but I think other users might like this built in as a feature. So, there is no "need" for it, but it would be a nice addition.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Who is online
Users browsing this forum: No registered users and 1 guest