# Sonoff and tasmota

**URL:** <https://discourse.nodered.org/t/sonoff-and-tasmota/81237>\
**Category:** General\
**Tags:** node-red-dashboard, home-assistant, mqtt\
**Created:** [12 September 2023 12:09 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237 "2023-09-12T12:09:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 12:09 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/1 "2023-09-12T12:09:56Z")

</div>

Good day all i am new to this and hope someone can help me set this up i have done a basic setup for 2 switches. I am trying to make it work like a 2 way switch with the ui i get it right so that they work at the same time but when i fiscally press the buttons nothing happens only one switch on any help would be appreciated. Fyi this is my 1st nodered project

[  
{  
"id": "8765833d3a37a777",  
"type": "tab",  
"label": "Flow 1",  
"disabled": false,  
"info": "",  
"env":   
},  
{  
"id": "ea9bd8bf5edb84af",  
"type": "mqtt-broker",  
"name": "Home",  
"broker": "localhost",  
"port": "1883",  
"clientid": "",  
"autoConnect": true,  
"usetls": false,  
"protocolVersion": "4",  
"keepalive": "60",  
"cleansession": true,  
"autoUnsubscribe": true,  
"birthTopic": "",  
"birthQos": "0",  
"birthRetain": "false",  
"birthPayload": "",  
"birthMsg": {},  
"closeTopic": "",  
"closeQos": "0",  
"closeRetain": "false",  
"closePayload": "",  
"closeMsg": {},  
"willTopic": "",  
"willQos": "0",  
"willRetain": "false",  
"willPayload": "",  
"willMsg": {},  
"userProps": "",  
"sessionExpiry": ""  
},  
{  
"id": "4a49fd29f6334af2",  
"type": "ui\_tab",  
"name": "Home",  
"icon": "dashboard",  
"disabled": false,  
"hidden": false  
},  
{  
"id": "61d2850bbd4d5909",  
"type": "ui\_base",  
"theme": {  
"name": "theme-light",  
"lightTheme": {  
"default": "#0094CE",  
"baseColor": "#0094CE",  
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",  
"edited": true,  
"reset": false  
},  
"darkTheme": {  
"default": "#097479",  
"baseColor": "#097479",  
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",  
"edited": false  
},  
"customTheme": {  
"name": "Untitled Theme 1",  
"default": "#4B7930",  
"baseColor": "#4B7930",  
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"  
},  
"themeState": {  
"base-color": {  
"default": "#0094CE",  
"value": "#0094CE",  
"edited": false  
},  
"page-titlebar-backgroundColor": {  
"value": "#0094CE",  
"edited": false  
},  
"page-backgroundColor": {  
"value": "#fafafa",  
"edited": false  
},  
"page-sidebar-backgroundColor": {  
"value": "#ffffff",  
"edited": false  
},  
"group-textColor": {  
"value": "#1bbfff",  
"edited": false  
},  
"group-borderColor": {  
"value": "#ffffff",  
"edited": false  
},  
"group-backgroundColor": {  
"value": "#ffffff",  
"edited": false  
},  
"widget-textColor": {  
"value": "#111111",  
"edited": false  
},  
"widget-backgroundColor": {  
"value": "#0094ce",  
"edited": false  
},  
"widget-borderColor": {  
"value": "#ffffff",  
"edited": false  
},  
"base-font": {  
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"  
}  
},  
"angularTheme": {  
"primary": "indigo",  
"accents": "blue",  
"warn": "red",  
"background": "grey",  
"palette": "light"  
}  
},  
"site": {  
"name": "Node-RED Dashboard",  
"hideToolbar": "false",  
"allowSwipe": "false",  
"lockMenu": "false",  
"allowTempTheme": "true",  
"dateFormat": "DD/MM/YYYY",  
"sizes": {  
"sx": 48,  
"sy": 48,  
"gx": 6,  
"gy": 6,  
"cx": 6,  
"cy": 6,  
"px": 0,  
"py": 0  
}  
}  
},  
{  
"id": "f8ebd8f9631165f5",  
"type": "ui\_group",  
"name": "Passage",  
"tab": "4a49fd29f6334af2",  
"order": 1,  
"disp": true,  
"width": "6",  
"collapse": false,  
"className": ""  
},  
{  
"id": "e65585610fa56181",  
"type": "mqtt out",  
"z": "8765833d3a37a777",  
"name": "PassageLight",  
"topic": "cmnd/PassageSW1/POWER1",  
"qos": "2",  
"retain": "",  
"respTopic": "",  
"contentType": "",  
"userProps": "",  
"correl": "",  
"expiry": "",  
"broker": "ea9bd8bf5edb84af",  
"x": 480,  
"y": 200,  
"wires":   
},  
{  
"id": "e3d71b49883c2338",  
"type": "mqtt in",  
"z": "8765833d3a37a777",  
"name": "PassageLight",  
"topic": "stat/PassageSW1/POWER1/",  
"qos": "2",  
"datatype": "auto-detect",  
"broker": "ea9bd8bf5edb84af",  
"nl": false,  
"rap": true,  
"rh": 0,  
"inputs": 0,  
"x": 70,  
"y": 200,  
"wires": [  
[  
"784e0420709ba160"  
]  
]  
},  
{  
"id": "784e0420709ba160",  
"type": "ui\_switch",  
"z": "8765833d3a37a777",  
"name": "PassageLight",  
"label": "switch",  
"tooltip": "",  
"group": "f8ebd8f9631165f5",  
"order": 0,  
"width": 0,  
"height": 0,  
"passthru": false,  
"decouple": "false",  
"topic": "topic",  
"topicType": "msg",  
"style": "",  
"onvalue": "ON",  
"onvalueType": "str",  
"onicon": "",  
"oncolor": "",  
"offvalue": "OFF",  
"offvalueType": "str",  
"officon": "",  
"offcolor": "",  
"animate": false,  
"className": "",  
"x": 260,  
"y": 280,  
"wires": [  
[  
"e65585610fa56181",  
"8fc424ada7396103"  
]  
]  
},  
{  
"id": "8fc424ada7396103",  
"type": "mqtt out",  
"z": "8765833d3a37a777",  
"name": "PassageLight",  
"topic": "cmnd/PassageSW2/POWER1",  
"qos": "2",  
"retain": "",  
"respTopic": "",  
"contentType": "",  
"userProps": "",  
"correl": "",  
"expiry": "",  
"broker": "ea9bd8bf5edb84af",  
"x": 480,  
"y": 380,  
"wires":   
},  
{  
"id": "b84e91c4453f903d",  
"type": "mqtt in",  
"z": "8765833d3a37a777",  
"name": "PassageLight",  
"topic": "stat/PassageSW2/POWER1",  
"qos": "2",  
"datatype": "auto-detect",  
"broker": "ea9bd8bf5edb84af",  
"nl": false,  
"rap": true,  
"rh": 0,  
"inputs": 0,  
"x": 70,  
"y": 360,  
"wires": [  
[  
"784e0420709ba160"  
]  
]  
}  
]

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [12 September 2023 12:50 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/2 "2023-09-12T12:50:30Z")

</div>

Sorry - I can't import your NR flow.  
Might be a good idea to read this and try again.

To export a Node-RED flow, you can use the built-in export feature, which allows you to save your flows as a JSON file. This JSON file can be imported into another Node-RED instance or shared with others. Here's how you can do it:

1. **Open Node-RED** : Make sure you have Node-RED running and access it through your web browser.

2. **Access the Node-RED Editor** : Open the Node-RED editor in your web browser by navigating to the appropriate URL (usually [http://localhost:1880](http://localhost:1880) or the URL of your Node-RED server).

3. **Select the Flow** : In the Node-RED editor, select the flow or flows that you want to export. You can click and drag your mouse to select multiple nodes or click on a blank space in the workspace to deselect any selected nodes.

4. **Open the Export Dialog** :

5. **Choose the Export Type** :

6. **Export to Clipboard** :

7. **Export to File** :

8. **Save the JSON File** :

Your Node-RED flow is now exported as a JSON file. You can share this file with others or import it into another Node-RED instance using the import feature. To import a flow, open the Node-RED editor, right-click on the workspace, and select "Import." Then, choose the JSON file you exported and follow the import instructions.

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:00 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/3 "2023-09-12T13:00:32Z")

</div>

```auto
[{"id":"8765833d3a37a777","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"ea9bd8bf5edb84af","type":"mqtt-broker","name":"Home","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"4a49fd29f6334af2","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"61d2850bbd4d5909","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey","palette":"light"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"f8ebd8f9631165f5","type":"ui_group","name":"Passage","tab":"4a49fd29f6334af2","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"e65585610fa56181","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW1/POWER1","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":1000,"y":200,"wires":[]},{"id":"e3d71b49883c2338","type":"mqtt in","z":"8765833d3a37a777","name":"PassageLight","topic":"stat/PassageSW1/POWER1/","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":70,"y":200,"wires":[["784e0420709ba160"]]},{"id":"784e0420709ba160","type":"ui_switch","z":"8765833d3a37a777","name":"PassageLight","label":"switch","tooltip":"","group":"f8ebd8f9631165f5","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","animate":false,"className":"","x":520,"y":280,"wires":[["e65585610fa56181","8fc424ada7396103"]]},{"id":"8fc424ada7396103","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW2/POWER1","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":1000,"y":360,"wires":[]},{"id":"b84e91c4453f903d","type":"mqtt in","z":"8765833d3a37a777","name":"PassageLight","topic":"stat/PassageSW2/POWER1","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":70,"y":360,"wires":[["784e0420709ba160"]]}]

```

[edited by Mod] to show how to post code, click edit pencil, then select raw, to see what to do in future.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 September 2023 13:00 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/4 "2023-09-12T13:00:56Z")

</div>

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:01 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/5 "2023-09-12T13:01:09Z")

</div>

sorry realy strugling here

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 September 2023 13:09 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/6 "2023-09-12T13:09:55Z")

</div>

Edited for you, please click pencil edit icon on post, then select raw, to see how to post code in future.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [12 September 2023 13:10 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/7 "2023-09-12T13:10:58Z")

</div>

![Untitled 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/f/3fb3936f15a93b153ee68f616a2be8ee705f8bcf.jpeg)  
 ![Untitled 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/307e3a256d625588997aad3dce6ebb2bd89da33b.jpeg)

The result is a line containing three backticks above your code and another below it.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 September 2023 13:12 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/8 "2023-09-12T13:12:58Z")

</div>

Or here on some devices

 ![Screenshot_20230912-141215](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/38fedd372fe1b0ec2f5ec04bd1729b3486417273.png)

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:17 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/9 "2023-09-12T13:17:20Z")

</div>

```auto
[{"id":"8765833d3a37a777","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"ea9bd8bf5edb84af","type":"mqtt-broker","name":"Home","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"4a49fd29f6334af2","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"61d2850bbd4d5909","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey","palette":"light"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"f8ebd8f9631165f5","type":"ui_group","name":"Passage","tab":"4a49fd29f6334af2","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"e65585610fa56181","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW1/POWER1","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":1000,"y":200,"wires":[]},{"id":"e3d71b49883c2338","type":"mqtt in","z":"8765833d3a37a777","name":"PassageLight","topic":"stat/PassageSW1/POWER1/","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":70,"y":200,"wires":[["784e0420709ba160"]]},{"id":"784e0420709ba160","type":"ui_switch","z":"8765833d3a37a777","name":"PassageLight","label":"switch","tooltip":"","group":"f8ebd8f9631165f5","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","animate":false,"className":"","x":520,"y":280,"wires":[["e65585610fa56181","8fc424ada7396103"]]},{"id":"8fc424ada7396103","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW2/POWER1","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":1000,"y":360,"wires":[]},{"id":"b84e91c4453f903d","type":"mqtt in","z":"8765833d3a37a777","name":"PassageLight","topic":"stat/PassageSW2/POWER1","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":70,"y":360,"wires":[["784e0420709ba160"]]}]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 September 2023 13:26 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/10 "2023-09-12T13:26:39Z")

</div>

You have to set the switch node to respond to input then bypass the switch to the opposite mqtt node  
Example untested

```auto
[{"id":"e3d71b49883c2338","type":"mqtt in","z":"8765833d3a37a777","name":"PassageLight","topic":"stat/PassageSW1/POWER","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":150,"y":200,"wires":[["784e0420709ba160","8fc424ada7396103"]]},{"id":"784e0420709ba160","type":"ui_switch","z":"8765833d3a37a777","name":"PassageLight","label":"switch","tooltip":"","group":"f8ebd8f9631165f5","order":0,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","animate":false,"className":"","x":340,"y":260,"wires":[["e65585610fa56181","8fc424ada7396103"]]},{"id":"8fc424ada7396103","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW2/POWER","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":560,"y":320,"wires":[]},{"id":"b84e91c4453f903d","type":"mqtt in","z":"8765833d3a37a777","name":"PassageLight","topic":"stat/PassageSW2/POWER","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":150,"y":320,"wires":[["784e0420709ba160","e65585610fa56181"]]},{"id":"e65585610fa56181","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW1/POWER","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":560,"y":200,"wires":[]},{"id":"ea9bd8bf5edb84af","type":"mqtt-broker","name":"Home","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"f8ebd8f9631165f5","type":"ui_group","name":"Passage","tab":"4a49fd29f6334af2","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"4a49fd29f6334af2","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

Unsure of the Tasmote mqtt payloads, may be someone else can confirm this info.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [12 September 2023 13:26 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/11 "2023-09-12T13:26:51Z")

</div>

First step - I'd put some debug nodes (set to show complete message) on the MQTT-In nodes.  
Then we can see what's arriving and advise you on how to filter out what you need.

 ![first_step](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e3d521245025a4e585ad8d9c3b7eb12d60026c3.png)

![debug](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c778a0ba060b0674a4b282d1c302ae2b01631f7c.png)

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:31 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/12 "2023-09-12T13:31:17Z")

</div>

oky looks the same now

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [12 September 2023 13:36 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/13 "2023-09-12T13:36:20Z")

</div>

Try this... and see what you get..

 ![status_indicator](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9ec85266f34bef55da6fe7cf67aaec9de8022027.png)

```auto
[{"id":"8765833d3a37a777","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"e65585610fa56181","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW1/POWER1","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":720,"y":220,"wires":[]},{"id":"e3d71b49883c2338","type":"mqtt in","z":"8765833d3a37a777","name":"Passage_SW1_Light","topic":"stat/PassageSW1/POWER1/","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":240,"y":200,"wires":[["784e0420709ba160","e4fce5edfb64a6e3","6a405ff7fcb41194"]]},{"id":"784e0420709ba160","type":"ui_switch","z":"8765833d3a37a777","name":"PassageLight","label":"switch","tooltip":"","group":"f8ebd8f9631165f5","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","animate":false,"className":"","x":480,"y":260,"wires":[["e65585610fa56181","8fc424ada7396103"]]},{"id":"8fc424ada7396103","type":"mqtt out","z":"8765833d3a37a777","name":"PassageLight","topic":"cmnd/PassageSW2/POWER1","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ea9bd8bf5edb84af","x":720,"y":280,"wires":[]},{"id":"b84e91c4453f903d","type":"mqtt in","z":"8765833d3a37a777","name":"Passage_SW2_Light","topic":"stat/PassageSW2/POWER1","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":240,"y":320,"wires":[["784e0420709ba160","91d710489193ee12"]]},{"id":"e4fce5edfb64a6e3","type":"debug","z":"8765833d3a37a777","name":"Debug_SW1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":160,"wires":[]},{"id":"91d710489193ee12","type":"debug","z":"8765833d3a37a777","name":"Debug_SW2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":320,"wires":[]},{"id":"6a405ff7fcb41194","type":"function","z":"8765833d3a37a777","name":"status indicator","func":"if (msg.payload == \"ON\")\n {\n node.status({fill:\"red\",shape:\"dot\",text:\"SW1 - is ON\"});\n }\nelse if (msg.payload === \"OFF\")\n {\n node.status({fill:\"green\",shape:\"ring\",text:\"SW1 is OFF\"});\n }\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":200,"wires":[[]]},{"id":"ea9bd8bf5edb84af","type":"mqtt-broker","name":"Home","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"f8ebd8f9631165f5","type":"ui_group","name":"Passage","tab":"4a49fd29f6334af2","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"4a49fd29f6334af2","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

By-the-way... in my setup I use ... POWER not POWER1 as the topic in the MQTT-In nodes.  
 ![tasmota_POWER](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/8/d8cdcb10aa06cabfcff564f7739746294ece37ad.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 September 2023 13:39 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/14 "2023-09-12T13:39:56Z")

</div>

There also seem so be an extra / on end of one of the in topics.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [12 September 2023 13:40 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/15 "2023-09-12T13:40:26Z")

</div>

Well spotted.

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:42 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/16 "2023-09-12T13:42:35Z")

</div>

so i have done this it still does the same also just fyi the swiches are 3 lever switches

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:44 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/17 "2023-09-12T13:44:33Z")

</div>

i would like if posibles to share via teamviewer

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 September 2023 13:46 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/18 "2023-09-12T13:46:40Z")

</div>

We need info from the debugs.  
Run this flow, then hit your physical switches.  
Then show us the info from the debug node.

```auto
[{"id":"0740e416ea2d6aa0","type":"debug","z":"8765833d3a37a777","name":"debug 335","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":370,"y":200,"wires":[]},{"id":"e3d71b49883c2338","type":"mqtt in","z":"8765833d3a37a777","name":"all stat messages","topic":"stat/#","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":200,"wires":[["0740e416ea2d6aa0"]]},{"id":"ea9bd8bf5edb84af","type":"mqtt-broker","name":"Home","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

```

You can paste screenshots straight into the post window. Or use the upload icon/button  
OR

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

---

<div class="post-metadata">

**Author:** ![Dewald](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dewald](https://discourse.nodered.org/u/Dewald)\
**Post date:** [12 September 2023 13:56 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/19 "2023-09-12T13:56:58Z")

</div>

no sorry not doing enything

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 September 2023 13:59 UTC](https://discourse.nodered.org/t/sonoff-and-tasmota/81237/20 "2023-09-12T13:59:21Z")

</div>

Alter the topic to just `#`  
e.g.

```auto
[{"id":"e3d71b49883c2338","type":"mqtt in","z":"8765833d3a37a777","name":"all stat messages","topic":"#","qos":"2","datatype":"auto-detect","broker":"ea9bd8bf5edb84af","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":200,"wires":[["0740e416ea2d6aa0"]]},{"id":"0740e416ea2d6aa0","type":"debug","z":"8765833d3a37a777","name":"debug 335","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":370,"y":200,"wires":[]},{"id":"ea9bd8bf5edb84af","type":"mqtt-broker","name":"Home","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

```

If this is not receiving anything then your tasmota devices are not connected to the mqtt broker.

We really need more info than one liners responses.  
images etc so we can see what you see.

[Next page](https://discourse.nodered.org/t/sonoff-and-tasmota/81237.md?page=2)
