A telegram bot to bridge unifi-video email alerts with telegram notifications/messages in a single group. It will also send the subject of non-motion alert emails, e.g: camera disconnect/reconnect
The bot supports 3 commands:
- /start: tell the bot to send messages to the group where the command is issued, ATM only a single group is supported.
- /st, /status: show status (active/inactive)
- /ac, /activate: enable notifications
- /de, /deactivate: disable notifications, the will receive the email alerts but not forward them to telegram
in/active state is persistent, and will be maintained across restarts
- create a bot via BotFather and grab the token
- create a group and add your newly created bot to it
- create a config based on the config.yaml.example using the Token and adjust for your system/users
-
create a virtualenv:
$ python3 -m venv venv
-
install deps
$ source venv/bin/activate $ pip install -r requirements.txt
-
python ./uv_alert_bot.py config.yaml
-
install fades
-
run it
fades ./uv_alert_bot.py config.yaml
-
docker build .
-
docker run -v /path/to/config_dir/:/config --net=host
Go to https://your-unifi-video-host:7443/settings/main
- enable email alerts
- In the email settings: smtp server: IP/hostname where the bot is running port: 8025 (or the port you specified in the config.yaml)
- save changes