Page 1 of 1

Detect dropping temp

Posted: Tuesday 11 January 2022 0:42
by kaNor
Hi

Is it possible to make a script that trigger an event when temperature starts to drop and not when getting below an value?

I'm using a woodburning stove for heating, but I often forget to fill new batch of wood before it gets to cold, and I have to fire up again.
So I have placed a temp-sensor nearby the stove, and trying to set up Domoticz to notify when it's time to fill more wood.
After filling with new wood, I see temperature rises, but how high depends on how mutch and type of wood.
So I cant use an exact threshold walue, Instead I want to be notified each time temp starts to drop. But I cant find any value representing rising or falling temp like the red up-arrow or blue down-arrow left of tempvalue in GUI? Is there a way to detect rising or falling temp?

br
Roald Nakstad

Re: Detect dropping temp

Posted: Tuesday 11 January 2022 0:49
by heggink
Sure. What you can do is use the dzvents data section to define some variable (or more) that calculates the average every time it is called. Use a timer to start the script. If the current temperature deviates by a determined margin from the average then alert. If not then calculate a new average.
I use this to monitor when my washer is done and measure power consumption. If that drops below a threshold for a couple of times, i know it's done. Same principle.

Sent from my SM-G980F using Tapatalk


Re: Detect dropping temp

Posted: Tuesday 11 January 2022 3:35
by solarboy
With Blockly I set a variable to equal the current temperature, then after a set period (triggered by a virtual switch that is time to turn on after a set period) i have the script run again and also compare the current temp with the previously set variable and act on this information, either to set the alarm or restart the loop.