# birdscan A software to take beautiful pictures of birds with a Raspberry Pi Camera. The complete system consists of two machines: 1. The _Raspberry Pi_ with a Raspberry Pi Camera 2. A _file server_ which stores the pictures The Raspberry Pi runs a web server as the main user interface. With this interface the user can take pictures manually. Afterwards the pictures are transferred via SSH to the file server. **Current State**: Please do not try to use this software if you are not willing to invest time on your own for development. Some things are currently in a not acceptable state for production use: - Software depends on Python 3.9 - Changes on the camera interface from the Raspberry Pi Foundation found there way into Arch Linux ARM and break this software. The new camera interface is not used in this software. - The documentation is far from optimal - There is no current release which targets production ## Expected Environment / Target Platform This software is written for Arch Linux. Nevertheless it should run on any systemd-based Linux distribution (e.g. Raspberry Pi OS). ## Installation These installation steps are necessary to get the software working: 1. Install the birdscan software on the Raspberry Pi 2. Allow the `birdscan` user to access the target folder on the file server via SSH 3. Configure the birdscan software on the Raspberry Pi 4. Install a script for file transfer 5. Start and enable services All these steps are covered in the following sections. ### Install the birdscan Software Installation is currently just supported for Arch Linux. #### Arch Linux Install and configure birdscan in these few steps on an Arch Linux system: ``` # create directory for Arch Build System mkdir -p ~/ABS # create a directory for the arch build system cd ~/ABS # install picamera dependency from AUR (Arch User Repository) git clone https://aur.archlinux.org/python-picamera.git # download picamera # from AUR cd picamera makepkg -si # build and install picamera dependency # clone, compile and install birdscan cd ../ git clone https://src.xengineering.eu/xengineering/birdscan.git cd birdscan make -C archlinux all # builds the Arch package in the archlinux subfolder make -C archlinux install # installs the Arch package ``` ### SSH and File Server Setup `TODO`: This section needs more details ... Some notes: ``` ssh-keygen -y -f ~/.ssh/id_rsa # generates and prints public key of this # private one sudo mkdir /srv/birdscan sudo chown -R birdscan:birdscan /srv/birdscan sudo chmod -R 700 /srv/birdscan sudo setfacl -m u:myuser:rwx /srv/birdscan # add host key of fileserver: sudo ssh-keyscan -t rsa >> /etc/ssh/ssh_known_hosts ``` ### birdscan Configuration Just edit the configuration file like this: ``` sudo nano /etc/birdscan/config.json ``` Note: If the software is already running and you edited the configuration file, you will have to restarte the software like this: ``` sudo systemctl restart birdscan ``` ### Install a Script for File Transfer `FIXME`: Document or automate this step There is some stuff in the `./tmp` folder ... ### Start and enable Services Just start and enable the birdscan software with this command: ``` sudo systemctl enable --now birdscan ``` ## Usage Just open your web browser at `http://:` (e.g. `http://192.168.1.78:8080`). ## Debugging If something does not work, you are welcome to read the detailed log messages like this: ``` journalctl -fu birdscan # -f enables a live log view ```