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.
- Add
node-red-contrib-object-hash
to Node-RED’s configuration. - Tell Node-RED to do an HTTP GET on each site once an hour.
- Take the result of the HTTP GET and perform a hash on the results.
- Create a Home Assistant sensor using MQTT with the URL and the hash in it.
- 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.
You can download the flow here.