https://github.com/cooldarkdryplace/camerabot
Telegram bot that makes a photo and sends it to chat.
https://github.com/cooldarkdryplace/camerabot
bot camera chatbot go kiln monitoring photo raspberry-pi surveillance telegram telegram-bot
Last synced: 5 months ago
JSON representation
Telegram bot that makes a photo and sends it to chat.
- Host: GitHub
- URL: https://github.com/cooldarkdryplace/camerabot
- Owner: cooldarkdryplace
- License: mit
- Created: 2016-06-22T03:30:03.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T21:12:12.000Z (over 2 years ago)
- Last Synced: 2024-11-16T01:42:42.522Z (over 1 year ago)
- Topics: bot, camera, chatbot, go, kiln, monitoring, photo, raspberry-pi, surveillance, telegram, telegram-bot
- Language: Go
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# camerabot
[](https://travis-ci.org/cooldarkdryplace/camerabot)
[](https://goreportcard.com/report/github.com/cooldarkdryplace/camerabot)
[](https://godoc.org/github.com/cooldarkdryplace/camerabot)
## Building
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.
1. `go get github.com/cooldarkdryplace/camerabot`
2. `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.
## Software
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.
### Running bot
1. Setup Raspberry Pi and Pi camera.
2. Set environment variable `TOKEN` with your bot token (Botfather can provide you with the one).
3. Use systemd config to start as a service or simply run the app from the console.
4. Start direct conversation with bot or add bot to group chat if you are interested in broadcasting your kiln paranoia.
### Commands
1. `/pic` sends ordinary photo.
2. `/zoom` sends zoomed and croped region of interest. Kiln controller in my case.
#### Examples



## Hardware
Currently runs on a Raspberry Pi. Using onboard V2 camera.