Tiny Telegram bot for monitoring an Airam/Tuya door sensor status.
The tuya_util
provides a simple script for monitoring an Airam/Tuya door sensor status. It listens for UDP broadcasts from the sensor and makes a local request to the sensor. UDP is used as a trigger for the request since the device is powered off most of the time.
You'll need the device's local encryption key for this, which is easiest to get from the Tuya Cloud API. Note that reinitializing the device will change the key.
/door
- Check the status of the door sensor
- Clone the repository
- Install the requirements
pip install -r requirements.txt
- Create a
.env
file with the following content:
DEVICE_IP=<your_device_ip>
DEVICE_ID=<your_device_id>
DEVICE_KEY=<your_device_secret>
TG_KEY=<your_telegram_bot_key>
- Run the bot
python bot.py