RF devices with Sonoff RF Bridge on Tasmota Firmware: get sensor state on startup

Yesterday I received my IR sensors that are sending 2 codes (on & off) as well as a Sonoff RF Bridge.
I flashed the bridge with Tasmota and did install a bunch of my sensor. So far all is working fine - except this issue:

Whenever I restart Home Assistant the state of every single sensor is lost and all are set to closed.

Here’s my binarysensors.yaml

## Window Sensors
- platform: mqtt
  name: "Livingroom Window 01 left"
  state_topic: "tele/rf1/RESULT"
  value_template: '{{value_json.RfReceived.Data}}'
  payload_on: "32E70A"
  payload_off: "32E70E"
  device_class: window
  qos: 1

- platform: mqtt
  name: "Livingroom Window 02 left"
  state_topic: "tele/rf1/RESULT"
  value_template: '{{value_json.RfReceived.Data}}'
  payload_on: "32FC0A"
  payload_off: "32FC0E"
  device_class: window
  qos: 1

- platform: mqtt
  name: "Livingroom Window 03 left"
  state_topic: "tele/rf1/RESULT"
  value_template: '{{value_json.RfReceived.Data}}'
  payload_on: "33B10A"
  payload_off: "33B10E"
  device_class: window
  qos: 1

- platform: mqtt
  name: "Livingroom Window 03 right"
  state_topic: "tele/rf1/RESULT"
  value_template: '{{value_json.RfReceived.Data}}'
  payload_on: "33B20A"
  payload_off: "33B20E"
  device_class: window
  qos: 1

- platform: mqtt
  name: "Master Bedroom Window 01 left"
  state_topic: "tele/rf1/RESULT"
  value_template: '{{value_json.RfReceived.Data}}'
  payload_on: "302D0A"
  payload_off: "302D0E"
  device_class: window
  qos: 1

Is there an option to get / set the state for each sensor after Home Assistant restarts?

Thanks in advance!

I got around this issue by creating TASMOTA rules on the RF Bridge to send custom (retained) mqtt topics for each entity with on/off payloads. Because they’re retained, HA will pick them up on restart. You can’t retain the current topic you have set up because it’s the same for every entity.

Here are my rules for my RF stuff:

on rfreceived#Data=XXXXXX do publish2 BackDoor/STATE ON endon on rfreceived#Data=XXXXXX do publish2 BackDoor/STATE OFF endon on rfreceived#Data=XXXXXX do publish2 SideDoor/STATE ON endon on rfreceived#Data=XXXXXX do publish2 SideDoor/STATE OFF endon on rfreceived#Data=XXXXXX do publish2 EnsuiteDoor/STATE ON endon on rfreceived#Data=XXXXXX do publish2 EnsuiteDoor/STATE OFF endon

Thanks @SteveDinn!

That was exactly what I needed. I also found - according to your solution - a video that explains it in detail:

Sonoff RF Bridge Easy Setup with Tasmota Rules and the trigBoard

What I did:

Created a rule in the Tasmota interface of the RF Bridge:
rule1 on rfreceived#Data=32E70A do publish2 RFBridge/LRW01Left Open endon on rfreceived#Data=32E70E do publish2 RFBridge/LRW01Left Closed endon

Activated the rule in the Tasmota interface of the RF Bridge:
rule1 1

:nerd_face:-mode on
In case you want to deactivate the rule again (for whatever reason):
rule1 0
:nerd_face:-mode off

Updated my binarysensor.yaml (just the example for the rule above):

- platform: mqtt
  name: "Livingroom Window 01 left"
  state_topic: "RFBridge/LRW01Left"
  availability_topic: "tele/rf1/LWT"
  qos: 1
  payload_on: "Open"
  payload_off: "Closed"
  payload_available: "Online"
  payload_not_available: "Offline"
  device_class: window

Yep. That’s it! I just kept my payloads to ‘on’ and ‘off’ to use less characters in the rules.

Thanks again! You made my day!

1 Like

That’s awesome. Thanks for the info.
How many rules can you put on the RF Bridge?

@RDM
that is the next issue I am facing right now!
You can have 3 rules where each rule can be a combination of various rules as long as the max chars are less than 511.

See Tasmota wiki

That is not enough for my setup :frowning:

Is there any other option how I could retain the state of each binary sensor?

It’s not very elegant, but this was the best way I could do it.

@wills106
That sounds promising! I’ll give it a try!

I was also wondering if there an option to add a wildcard to the rules and get/set the data attribute dynamically as well as the topic?

Like:
on rfreceived#Data={DYNAMIC_VALUE}A do publish2 RFBridge/{DYNAMIC_ENTITY} On endon

I’ve been dealing with this exact issue all weekend. rules are great but not enough space for them all.

I did this in nodeRED. i do a mqtt-in - > JSON - > switch (reads code and sends to the correct node) - > change node (i strip the payload and then add the mqtt topic, qos, retain, and payload - > mqtt out to HA.

works and expandable too

@jwoodard80 that sounds like a much more scalable model. Do you have an example you could share please?

Absolutely! I’ll try to find a way to export it

@jwoodard80 thanks so very much. That’s awesome.
More than I could have created myself. Thanks for your assist.

Hopefully this shows better than it did last night… had issues with my internet connection. :slight_smile:

[{“id”:“e6c10435.fd7f98”,“type”:“tab”,“label”:“433mhz to MQTT”,“disabled”:false,“info”:“This takes 433mhz input and outputs to the correct MQTT topic”},{“id”:“7ceb86b2.01f3f8”,“type”:“mqtt in”,“z”:“e6c10435.fd7f98”,“name”:“Sonoff RF Incoming”,“topic”:“house/rfbridge1/tele/RESULT”,“qos”:“0”,“broker”:“2b51ea82.8463b6”,“x”:100,“y”:200,“wires”:[[“428ee070.8fd66”,“84f4f92c.ade0f8”]]},{“id”:“428ee070.8fd66”,“type”:“debug”,“z”:“e6c10435.fd7f98”,“name”:“”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:320,“y”:130,“wires”:},{“id”:“84f4f92c.ade0f8”,“type”:“json”,“z”:“e6c10435.fd7f98”,“name”:“Convert to Object”,“property”:“payload”,“action”:“obj”,“pretty”:false,“x”:260,“y”:280,“wires”:[[“76b181d9.a1faa”,“47fd8e3d.42284”]]},{“id”:“76b181d9.a1faa”,“type”:“debug”,“z”:“e6c10435.fd7f98”,“name”:“JSON to Object”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“x”:480,“y”:240,“wires”:},{“id”:“47fd8e3d.42284”,“type”:“switch”,“z”:“e6c10435.fd7f98”,“name”:“Select Door and State”,“property”:“payload.RfReceived.Data”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“30BE0A”,“vt”:“str”},{“t”:“eq”,“v”:“30BE0E”,“vt”:“str”},{“t”:“eq”,“v”:“33530A”,“vt”:“str”},{“t”:“eq”,“v”:“33530E”,“vt”:“str”},{“t”:“eq”,“v”:“2FEF0A”,“vt”:“str”},{“t”:“eq”,“v”:“2FEF0E”,“vt”:“str”},{“t”:“eq”,“v”:“30220A”,“vt”:“str”},{“t”:“eq”,“v”:“30220E”,“vt”:“str”},{“t”:“eq”,“v”:“2D670A”,“vt”:“str”},{“t”:“eq”,“v”:“2D670E”,“vt”:“str”},{“t”:“eq”,“v”:“33380A”,“vt”:“str”},{“t”:“eq”,“v”:“33380E”,“vt”:“str”},{“t”:“eq”,“v”:“32760A”,“vt”:“str”},{“t”:“eq”,“v”:“32760E”,“vt”:“str”},{“t”:“eq”,“v”:“2F010A”,“vt”:“str”},{“t”:“eq”,“v”:“2F010E”,“vt”:“str”},{“t”:“eq”,“v”:“2ED50A”,“vt”:“str”},{“t”:“eq”,“v”:“2ED50E”,“vt”:“str”},{“t”:“eq”,“v”:“2CF00A”,“vt”:“str”},{“t”:“eq”,“v”:“2CF00E”,“vt”:“str”},{“t”:“eq”,“v”:“32580A”,“vt”:“str”},{“t”:“eq”,“v”:“32580E”,“vt”:“str”}],“checkall”:“false”,“repair”:false,“outputs”:22,“x”:490,“y”:470,“wires”:[[“31e6e3da.39580c”],[“1e7a7f66.2c37d1”],[“2d21974f.0969d8”],[“f9c8103c.ed944”],[“23d35be0.d23004”],[“c500a26e.4ca64”],[“acb1b975.58bd68”],[“dae5d5ae.1a3f78”],[“7fc87cf9.05a724”],[“af3b73b3.2f0d6”],[“76d72240.1dbd1c”],[“4ace0758.f04d08”],[“9289e22.928fc2”],[“fb20963a.819728”],[“bf193261.8abd6”],[“60af8b2.da78474”],[“89b76642.dbc618”],[“d74df00f.a5e05”],[“a32a4909.5986c8”],[“2b5887cb.89d0b8”],[“5801191a.4fa798”],[“a205853c.977708”]],“outputLabels”:[“Girls Door Opened”,“Girls Door Closed”,“M. Bath Door Opened”,“M. Bath Door Closed”,“Front Garage Opened”,“Front Garage Closed”,“Shop Door Opened”,“Shop Door Closed”,“M. Bedroom Door Opened”,“M. Bedroom Door Closed”,“Front Door Opened”,“Front Door Closed”,“Back Door Opened”,“Back Door Closed”,“Office Door Opened”,“Office Door Closed”,“Boys Door Opened”,“Boys Door Closed”,“Garage Cover Opened”,“Garage Cover Closed”,“Garage Door Opened”,“Garage Door Closed”]},{“id”:“1af48cab.b6e013”,“type”:“debug”,“z”:“e6c10435.fd7f98”,“name”:“Test Open - Attach to node to test”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“x”:1290,“y”:80,“wires”:},{“id”:“76232b7b.e90934”,“type”:“debug”,“z”:“e6c10435.fd7f98”,“name”:“Test Closed - Attach to node to test”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“x”:1290,“y”:130,“wires”:},{“id”:“1e7a7f66.2c37d1”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Girls Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/Girls_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:800,“y”:100,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“31e6e3da.39580c”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Girls Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/Girls_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:810,“y”:60,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“ba9e79d4.7bd868”,“type”:“mqtt out”,“z”:“e6c10435.fd7f98”,“name”:“Send to Home Assistant”,“topic”:“”,“qos”:“”,“retain”:“”,“broker”:“2b51ea82.8463b6”,“x”:1430,“y”:530,“wires”:},{“id”:“f9c8103c.ed944”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“M. Bathroom Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/m_bath_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1040,“y”:240,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“2d21974f.0969d8”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“M. Bathroom Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/m_bath_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1040,“y”:200,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“dae5d5ae.1a3f78”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Shop Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/shop_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:790,“y”:490,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“acb1b975.58bd68”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Shop Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/shop_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:800,“y”:450,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“af3b73b3.2f0d6”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“M. Bedroom Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/m_bed_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1040,“y”:320,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“7fc87cf9.05a724”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“M. Bedroom Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/m_bed_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1040,“y”:280,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“d74df00f.a5e05”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Boys Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/Boys_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:800,“y”:180,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“89b76642.dbc618”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Boys Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/Boys_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:800,“y”:140,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“60af8b2.da78474”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Office Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/office_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:820,“y”:400,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“bf193261.8abd6”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Office Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/office_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:820,“y”:360,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“fb20963a.819728”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:" Back Door - Closed",“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/back_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1050,“y”:560,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“9289e22.928fc2”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Back Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/back_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1060,“y”:520,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“c500a26e.4ca64”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Front Garage Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/f_garage_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:810,“y”:800,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“23d35be0.d23004”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Front Garage Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/f_garage_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:810,“y”:760,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“4ace0758.f04d08”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Front Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/front_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1050,“y”:640,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“76d72240.1dbd1c”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Front Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/front_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:1060,“y”:600,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“a205853c.977708”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Garage Door - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/garage_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:790,“y”:710,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“5801191a.4fa798”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Garage Door - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/garage_door”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:790,“y”:670,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“2b5887cb.89d0b8”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Garage Cover - Closed”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/garage_cover”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“OFF”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:800,“y”:890,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“a32a4909.5986c8”,“type”:“change”,“z”:“e6c10435.fd7f98”,“name”:“Garage Cover - Opened”,“rules”:[{“t”:“delete”,“p”:“payload”,“pt”:“msg”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“house/433mhz/garage_cover”,“tot”:“str”},{“t”:“set”,“p”:“qos”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“retain”,“pt”:“msg”,“to”:“true”,“tot”:“str”},{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“ON”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:800,“y”:850,“wires”:[[“ba9e79d4.7bd868”]]},{“id”:“2b51ea82.8463b6”,“type”:“mqtt-broker”,“z”:“”,“name”:“Home Assistant”,“broker”:“192.168.0.1”,“port”:“1883”,“clientid”:“”,“usetls”:false,“compatmode”:true,“keepalive”:“60”,“cleansession”:true,“birthTopic”:“”,“birthQos”:“0”,“birthPayload”:“”,“closeTopic”:“”,“closeQos”:“0”,“closePayload”:“”,“willTopic”:“”,“willQos”:“0”,“willPayload”:“”}]

2 Likes

Thanks @jwoodard80 worked like a charm. Much smarter way than using rules on the bridge, and easier to troubleshoot or add more devices.

Thanks gain for your help.

You’re very welcome… glad it helped you!

@jwoodard80
Thanks a lot!!!
I just gave your solution a try. Had to start now finally with Node-Red :slight_smile:

First tests are working like a charm!

Awesome! Glad I could help the community the way everyone has helped me.

I just replay this in another similar question, Mqtt.py log warning "No matching payload found for entity"
I was finally able to apply the patch suggested, but I copied all under MQTT for v0.9 under my custom-folder then commented those 4 lines in binary_sensor.py suggested by kanga_who, this was after successfully using nodRed suggestion by jwoodard80 but in my case having many rf senseros, it was just cleaner doing this directly with the binary_sensor.yaml, I downloaded ver 0.9 from https://github.com/home-assistant/home-assistant/releases and from the home-assistant-0.90.0.zip file i copied the complete mqtt folder inside homeassistant/components/ folder into my custom_components folder, them comment the 4 suggested lines, and I have no more warnings when I have an RF sensor, triggering in a different mqtt bibary_sensor. but fully agree with wmrato this should be reverted on the official release and not being patched

hello
i am using rf433 and a contact sensor
the data it send is the following:

20:46:30 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12300,"Low":410,"High":1220,"Data":"E8AC99","RfKey":"None"}}
20:46:35 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12350,"Low":420,"High":1220,"Data":"E8AC99","RfKey":"None"}}
20:46:38 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12250,"Low":410,"High":1220,"Data":"E8AC99","RfKey":"None"}}
20:46:42 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12260,"Low":410,"High":1230,"Data":"E8AC99","RfKey":"None"}}
20:46:54 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12230,"Low":410,"High":1230,"Data":"E8AC99","RfKey":"None"}}
20:46:56 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12270,"Low":410,"High":1230,"Data":"E8AC99","RfKey":"None"}}
20:47:00 MQT: tele/sonoff/RESULT = {"RfReceived":{"Sync":12360,"Low":420,"High":1220,"Data":"E8AC99","RfKey":"None"}}

can someone help me defining my binary sensor please?
thank you