# 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**: Although the software runs well and stable, it does so only thanks to some tricks. Also, the documentation is not yet sufficient and the installation process is not fully published. It is possible to use it, but it is recommended to wait until the first release. ## 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: ``` mkdir -p ~/ABS # create a directory for the arch build system cd ~/ABS git clone https://aur.archlinux.org/python-picamera.git # download picamera from AUR cd picamera makepkg -si # build and install picamera dependency mkdir ../birdscan cd ../birdscan # (download PKGBUILD for birdscan to current directory FIXME: insert link here) makepkg -si # build and install birdscan ``` ### SSH and File Server Setup 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 sudo ssh-keyscan -t rsa >> /etc/ssh/ssh_known_hosts # add host key of fileserver ``` ### 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 ### 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 ```