The pi client for Leafcast, powered by staticPi.com
Built in Rust
See typescript branch for original, now not maintained, TypeScript version
See the frontend website source here
- Raspberry pi - designed for, tested, and fully working, on a Raspberry pi zero w 2
- Pi camera, such as camera module
- staticPi - the simple and secure messaging service
- libcamera-still - should be pre-installed in recent Pi OS version
- libwebp - should be pre-installed in recent Pi OS version
See releases
download (aarch64 one liner)
wget https://www.github.com/mrjackwills/leafcast_pi/releases/latest/download/leafcast_linux_aarch64.tar.gz &&
tar xzvf leafcast_linux_aarch64.tar.gz leafcast
a) sudo ./leafcast -i
create and install systemd service file, to automatically run on boot
or
b) ./leafcast
run in current session
directory | reason |
---|---|
~/leafcast/logs |
Log files |
~/leafcast/photos |
photo storage |
~/leafcast/.env |
environmental variables |
/ramdrive/ip.addr |
ip address |
# addition to /etc/fstab
ramdrive /ramdrive tmpfs defaults,noatime,size=128K 0 0
suggested crontab
@reboot ip addr show wlan0 | grep -Po 'inet \K[\d.]+' > /ramdrive/ip.addr
*/5 * * * * ip addr show wlan0 | grep -Po 'inet \K[\d.]+' > /ramdrive/ip.addr
ip address gets updated every 5 minutes, so write to a ramdrive rather than causing repetitive, eventually damaging, writes to the pi's SD card
requires docker & cross-rs
cross build --target aarch64-unknown-linux-musl --release
orcross build --target aarch64-unknown-linux-gnu --release
Testing is a work in progress
cargo test -- --test-threads=1