Hi.
I am trying to come up with a little project, but I can’t find a solution to my problem.
I would like a battery power esp to call a number, using sim800l module, when it loses connection to home assistant.
The idea behind it is that if someone cuts the power to my home, I can still be notified by that through the mobile network.
My problem is that I have no idea how to make the esp perform an action as soon as the connection with HA is lost.
Do you have any idea? Thank you.
That’s the easy part.
I would use Arduino to program the ESP. Ping the Home Assistant server every minute and if the ping fails three times, dial the number.
I would do it in ESPHome, but there is no way for an ESP running ESPHome to ping an IP address.
You might find inspiration in Detect API disconnection - #5 by martyouel
Apart from that, you could have an input_datetime in HA that gets updated every minute. You read out that sensor in ESPHome, and if you detect it didn’t change for too long, you know HA isn’t running properly anymore.
1 Like
2 Likes