This tutorial will show you how you can run changedetection.io on your Raspberry Pi.
Changedetction.io is a service designed to detect whether changes have been made on a specific website. This is like a more advanced version of our Python website monitor project.
This service works by grabbing a page’s output periodically. Then, anytime a change is noticed, the service can send you a notification, presenting you with an easy way of seeing what exactly changed since the last update.
The Raspberry Pi makes an excellent choice for Changedetection.io as it is a relatively low-powered device that can be affordably left running 24/7.
Below is a list of the equipment we used to set up Changedetection.io on our Raspberry Pi.
This tutorial was tested on a Raspberry Pi 400 running the latest version of Raspberry Pi OS 64-bit Bullseye.
Preparing your Raspberry Pi for Changedetection.io
Before we can install this website change detection tool, we need to install some initial software. The main thing we need to set up is Docker.
The easiest way to install and run Changedetection.io on the Raspberry Pi is through a docker container.
1. Before we proceed, we should perform an update of the package lists as well as any out-of-date packages.
You can run the following two commands to perform both of these actions.
sudo apt update sudo apt upgrade
2. With your package list up to date, we can now use the following command to install docker-compose to the Raspberry Pi.
This package contains all the software we need to download the Changedetection.io docker container to our Raspberry Pi. It will also let us install an additional package within one call.
sudo apt install docker-compose
Installing Changedetection.io on the Raspberry Pi
Once you have Docker installed on your Raspberry Pi, we can proceed to install Changedetection.io on it.
Since this website change monitor is available as a docker image, all we need to do is write a quick Docker configuration file and then “run” it.
1. Let us begin by creating a directory where we will store the “
docker-compose.yml” file we are about to create.
We can create a directory called “
changedetection” within your current user’s home directory by using the mkdir command.
2. With our new directory created, we must change into by using the cd command as shown below.
3. We can begin writing the “
docker-compose.yml” file using the nano text editor.
This file is what tells Docker how to set up one or multiple containers. In our case, this will be “
changedetection.io” and the Chromium web driver.
4. Within this file, you will want to enter the following lines depending on whether you are running a 64-bit or 32-bit version of Raspberry Pi OS.
The only difference between these two lots of code is that we can’t run the standalone Chrome browser Changedetection.io wants on a 32-bit Raspberry Pi OS.
Docker-Compose.yml for Raspberry Pi OS 64-bit
version: '2' services: changedetection: image: ghcr.io/dgtlmoon/changedetection.io container_name: changedetection hostname: changedetection volumes: - changedetection-data:/datastore ports: - 5000:5000 restart: unless-stopped browser-chrome: hostname: browser-chrome image: seleniarm/standalone-chromium:4.0.0-20211213 volumes: - /dev/shm:/dev/shm restart: unless-stopped volumes: changedetection-data:
Docker-Compose.yml for Raspberry Pi OS 32-bit
version: '2' services: changedetection: image: ghcr.io/dgtlmoon/changedetection.io container_name: changedetection hostname: changedetection volumes: - changedetection-data:/datastore ports: - 5000:5000 restart: unless-stopped volumes: changedetection-data:
5. Once you have typed in the configuration for Changedetection.io for your version of Raspberry Pi OS, you can now save and quit out of the text editor.
You can save and quit by pressing CTRL + X, followed by Y, and finally, the ENTER key.
6. Finally, we can start up Changedetection.io on our Raspberry Pi by running the following command within the terminal.
By running this command, Docker will download all of the images specified within our “
docker-compose.yml” file and start up the containers.
sudo docker-compose up -d
The Changedetection.io Web Interface
Now that we have installed the Changedetection.io software to our Raspberry Pi, we can finally access its web interface.
This part of the tutorial will show you how to access the web interface and give you a quick overview.
Accessing the Web Interface
1. You can access the changedetection.io web interface either directly on your Raspberry Pi or by accessing it from a local device.
To get the local IP address of your Raspberry Pi, you can utilize the hostname command.
Please note that you will see a bunch of different IP addresses created by Docker. Typically, your device’s IP address will be the first listed.
For example, the local IP address for our Raspberry Pi was the following.
2. Once you have your IP address handy, go to the following address within your web browser.
The main thing you will notice here is that we are using port “
5000“, as that is what changedetection.io uses by default.
Make sure to replace “
IPADDRESS” with either the IP address you got in the previous step or “
localhost” if connecting locally.
Using your Raspberry Pi’s Changedetection.io Web Interface
3. Once you have the Changedetection.io web interface open, one of the first things you will want to do is add a website to watch for changes.
You can do this directly from the dashboard easily.
- First, you will want to enter the URL (1.) that you want your Raspberry Pi to watch for changes.
- Next, you can optionally specify a group name (2.) for this particular change detection watcher.
- You now have a choice to either save this watcher immediately (3.) by clicking the “
Alternatively, you can choose to edit advanced options (4.) before the watch start by clicking the “
Edit > Watch” button.
For the following steps, we will assume that you wanted to configure your Raspberry Pi’s website change detector further.
4. We will start by checking out the “General” settings page on the Changedetection.io web interface.
You can control details such as the URL you want to be monitored for changes. One of the key things you might want to adjust is the “
Time Between Check” option.
Using this option, you can choose how long Changedetection.io will wait before it checks if a change has occurred.
5. Next is the “
Request” tab. The options on this page control how your Raspberry Pi’s website change detector will make its request.
You can control the headers and body utilized when a request is made using the options on this page.
One of the key options you may want to adjust is the “fetch method“.
- Basic fast Plaintext/HTTP Client: This is the fastest way to check if a change has occurred on a website. It is simple in that it is mindlessly grabbing the page and comparing the plain text.
As a bonus, Changedetection.io will also take a screenshot of the website when it performs its check.
Please note that you can’t select this option if you are running a 32-bit operating system on your Raspberry Pi.
6. The next tab we will look at is the “
Filters & Triggers” tab.
You can use the options in this tab to filter out content or add additional triggers. For example, if there is a certain element that is constantly changing, you can use these options to ignore it.
Additionally, you can also set text to trigger a change notification. With the “
Trigger/wait for text” option configured, a notification will only be sent if that text or regex is found on the page.
7. The final tab we are looking at is potentially one of the most important, the “
With this tab, you can set where notifications should be sent by your Raspberry Pi when it notices a change has occurred on your website.
You can read about the supported URLs and their format on the AppRise GitHub.
8. Below, you can see that we now have Changedetection.io running on our Raspberry Pi, with our newly added URL being watched for changes.
By this point in the tutorial, you should now have the Changedetection.io software running on your Raspberry Pi.
This software allows you to easily check whether a change has occurred on a website periodically.
Please comment below if you have any issues with getting this website change detector to work on your device.