Hi,
My question
I want to be able to detect a peak (actually: the sudden increase of a value very quickly) in a measured value (eg humidity sensor, because there is someone showering) to start a flow (eg turn on the fan).
How to do that and the ‘problem’
Now you can (possibly started by an If… card : ‘humidity has changed’) compare a measured value every few minutes with a measured value from 3 minutes ago and if the difference is large enough let a flow trigger. That means, for an ever-changing value of itself such as humidity, that this measurement ‘loop’ often starts running. If I have more flows like that, there are often a lot of those ‘loops’, with only a real trigger every now and then because someone is showering - resulting in a ?unnecessary? CPU load for the HomeyPro23.
**Smarter? **
I checked the features of math.js | an extensive math library for JavaScript and Node.js, but I can’t find something helpful. Does anyone know a smart way to detect the rapid increase in a reading, preferably in a simple and compact way and with a low CPU load for the HomeyPro23?
Do you want to share your approach to detecting a peak/fast increasing reading?
Greetings,
Philip