Running Changedetection.io on the Raspberry Pi

This tutorial will show you how you can run changedetection.io on your Raspberry Pi.

Raspberry Pi Changedetection.io

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.

Please note for the best experience, you will need to use the 64-bit version of Raspberry Pi OS. However, Changedetection.io still works fine on 32-bit. You just won’t be able to detect changes on websites that require JavaScript to display.

Equipment

Below is a list of the equipment we used to set up Changedetection.io on our Raspberry Pi.

Recommended

Optional

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.

mkdir ~/changedetection

2. With our new directory created, we must change into by using the cd command as shown below.

cd ~/changedetection

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.

nano docker-compose.yml

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.

hostname -I

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.

192.168.0.134

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.

http://IPADDRESS:5000

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.

  1. First, you will want to enter the URL (1.) that you want your Raspberry Pi to watch for changes.
  2. Next, you can optionally specify a group name (2.) for this particular change detection watcher.
  3. You now have a choice to either save this watcher immediately (3.) by clicking the “Watch” button.

    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.

Add new website to watch for changes

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.

General Watcher Settings

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“.

  1. 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.

    This method is great when you don’t have to worry about JavaScript.
  2. WebDriver Chrome/JavaScript: You will want to use this option when the website you are checking requires JavaScript to render.

    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.
Raspberry Pi Changedetection.io Request Settings

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.

Filters and Triggers

7. The final tab we are looking at is potentially one of the most important, the “Notifications” tab.

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.

Changedetection.io Notification Settings

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.

Changedetection.io Running on the Raspberry Pi

Updating Changedetection.io On the Raspberry Pi

In this section, we will be walking you through the quick and easy steps of updating the Changedetection software on your Raspberry Pi.

Since we are using Docker to run this software, we can update it using a few short commands.

1. Your first step is to change to the directory where we wrote the Compose file for Changedetection.

If you followed this tutorial exactly, you should be able to get to this directory by using the command below.

cd ~/changedetection

2. Once we are in the right place, we can get Docker to pull the latest version of Changedetection to our Raspberry Pi by running the command below.

Docker will only download the image if a new version is available, and then it will only download the updated layers.

docker compose pull

3. Finally, once a new version has been downloaded, you must get Docker to restart the container and move to the new image.

You can achieve this by using the same command you used to start the software. Run the command below to get Docker to check for the new image and move over to it.

docker compose up -d

Conclusion

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.

Be sure to check out our many other Raspberry Pi projects. An example of various others you might like is our Internet speed monitor and our FreshRSS installation guide.

2 Comments

  1. Avatar for Thomas Andersson
    Thomas Andersson on

    Hi!
    How do I perform an update when a new release of Changedetection is available?

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi Thomas,

      I have updated the guide to walk you through the process of updating the Changedetection software on your Raspberry Pi.

      Please let me know if you have any additional questions.

      Kind regards,
      Emmet

Leave a Reply

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