# Rf remote with 4 buttons connected to a sonoff rfbridge flashed with tasmota

**URL:** https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173
**Category:** General
**Tags:** mqtt
**Created:** [14 December 2022 08:49 UTC](https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173 "2022-12-14T08:49:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Reinier](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Reinier](https://discourse.nodered.org/u/Reinier)
#### Post date: [14 December 2022 08:49 UTC](https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173/1 "2022-12-14T08:49:07Z")

</div>

Hi I am new to node-red, I made a flow to my 4-button remote and I want to switch a light on and off with button A, the flow works but it also works when I press button BCD, so it does not listen to the data message it listens to all messages on the topic, there is only 1 topic on the tasmota rfbridge.

I hope someone can help me?

I will try to copy my flow in this post.

---

<div class="post-metadata">

### Author: ![Reinier](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Reinier](https://discourse.nodered.org/u/Reinier)
#### Post date: [14 December 2022 08:49 UTC](https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173/2 "2022-12-14T08:49:46Z")

</div>

```auto
[{"id":"168759eedd4a9359","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"80aceca419e31527","type":"debug","z":"168759eedd4a9359","name":"debug 1","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":950,"y":200,"wires":[]},{"id":"b02a204edfd5dd7e","type":"ha-device","z":"168759eedd4a9359","name":"Toggle couch","server":"70d8ebe0668c351d","version":0,"debugenabled":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":1,"deviceType":"action","device":"19d23a6076a00ab80e76bdae43dfc56b","event":{"type":"toggle","device_id":"19d23a6076a00ab80e76bdae43dfc56b","entity_id":"switch.couch_lights","domain":"switch","metadata":{"secondary":false}},"capabilities":[],"outputProperties":[],"x":570,"y":340,"wires":[["80aceca419e31527","cd7688305081a332"]]},{"id":"0ee97d7a30594206","type":"mqtt in","z":"168759eedd4a9359","name":"","topic":"tele/tasmota_C37EAE/RESULT","qos":"2","datatype":"auto-detect","broker":"e62833f54f74b756","nl":false,"rap":false,"inputs":0,"x":150,"y":340,"wires":[["f2e8dceacecaefd3"]]},{"id":"f2e8dceacecaefd3","type":"json","z":"168759eedd4a9359","name":"","property":"payload","action":"","pretty":false,"x":350,"y":340,"wires":[["b02a204edfd5dd7e"]]},{"id":"0fe91de3161eaf0c","type":"inject","z":"168759eedd4a9359","name":"remote button B 85F5E8","props":[{"p":"payload.RfReceived.Data","v":"85F5E8","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":350,"y":120,"wires":[[]]},{"id":"07c88e2ecf727dd6","type":"inject","z":"168759eedd4a9359","name":"remote button A 85F5E4","props":[{"p":"payload.RfReceived.Data","v":"85F5E4","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":350,"y":60,"wires":[["b02a204edfd5dd7e"]]},{"id":"19fe3067186b7655","type":"inject","z":"168759eedd4a9359","name":"remote button C 85F5E1","props":[{"p":"payload.RfReceived.Data","v":"85F5E1","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":350,"y":180,"wires":[[]]},{"id":"295265e8b5b80380","type":"inject","z":"168759eedd4a9359","name":"remote button D 85F5E2","props":[{"p":"payload.RfReceived.Data","v":"85F5E2","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":350,"y":240,"wires":[[]]},{"id":"cd7688305081a332","type":"mqtt out","z":"168759eedd4a9359","name":"","topic":"cmnd/tasmota_C37EAE/RfKey1 payload: 6","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"e62833f54f74b756","x":870,"y":340,"wires":[]},{"id":"70d8ebe0668c351d","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":false},{"id":"e62833f54f74b756","type":"mqtt-broker","name":"","broker":"192.168.178.249","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

```

[edited by moderator]

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [14 December 2022 09:02 UTC](https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173/3 "2022-12-14T09:02:06Z")

</div>

- edit your post, use the `</>` symbol to post code.
- your flow is using home assistant, people here cannot replicate your home/setup
- create a flow with some dummy data that people can use to "emulate" your setup:

copy the input/output data from the debug nodes and your expected results.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [15 December 2022 01:23 UTC](https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173/4 "2022-12-15T01:23:53Z")

</div>

Use a debug node set to complete message object, to see what messages come from Tasmota when you press each button.

try looking at - msg.payload.RfReceived.Data

Then use a switch node to route only the messages that you want.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [13 February 2023 01:24 UTC](https://discourse.nodered.org/t/rf-remote-with-4-buttons-connected-to-a-sonoff-rfbridge-flashed-with-tasmota/72173/5 "2023-02-13T01:24:26Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
