Hey everyone! I wanted to share my recent experience setting up an automation using the Aqara DJT11LM vibration sensor in Home Assistant. Initially, I faced some challenges, but I managed to get everything working smoothly. Here’s how I did it!
The Setup
I purchased the Aqara DJT11LM vibration sensor and wanted to create an automation that sends a message via Telegram when the sensor is triggered. I decided to use Home Assistant’s MQTT integration since it’s reliable and straightforward.
The Challenge
When I first set up the sensor, I noticed that the binary sensor wasn’t working as expected. I checked the logs and saw an error: No matching payload found for entity: ***** with state_topic: zigbee2mqtt/0x00158d0009c3c80e. This was frustrating, but I knew I could figure it out with some research and troubleshooting.
The Solution
After some digging, I realized the issue was with the payload configuration in the binary_sensor section. I adjusted the payload_on and payload_off values to match the expected outputs from the sensor. Here’s the corrected configuration:
yaml
binary_sensor:
- platform: mqtt
state_topic: “zigbee2mqtt/0x00158d0009c3c80e”
name: “vibrante”
payload_on: “vibrate”
payload_off: “stop”
The Automation
With the sensor correctly configured, I set up the automation to trigger on the vibration event. Here’s the automation.yaml file:
yaml
- alias: Detect Vibration
trigger:
platform: event
event_type: xiaomi_aqara.movement
event_data:
entity_id: binary_sensor.vibrante
movement_type: vibrate
action:
service: notify.telegram
data:
message: “Vibration detected!”
The Outcome
Everything works perfectly now! Whenever the sensor detects vibration, I receive a notification via Telegram. It’s a simple yet effective setup that adds an extra layer of security to my home.
Tips for Others
- Check Payloads: Ensure your binary_sensor configuration matches the sensor’s output payloads. This was the key to resolving my issue.
- Log Monitoring: Home Assistant’s logs are invaluable for troubleshooting. Always check them when something isn’t working as expected.
- Test Incrementally: Start by testing each component individually before setting up the full automation. This helps identify where the issue might be.
I hope this helps anyone else looking to set up a similar automation. Happy automating! ![]()