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.
I searched on the forum how to use ID255 but found nothing practical
https://forum.mysensors.org/topic/8941/mysensors-get-temperature-value-from-another-node-through-the-gateway?_=1684325843882&lang=fr
https://github.com/mysensors/MySensors/blob/development/examples/PingPongSensor/PingPongSensor.ino
i had my answer on ahtxx issue
Hi,
...figured out that the _address is messed up (i guess by mysensors).
It is impossible, because _address is private variable. The private data members cannot be accessed from outside the class (mysensors can not see it).
Сan you try my original library but with class initialization line
AHTxx aht10(0x38, AHT1x_SENSOR); //sensor address, sensor type