Oct 9, 2020

Monitor your website using Home Assistant and Uptime Robot

Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.

As you might have seen in this website’s footer, I oversee quite a few websites. One way of checking whether my websites are up or down would be to repeatedly visit them throughout the day or setting up a script which regularly pings them. But who in their right mind would do something manually when you can automate it with a few lines of YAML? Introducing Uptime Robot, a service which will check the status of your websites and, as you might have guessed, integrates with Home Assistant.

Setting up Uptime Robot

To get started, you’ll want to register for a free Uptime Robot account. As with any service, you sign up with, make sure you enable two-factor authentication. For me personally, there was absolutely no need to go with the paid option because Home Assistant will take care of downtime notifications. Once your account is ready, you can add a new monitor.

Adding a new monitor in Uptime Robots

Select the HTTP(s) monitor type and enter your website’s name and URL. Finish the configuration by clicking on Create Monitor. Your site should now be monitored by Uptime Robot. The free version of Uptime Robot will check the website every five minutes. Next, you will need to create a read-only API key.

Setting up a HTTP(s) monitor in Uptime Robot

To accomplish that, navigate to the menu item titled My Settings. Scroll down until you see the API Settings. From there you can create a new read-only API key which will be used in the Home Assistant configuration.

Setting up Uptime Robot in Home Assistant

I suggest you store the Uptime Robot API key in your secrets.yaml file, as it should never be shared with anyone. In this example, I went with the name uptime_robot_api_key. You will then need to set up a new binary_sensor using YAML, as Uptime Robot can’t be configured using the UI. Add the following code:

platform: uptimerobot
api_key: !secret uptime_robot_api_key

Now reboot Home Assistant and you should see a new binary_sensor titled binary_sensor.website_name in your developer tools. If that is the case, you have successfully set up the Uptime Integration and can now start working with your new sensor.

An Uptime Robot binary sensor in Home Assistant

Using the Uptime Robot integration

Now that you have your website’s status monitored by Home Assistant, you can start using it in your automations and scripts. I also added an entity card to my Home Assistant dashboard, so I can monitor the status from the web interface.

Creating a lovelace card with statuses from Uptime Robot

The most obvious automation to set up would be to push a notification when the website goes down. Other possibilities could be turning a light red or having your Nest speakers tell you that your website is down. As with any Home Assistant integration, the possibilities are endless.

2 thoughts on “Monitor your website using Home Assistant and Uptime Robot”

Leave a comment