- Table of Contents
- Features
- Prerequisites
- Bot creation
- Installation
- Performance
- Supported devices
- Donation
- Authentication
- User Authentication based on telegram unique username
- Administrator access logs push
- Authorization
- Access Control List on single cameras for single user
- MQTT
- Notifications
- Realtime motion detection images from MQTT
- Realtime sound detection
- Status notification
- Baby crying notification
- Switch MQTT messages on and off
- Notifications
- Snapshot
- Ask for last snapshot from cameras
- Video
- Ask for n-th last video from cameras
- Audio
- Text to Speech to cameras
- Send Audio to cameras
- Switch
- Switch entities, like shelly relays
Install correct YI-Hack firmware for your camera:
Install:
- Docker
- Docker compose
- Needed for motion detection images and messages
- Create a Telegram Bot with BotFather
- Write down Token
- Copy commands from
botCommands.txt
and paste on BotFather commands for your bot
- Create a config.yaml. See
config-example.yaml
- Bot mode of operation, choose one of:
- (DEFAULT) Polling bot: The bot will ask to Telegram servers if there are new updates. No port to open
- WebHook:
The bot act in a passive way, very performant, but need to open port and generate certificates
- uncomment
telegram_bot.start_web_hook()
inmain.py
- open port 88 on router.
- Create a
cert.pem
andprivate.key
with openssl. Place them in top folder. See WebHook guide
- uncomment
Very simple
docker-compose up -d --build
- Install python
- Create a virtual environment
- Install python modules
pip3 install -r requirements.txt
- Run main.py
(venv) python main.py
Bot performance depends on camera availability and MQTT delay.
- MQTT: all devices with MQTT support
- REST API: all devices with REST API support
All MQTT and REST API cameras.
- YIHacks: cameras supported by Yi-Hack projects
- Reolink: cameras with Rest API by Reolink
All MQTT and REST API switches.
- Shelly: relays