Web interface

Running the web server

Login to the Pi

ssh pi@[your_ip]

Where [your_ip] is the IP address of your Pi.

At a command prompt, type:

cd homecage/homecage_app
python homecage_app.py

Once homecage_app.py is running you can access the web server in a browser with the address:


Where [your_ip] is the IP address of your Pi.

To stop the homecage web server, in the command prompt use keyboard ctrl+c

Viewing saved videos

Click the hard-drive icon to view saved video files.

Setting options

In the web interface

Expand the options tab to set parameters of homecage. Each option will apply to the current session. Use save options to permanaently save the options. Load the default options again with 'Load Default Options'.

On the Pi

The homecage options can be configured by editing the homecage/homecage_app/config.json file.

pico homecage/homecage_app/config.json

The default file is:

    "hardware": {
        "irLightPin": 7, 
        "whiteLightPin": 8,
        "temperatureSensor": 9, 
        "temperatureInterval": 20 
    "lights": {
        "controlLights": true, 
        "sunset": 18, 
        "sunrise": 6
    "video": {
        "fileDuration": 10, 
        "converttomp4": true, 
        "fps": 30, 
        "resolution": [
        "captureStill": true, 
        "stillInterval": 2 
    "stream": {
        "streamResolution": [