With this bot, you can capture images with camera module on your Raspberry Pi.
Install Go and generate your Telegram bot's API token.
$ go get -d github.com/meinside/telegram-rpi-camera-bot
$ cd $GOPATH/src/github.com/meinside/telegram-rpi-camera-bot
$ cp config.json.sample config.json
$ vi config.json
and edit values to yours:
{
"available_ids": [
"telegram_id_1",
"telegram_id_2",
"telegram_id_3"
],
"monitor_interval": 3,
"image_width": 1600,
"image_height": 1200,
"is_verbose": false,
"api_token": "0123456789:abcdefghijklmnopqrstuvwyz-x-0a1b2c3d4e"
}
You can also use Infisical for retrieving your bot api token:
{
"available_ids": [
"telegram_id_1",
"telegram_id_2",
"telegram_id_3"
],
"monitor_interval": 3,
"image_width": 1600,
"image_height": 1200,
"is_verbose": false,
"infisical": {
"client_id": "012345-abcdefg-987654321",
"client_secret": "aAbBcCdDeEfFgG0123456789xyzwXYZW",
"workspace_id": "012345abcdefg",
"environment": "dev",
"secret_type": "shared",
"api_token_key_path": "/path/to/your/KEY_TO_API_TOKEN"
}
}
$ go build
$ docker-compose build
$ docker-compose build --build-arg RPI=raspberry-pi2
$ docker-compose build --build-arg RPI=raspberry-pi
$ ./telegram-rpi-camera-bot
$ sudo cp systemd/telegram-rpi-camera-bot.service /etc/systemd/system/
$ sudo vi /etc/systemd/system/telegram-rpi-camera-bot.service
and edit User, Group, WorkingDirectory and ExecStart values.
It will launch automatically on boot with:
$ sudo systemctl enable telegram-rpi-camera-bot.service
and will start with:
$ sudo systemctl start telegram-rpi-camera-bot.service
$ docker-compose up -d
TODO
MIT