Rain

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Filip
Posts: 135
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Rain

Post by Filip »

Dear,

I have a dzVents script that every day at 23:59 stores the rain of the day into the script data.

Code: Select all

        if item.trigger == 'at 23:59' then
            domoticz.data.Rain_daily.add(rainSensor.rain)
        end
The data between 28/06 and 05/07 of Domoticz can be found in the graph: 29.2mm on 28/06 and 0.4mm on 02/07. All other days 0 mm.
https://drive.google.com/file/d/1S7NKNK ... sp=sharing.

However when looking into the script data, you can see that the 29.2mm is repeated until 02/07 (the day there is another value). And the same with the 0.4mm... so far no rain since then, so stays at 0.4mm.
So I have the impression when the is no rain, the previous "counter" is still kept. How can I solve this?

Code: Select all

	["Rain_daily"] = {
		[1] = {
			["data"] = 0.40000000596046;
			["time"] = "2026-7-5 21:59:0.178";
		};
		[2] = {
			["data"] = 0.40000000596046;
			["time"] = "2026-7-4 21:59:0.438";
		};
		[3] = {
			["data"] = 0.40000000596046;
			["time"] = "2026-7-3 21:59:0.242";
		};
		[4] = {
			["data"] = 0.40000000596046;
			["time"] = "2026-7-2 21:59:0.646";
		};
		[5] = {
			["data"] = 29.200000762939;
			["time"] = "2026-7-1 21:59:0.65";
		};
		[6] = {
			["data"] = 29.200000762939;
			["time"] = "2026-6-30 21:59:0.171";
		};
		[7] = {
			["data"] = 29.200000762939;
			["time"] = "2026-6-29 21:59:1.916";
		};
	};
User avatar
waltervl
Posts: 7020
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Rain

Post by waltervl »

What version are you on as I remember something similar for counters and that was fixed.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Filip
Posts: 135
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Rain

Post by Filip »

Thanks Walter!
I am using v2026.2 (docker image), compile date 2026-05-31 16:30:50.
Post Reply