Get Notified When Door Opens
In this article you will install the Telegram bot notifier integration and configure an automation, which will send to your Telegram account notification when a door is open.
Telegram Bot Notifications
First, you need to create a personal Telegram bot. For this go to the special Telegram bot @BotFather and follow instruction.
Save your token for accessing the HTTP API.
Next step is find your User Chat ID. For this use the next GetIdsBot.
Now let’s install “Telegram broadcast” integration. This integration will send messages to your Telegram.
For Robonomics pre-installed image, Home Assistant Docker or Home Assistant Core you have to edit configuration.yaml
. Connect to your Raspberry Pi via ssh
:
sudo -u homeassistant -H -s
cd
cd .homeassistant
nano configuration.yaml
Paste next lines to the end of file. Insert your bot API key and your User Chat ID. Also create a name for your notify service:
telegram_bot:
- platform: broadcast
api_key: <YOUR_API_KEY>
allowed_chat_ids:
- <YOUR_USER_CHAT_ID> # 123456789 example id of a user
notify:
- platform: telegram
name: <NOTIFIER_NAME>
chat_id: <YOUR_USER_CHAT_ID>
Save configuration and reload Home Assistant.
As result, in your Home Assistant service will be created service, which will send any message to the Telegram chat with you.
You can check it in Developer Tools menu on Home Assistant web interface.
Door Open Notification
Now it’s time to create automation. First, you import blueprint to your Home Assistant from this link:
https://github.com/airalab/home-assistant-blueprints/blob/main/door-opened-notifications/door-notifications.yaml
And create automation:
Now you will receive message from Telegram bot every time the door is open.
Couldn't complete
It was hard
It was ok
It was easy
Make a contribution
Robonomics wiki is open source. See something that's wrong or unclear? Submit a pull request.