Hi all,
i’m on Pi4 with Openhab4.1 most recent final release.
I have several sensors like Lora via TTN(MQTT) and quite a bunch of zigbee2mqtt sensors delivering a very decent level of “security” in my household, especially the water leak sensors help a lot and did alerady save me twice with a broken water pipe…
what happens not that often but it does that at some point of this MQTT play something crashes and sensors do not deliver any more data.
Therefore i’m looking for a way to get informed if a single sensor out of like 40 items did not update within the last 24hours. Of course i already do “expire” for some items, but its not the way to go foward and i hoped that there is a way to use the item group function.
If there is a solution/piece of rules code available that works similar to my idea, i’m very happy to continue/finalize it for my situation. Many many Thanks in advance.
Norbert
btw. i’m using InfluxDB for my persistence data storage.
@JimT Thanks for your reply. my concern is that when using like 50 timers for such sensors (even if i only use a single parameter sent into an item of these sensors) it will be a load of timers to check for the overall system. Or am i wrong and thats what its built for and even 500 would not be an issue at all?
@Matze0211 did never use/know about availability in z2m. but still i would not cover arround 50% of my sensors that come via TTN-network and simple MQTT messages.
Thanks for the jruby example for a group of items.
I never did the ruby extension, and would try to sail arround this additional construction site.
Is there another way to use all sensors in a group and have a similar functionality?
Maybe a way to check each item within the group on an update to UNDEF…(from Expire)
rule "Expire Group - Notification"
when
Member of ExpireAlert received update......
then
Sorry, i did not check that the Ruby-script also does take care of the Expire part. i tought this script would “just” simplify the centralized “alarming”.
I’m really grateful for your idea about ruby scripting. I rather would go with Expire for now to not have another script engine running on my machine in addition to learning how to handle it.
Maybe you know if this works “stable”. My idea is to check if an update is done to UNDEF…and then trigger.
But how would i write this…received update to UNDEF …or …changed to UNDEF ?
rule "Expire Group - Notification"
when
Member of ExpireAlert received update......
then