Website Monitoring using Home Assistant and Node-RED

Recently I was asked by a Scout unit to try to let them know when an event was available for signup. While there are sites that allow you to do this, I didn’t want to have to signup for another site so I decided to figure out how to get Home Assistant to notify me of changes. I’ve written in the past about using Node-RED with Home Assistant and while Home Assistant has made it easier to create automations without having to use YAML, I still find that Node-RED is a much cleaner and simpler way of creating and viewing automations.

So I started trying to figure out how to get Node-RED to check websites and notify me. Turns out the process was pretty easy.

  1. Add node-red-contrib-object-hash to Node-RED’s configuration.
  2. Tell Node-RED to do an HTTP GET on each site once an hour.
  3. Take the result of the HTTP GET and perform a hash on the results.
  4. Create a Home Assistant sensor using MQTT with the URL and the hash in it.
  5. Wait for a change in the hash and then notify me of the change (I use Slack right now).

It’s a pretty simple slow and the downsides are that there is a slim chance that a change would trigger a hash change (hash collisions are possible, but rare) and it doesn’t tell me what the change actually is.

I’m sure there are other ways to monitor sites, but I don’t have to rely on others for this. While the notification uses Slack, I can switch out the notification to any other method.

Picture of Node-RED Flow

You can download the flow here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.