You need to get sources and cross-compile them for ARM architecture. These can be easily done by these commands, assuming you have Go installed.
go get github.com/cooldarkdryplace/camerabot
env GOOS=linux GOARCH=arm go build -v github.com/cooldarkdryplace/camerabot/cmd/camerabot
As a result you will have binary suitable for running on Raspberry Pi. Copy it on device and proceed.
Telegram bot that makes a photo and sends it to chat.
I use this bot to monitor kiln temperature and make sure workshop is not on fire yet.
Go part is responsible for interacting with Telegram API. Application uses long polling because in my case device is located behind two NATs.
Uses raspistill
(via os.exec
) to make photos.
Parametrized commands for raspistill are stored in external bash scripts.
- Setup Raspberry Pi and Pi camera.
- Set environment variable
TOKEN
with your bot token (Botfather can provide you with the one). - Use systemd config to start as a service or simply run the app from the console.
- Start direct conversation with bot or add bot to group chat if you are interested in broadcasting your kiln paranoia.
/pic
sends ordinary photo./zoom
sends zoomed and croped region of interest. Kiln controller in my case.
Currently runs on a Raspberry Pi. Using onboard V2 camera.