Take action if particular sensor is online

Hi all, I was curious if there would be a way to use rule machine (or anything else) to create an action that only occurs if a given device is both present and reporting data at a particular time of day? I've attached a Shelly Uni to my boat's breaker panel, intending to use it as a way to detect if I've forgot to turn off the battery disconnects at the end of the day. So, if that particular Uni is reachable and reporting voltage at lets just say sunset, or any arbitrary evening time, then I've left the battery on and I need Hubitat to take an action. I've set up numerous rules related to changing values, motion, etc. but haven't found anything obvious to act on a sensor being present at a particular time, or reporting data at a particular time. I can't trust that if left on the data being reported (battery voltage) would change significantly, nor is there a particular expected value range because it will differ from left on or left on with battery maintainer attached.

Thanks!

One of the actions in Rule Machine 5.1 is "Ping an IP address". It is nested under "Send, Speak, or Log a Message, Send HTTP Request".

Then at the time of your choice (as trigger), send a ping to the Shelly Uni (give it a static IP). If there is a ping response, then you know it is still online, and you can do whatever other actions you want. There's a great rule from @damianm that explains how to use Ping.

2 Likes

Thanks; that sounds great. It may false negative in my case due to packet loss from the Uni's back to the outdoor AP and their low power, but I'll just have it try several times which should catch it if it's on.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.