SOLVED: Tasmotized Sonoff RF Bridge Integration with Home Assistant

Hey everyone, I thought I’d share my recent experience with integrating a Tasmotized Sonoff RF Bridge into Home Assistant. I’ve been exploring the world of DIY smart home solutions, and this project was both exciting and a bit challenging. Here’s what I learned along the way:

The Setup
I started by following the excellent tutorials from DrZzs on YouTube to flash my Sonoff RF Bridge with Tasmota. It was a smooth process, and I was impressed by how user-friendly Tasmota’s web interface is. The next step was configuring MQTT in Home Assistant, which I found a bit overwhelming at first, but with some research, it started to make sense.

MQTT Configuration
I created a dedicated MQTT user in Home Assistant and entered the credentials into the Sonoff bridge’s config. The logs looked promising, showing sensor events being generated and state updates being sent. However, when I tried setting up binary sensors in Home Assistant, nothing seemed to work. The state changes just weren’t appearing. I was stuck!

Troubleshooting
After hours of digging through logs and forums, I realized that the issue might be with how I structured my MQTT sensor configurations. I decided to break it down step by step:

  1. Verify MQTT Connectivity

    • I checked the MQTT logs to ensure the bridge was publishing messages to the correct topics. It was, but I noticed some ‘client id not available’ messages. I’m still not entirely sure what that means, but I suspect it’s a minor quirk.
  2. Test with a Simple Sensor

    • I simplified my sensor setup to rule out any configuration errors. This helped me identify that the issue wasn’t with the MQTT connection itself but with how I was mapping the sensor data.
  3. Adjust the Value Template

    • The key was realizing that the value_template needed to correctly parse the JSON data from the bridge. I adjusted it to extract the Data field properly, and voilà! The sensor started responding as expected.

The Fix
Here’s the corrected sensor configuration I ended up with:
yaml

  • platform: mqtt
    state_topic: “tele/rfbridge/RESULT”
    name: “Entrance Door”
    value_template: ‘{{ value_json.RfReceived.Data }}’
    payload_on: “12345A”
    payload_off: “12345E”
    device_class: door
    qos: 1

Lessons Learned

  • MQTT Debugging: Logs are your best friend. Take the time to understand what each log line means—it can save you hours of frustration.
  • JSON Parsing: Ensure your value_template accurately reflects the structure of the incoming MQTT message.
  • Community Support: Don’t hesitate to reach out to forums like this one. Someone has likely encountered the same issue and can offer a solution.

Final Thoughts
This project taught me the importance of meticulous configuration and the value of persistence. I’m thrilled to have the RF bridge working seamlessly with Home Assistant. It’s a fantastic way to integrate legacy devices into a modern smart home setup. If anyone has questions or runs into similar issues, feel free to reach out—I’d be happy to help!

Happy tinkering! :rocket: