blob: e606dca16d84a56c6375786ed9a38c97e38c772e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# 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 a stable release (1.x).
## 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
sudo ssh-keyscan -t rsa <fileserver_ip_or_host> >> /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://<raspberry_pi_ip>:<specified_port>` (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
```
|