Depending what's connected to a relay, I wouldn't make it go on or off depending on the controller state. It can lead to dangerous behaviour and it's prohibited by law in my country. In all honesty I have my Sensors running for a long long time. It's stable and more reliable than anything else I have running in my home. But like @eiten says yo could write a sketch that queries for a variable. But I think I'd go for a controller side solution. That would "ping" my node and send a nottfication to my phone whenever the node can't be reached.