# Problems with a athom 3gang switch

**URL:** https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791
**Category:** General
**Tags:** function-node
**Created:** [17 December 2023 20:38 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791 "2023-12-17T20:38:53Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Bogi1](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Bogi1](https://discourse.nodered.org/u/Bogi1)
#### Post date: [17 December 2023 20:38 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/1 "2023-12-17T20:38:53Z")

</div>

Good evening,  
i need help to bring my Athom switch to work, this is already flashed to Tasmota last version and should switch 3 Gosund SP111 Plugs also on Tasmota.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8fc814f8a1bcf0d4d65deed4d22817f659a70e69.png)  
On the picture you can see what i did already.  
Schalter\_1 is the Athom, Drucker\_oben and Drucker\_unten are 2 of the Gosund Plugs, it is possible to switch the Drucker\_oben with the button1 on the switch, but it is not possible to switch Drucker\_unten with the second one.  
Both debugs shows fals and true in boolean.  
I have not a real chance to configure the second chanel in another way, because the topic will be the same everytime.  
May somebody can help me, because i am complete new in nodered.  
If any other information is needed i will send it as fast as possible  
Thanks for any help  
Cord

---

<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: [17 December 2023 20:56 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/2 "2023-12-17T20:56:57Z")

</div>

> [@Bogi1](#):
>
> Both debugs shows fals and true in boolean.

Please show us the output from your debug nodes switch\_1 and switch\_2 when you press button 1 and button 2.

Since the Gosund plugs are flashed with Tasmota, there should be a web interface for each.  
Please show us a screen capture of the page displayed when you enter the Gosunds' IP address.  
It should look something like this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/761eea8cc6795240e322e866653a08cd7210db7f.png)

---

<div class="post-metadata">

### Author: ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)
#### Post date: [17 December 2023 21:35 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/3 "2023-12-17T21:35:31Z")

</div>

Post your flow with "vorformatierter Text"

```auto
tippe oder füge den Code hier ein

```

---

<div class="post-metadata">

### Author: ![Bogi1](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Bogi1](https://discourse.nodered.org/u/Bogi1)
#### Post date: [17 December 2023 21:42 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/4 "2023-12-17T21:42:40Z")

</div>

Thx for the answer

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a594421dfc91900df773d25d6ba7d510385bf9a3.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/a/8a014727406654872d1f026ab4477388088a157e.png)  
i hope this is ok

@stefan24  
inside this flow are also 2 additional Gosund to test them after flashing.

```auto
[
    {
        "id": "81c6fa4b197c3ccd",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6d7c2ef8af74f907",
        "type": "Tasmota Switch",
        "z": "81c6fa4b197c3ccd",
        "broker": "06d1cce264ae7488",
        "device": "Drucker_oben",
        "name": "",
        "outputs": 1,
        "uidisabler": false,
        "fullTopic": "Steckdose_1%prefix%/%topic%/",
        "cmndPrefix": "",
        "statPrefix": "",
        "telePrefix": "",
        "qos": 1,
        "retain": false,
        "notopic": false,
        "x": 900,
        "y": 140,
        "wires": [
            []
        ],
        "inputLabels": [
            "switch2"
        ]
    },
    {
        "id": "9c9c529e5311e027",
        "type": "Tasmota Switch",
        "z": "81c6fa4b197c3ccd",
        "broker": "06d1cce264ae7488",
        "device": "Schalter_1",
        "name": "",
        "outputs": 3,
        "uidisabler": false,
        "fullTopic": "Schalter_Buero%prefix%/%topic%/",
        "cmndPrefix": "",
        "statPrefix": "",
        "telePrefix": "",
        "qos": 1,
        "retain": false,
        "notopic": false,
        "x": 630,
        "y": 180,
        "wires": [
            [
                "00743512f7c3944b",
                "6d7c2ef8af74f907"
            ],
            [
                "671af514d511365e",
                "5b8544f37208eaa0",
                "69159f2d3c65e96b"
            ],
            [
                "d4ee88bec18f2e8d"
            ]
        ],
        "outputLabels": [
            "POWER1",
            "POWER2",
            "POWER3"
        ],
        "info": "``{\r\n \"device\": \"Schalter_1\",\r\n \"name\": \"WLAN-Schalter\",\r\n \"channels\": [\r\n {\r\n \"id\": 1,\r\n \"name\": \"Steckdose 1\",\r\n \"type\": \"outlet\",\r\n \"tasmota_topic\": \"cmnd/sonoff/POWER1\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"Steckdose 2\",\r\n \"type\": \"outlet\",\r\n \"tasmota_topic\": \"cmnd/sonoff/POWER2\"\r\n },\r\n {\r\n \"id\": 3,\r\n \"name\": \"Steckdose 3\",\r\n \"type\": \"outlet\",\r\n \"tasmota_topic\": \"cmnd/sonoff/POWER3\"\r\n }\r\n]\r\n}\r\n"
    },
    {
        "id": "00743512f7c3944b",
        "type": "debug",
        "z": "81c6fa4b197c3ccd",
        "name": "switch_1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 20,
        "wires": []
    },
    {
        "id": "671af514d511365e",
        "type": "debug",
        "z": "81c6fa4b197c3ccd",
        "name": "switch_2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 60,
        "wires": []
    },
    {
        "id": "717164fc0f59ecb2",
        "type": "inject",
        "z": "81c6fa4b197c3ccd",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 810,
        "y": 460,
        "wires": [
            [
                "5b8544f37208eaa0"
            ]
        ]
    },
    {
        "id": "b6b575fb6b0a0dd0",
        "type": "inject",
        "z": "81c6fa4b197c3ccd",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 810,
        "y": 520,
        "wires": [
            [
                "5b8544f37208eaa0"
            ]
        ]
    },
    {
        "id": "5b8544f37208eaa0",
        "type": "Tasmota Switch",
        "z": "81c6fa4b197c3ccd",
        "broker": "06d1cce264ae7488",
        "device": "Drucker_unten",
        "name": "",
        "outputs": 1,
        "uidisabler": false,
        "fullTopic": "Steckdose_2%prefix%/%topic%/",
        "cmndPrefix": "",
        "statPrefix": "",
        "telePrefix": "",
        "qos": 1,
        "retain": false,
        "notopic": false,
        "x": 900,
        "y": 300,
        "wires": [
            []
        ],
        "inputLabels": [
            "switch2"
        ]
    },
    {
        "id": "d4ee88bec18f2e8d",
        "type": "debug",
        "z": "81c6fa4b197c3ccd",
        "name": "switch_3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 220,
        "wires": []
    },
    {
        "id": "9f292d46f1929baf",
        "type": "inject",
        "z": "81c6fa4b197c3ccd",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 450,
        "y": 140,
        "wires": [
            [
                "9c9c529e5311e027"
            ]
        ]
    },
    {
        "id": "7ad76d9a62e1e797",
        "type": "inject",
        "z": "81c6fa4b197c3ccd",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 450,
        "y": 200,
        "wires": [
            [
                "9c9c529e5311e027"
            ]
        ]
    },
    {
        "id": "52ae2d4854fd5930",
        "type": "Tasmota Switch",
        "z": "81c6fa4b197c3ccd",
        "broker": "06d1cce264ae7488",
        "device": "Steckdose3",
        "name": "",
        "outputs": 1,
        "uidisabler": false,
        "fullTopic": "Steckdose3%prefix%/%topic%/",
        "cmndPrefix": "",
        "statPrefix": "",
        "telePrefix": "",
        "qos": 1,
        "retain": false,
        "notopic": false,
        "x": 1610,
        "y": 60,
        "wires": [
            []
        ]
    },
    {
        "id": "9880685a6cbfe0e8",
        "type": "Tasmota Switch",
        "z": "81c6fa4b197c3ccd",
        "broker": "06d1cce264ae7488",
        "device": "Steckdose4",
        "name": "",
        "outputs": 1,
        "uidisabler": false,
        "fullTopic": "Steckdose4%prefix%/%topic%/",
        "cmndPrefix": "",
        "statPrefix": "",
        "telePrefix": "",
        "qos": 1,
        "retain": false,
        "notopic": false,
        "x": 1610,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "69159f2d3c65e96b",
        "type": "debug",
        "z": "81c6fa4b197c3ccd",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1100,
        "y": 180,
        "wires": []
    },
    {
        "id": "06d1cce264ae7488",
        "type": "tasmota-mqtt-broker",
        "name": "Steuer",
        "broker": "192.168.69.61",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "keepalive": "60",
        "cleansession": true
    }
]

```

---

<div class="post-metadata">

### Author: ![Bogi1](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Bogi1](https://discourse.nodered.org/u/Bogi1)
#### Post date: [17 December 2023 21:45 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/5 "2023-12-17T21:45:19Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3a80639847ae9be692dd15d8974dd9f00929c867.png)

I have to add another post, because i am not allowed to put more than two

---

<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: [17 December 2023 23:09 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/6 "2023-12-17T23:09:31Z")

</div>

I am a bit confused by your Tasmota full topic `Steckdose_1%prefix%/%topic%/` since I never change my devices' full topic from `%prefix%/%topic%/`.  
However, I believe that the status shown on your screen capture proves that the config matches in node and device.

Do your true/false inject directly to Drucker\_unten work?

Check the **topic** output from Schalter\_1; change the debug nodes to display the full message.

---

<div class="post-metadata">

### Author: ![Bogi1](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Bogi1](https://discourse.nodered.org/u/Bogi1)
#### Post date: [18 December 2023 06:18 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/7 "2023-12-18T06:18:01Z")

</div>

Good morning  
in the description it seems i have to chnge the full topic to an own name on any node. if its not like this i will leave it.  
Yes the inject works fine in Drucker\_unten

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b4bad6195468d11eb508c3498e95c12471f85ecb.png)  
This is the full message.  
Cord

---

<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: [18 December 2023 11:34 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/8 "2023-12-18T11:34:51Z")

</div>

The message emitted from Schalter\_1 has

```auto
{
payload: "true",
topic :"switch2"
}

```

while your direct inject to Drucker\_unten has

```auto
{
payload: "true",
topic :""
}

```

Does it make a difference if your injects also set the topic?

---

<div class="post-metadata">

### Author: ![Bogi1](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Bogi1](https://discourse.nodered.org/u/Bogi1)
#### Post date: [18 December 2023 13:20 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/9 "2023-12-18T13:20:32Z")

</div>

If i change to "switch2" it stopps working.  
Seems you find something, but how to change it?

---

<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: [18 December 2023 13:34 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/10 "2023-12-18T13:34:48Z")

</div>

There is a setting in the switch node "Don't set topic in output messages".  
Perhaps ticking that in Schalter\_1 will resolve it?

---

<div class="post-metadata">

### Author: ![Bogi1](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Bogi1](https://discourse.nodered.org/u/Bogi1)
#### Post date: [18 December 2023 13:54 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/11 "2023-12-18T13:54:10Z")

</div>

Thank you for this  
easiest solution  
Cord

---

<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: [1 January 2024 13:54 UTC](https://discourse.nodered.org/t/problems-with-a-athom-3gang-switch/83791/12 "2024-01-01T13:54:27Z")

</div>

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