My Home Assistant (RPi4) keeps crashing. I'm not sure why, but I need to keep it running. My first plan was to task another computer on the network (I have many...) to ping the HA RPi4 every minute or so and cycle power on the HA server if the ping fails. Now (after upgrading HA to the most recent release...) HA crashes, but the host is still pingable. That sucks.

So, how can I check my HA host from another server on the same LAN and be sure HA itself is healthy? Suggestions?

I'm likely just coding a little Python program. I'll cycle power by plugging the HA host into an IoT plug, cycling it using MQTT /Tasmota (MQTT server is not a container on my HA server, it's on another device).

  • Aren't you able to use a script on the RPi4 that makes sure that the exe will be restarted if it dies? Using deamon for example. (I don't know whether that is supported on RPi4.) Jul 6 at 15:12
  • HassOS uses a leaned down version of Raspian, so the OS is stunted. I wouldn't know where to start.
    – JimS-CLT
    Jul 7 at 14:27

There is a REST API call you can make to HA to check if it's alive:


If HA is running, the call will return this:

{"message": "API running."}

You do need to authenticate though. The simplest way: generate a long-lived access token at the bottom of a user's profile page on the HA UI, then use it in a script or a curl request like this:

curl -X GET http://your.homeassistant.ip/api/ -H 'Authorization: Bearer <long lived access token>' 
New contributor
Gabor Herman is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.