Hi,
I’ve created a water detection sensor using MySensors and successfully connected it to my VeraPlus and all is working OK. Now, I would like to add a “heartbeat” function to announce when something might be wrong with the sensor.
I have not decided on the final heartbeat rate but I was thinking about something in the 1 or 2 minute range. Given the relatively slow rate I thought there might be several ways to monitor this is Vera.
My concept is to have the heartbeat created every minute then verify it occurred every 2 minutes.
My question is what would be the best approach?. I believe PLEG could accomplish this easily however I would prefer to handle it without an add on.
I see a few ways:
[ol][li]Run a scene every 2 minutes and check if the heartbeat was set to 1 or maybe true. It could be stored in a local variable or a MyString entry.[/li]
[li]Use the luup.call_timer and somehow sense the heartbeat state. I’m not sure how this would be implemented but I don’t mind learning how. I think the docs can help me here.[/li][/ol]
Thanks,
John