Package import"zappem.net/pub/net/rpisnap"
Documentationhttps://pkg.go.dev/zappem.net/pub/net/rpisnap
Sourceshttps://github.com/tinkerator/rpisnap

rpisnap - a RPi camera client and server

Overview

This is a client package and small go tool to host a webcam view of the RPi attached camera. Go is used to host the webserver, Python3 is used to interact directly with the camera.

Install pre-requisites

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install python3-picamera2
$ sudo shutdown -r now

Build an install tools

$ git clone https://github.com/tinkerator/rpisnap.git
$ cd rpisnap
$ GOARCH=arm64 go build serve/rpisnapper.go

Copy the two programs rpisnapper and py/rpisnap.py to your RPi. The first time you run the program use the --debug argument:

$ sudo setcap cap_net_bind_service=ep ./rpisnapper
$ ./rpisnapper --debug

Then, point your browser at your pi’s http://piaddress/ to see the camera taking pictures. The accompanying client package can obtain and provide support for manipulating images from the camera in realtime.

As soon as you close your ssh session, this will cause the camera to stop working. To overcome this. Copy another file to your RPi:

$ scp rpisnapper.service pi@yourrpi:
$ ssh pi@yourrpi
$ sudo loginctl enable-linger pi
$ sudo ln -sf /home/pi/rpisnapper.service /etc/systemd/system/
$ sudo -s
# systemctl status rpisnapper.service
# systemctl unmask rpisnapper.service
# systemctl enable rpisnapper.service
# systemctl start rpisnapper.service
# exit
$ systemctl status rpisnapper.service

Troubleshooting

TODO

License info

The rpisnap package is distributed with the same BSD 3-clause license as that used by golang itself.

Reporting bugs

Use the github rpisnap bug tracker.


Markdown rendering courtesy of gomarkdown/markdown.