Hey everyone, I’m currently facing a challenge with my smart home setup, and I’m hoping the community can offer some insights or solutions. I’ve been using a somewhat hacky Expect script to monitor if certain devices, like my doorbell sensor or intruder alarm, go offline. While it works, it’s not exactly efficient, and I’d love to find a more streamlined approach.
I’ve come across the ability to check the status of a Thing in OpenHAB rules, which seems promising. For example, using something like:
java
var status = ThingAction.getThingStatusInfo(“zwave:device:zstick:node51”).getStatus()
logInfo(“TEST”,“Status is:{}”,status.toString())
This could be a game-changer, but the issue is that I have dozens of devices to monitor. Writing separate lines for each one feels repetitive and not scalable. I’m wondering if there’s a smarter way to loop through all my Things or group them in a way that makes this process more efficient.
I’ve looked at some example code, but it seems tailored for the console rather than for rules. Has anyone successfully implemented something similar or found a more elegant solution? Any tips or tricks would be greatly appreciated!
Thanks in advance for your help and insights! ![]()