[ST Edge] •• Tasmota Edge •• for Sonoff, Tuya & many other ESP WiFi & HTTP devices - over 2000 Tasmota supported devices

I have a Tasmota 13.3 flashed Gosund SW6 3 way switch and the device is working with the tasmota web interface, powering on and off with “Toggle 2 and Toggle 3” and properly indicating the LED on “Toggle 1”, configured with these parameters. Gosund SW6 3-Way Switch (SW6) Configuration for Tasmota

I have the Tasmota Edge driver registered and I have added the device as a switch and at least I’m getting signal strength data.

However, this power button here is toggling “Toggle 1” which is configured as the LED, not the power switch.

Any ideas?

Based on the descriptor of the template on the SW6 page, it looks like the edge driver should instead be messaging the “Rule 3/POWER3”

This is the same issue I’ve mentioned a few times including here:

@hongtat last replied and I missed it about mirroring 2 switches. This isn’t 2 smart switches. It’s a single 3 way light just like a Moe’s 3 way switch. I fixed it in the old groovy drivers by having smartthings send an “event” command instead of a “power” command. You can then take that event and use a rule do the necessary actions to flip the switch. The issue is that this switch responds to a second switch to flip power1. Power 1 shouldn’t be set directly. It’s just a virtual representation of the light state and not the actual relay. The relay can be on while the second switch is of and the light will be off. The same with vice versa. Both must be off or both must be on to set the light to on.

EDIT - I found that it should be POWER2 that is toggled, not power3 for the gosund 3-way light switch, on tasmota


Hi, @hongtat Would you be willing to add an alternate light switch device that sends to “power3” for this 3 way switch configuration?

Also, I think it needs to read the power state differently as well, but I’m not certain what that would be. It might be an invert of what power1 reads, as the LED on the plug turns on when the lightbulb is off, and turns off when the lightbulb is on.

Not to hijack but it doesn’t need Power3. It needs On and Off “events” to match Rule3. This will make his driver work for any of the various 3 way switches and is the standard in Tasmota 3 way configurations. Not all have Power3 which isn’t necessary but all accept events.

Thank you, that’s great info. This is my first tasmota device, so I’m glad to get the clarifications

With the web requestor edge driver https://github.com/toddaustin07/webrequestor/blob/main/README.md I was able to register a GET url call to my device like GET:http://192.168.1.117/?m=1&o=3

This very nicely toggles state 3 and controls the switch.

However, the tasmota response is not parseable as JSON to get back the new light power state. It’s returning as HTML.

Also, I’m not sure if this is the right way to get the light switch power status back. I suspect that’s something that should maybe be MQTT? I don’t really even know what MQTT is, so I’m just flailing a bit here.

Hello.

I thought I’d come back and report my findings. Issue was not the Tasmota Edge drivers - I tried a different GET http edge driver with the same negative issue. It seems Smartthings sends out the GET requests with minimal delay (few milliseconds). It overwhelms both the ESP8266 sever and the limited trials on a dummy server on a laptop.

I switched the ESP8266 to an ASYNC server implementation, which managed and queued GET requests with minimal latency. Works perfectly - no dropped commands. Good luck!

Might be too late, but was an early adopter. Been awhile since I’ve made any changes, but looking to add new Sonoff devices I flashed to Tasmota, but I can’t seem to figure out how to add new devices. Searching for Devices doesn’t show anything. Looking through the thread, it might be an IP related as it was DHCP and had been from the get-go. Found in the notes it now shows a Static IP is necessary. I’m a network admin, so I can change the IP back if I knew what it was. Don’t have logs that go back that far. I’m hoping I can go to a place (requested to dump logs) and find an error saying “error connecting to ” and I can just reserve the IP for the hub and reboot. Thanks for any help, I’d really like to not have to re-add my 30 devices >.<

Scratch that, I deleted the old SmartThings app after digging more and then installed it again. Now it is working properly. Thanks for the great app!!! Leaving in case someone else doesn’t want to dig up the old issue

For the gosund 3-way light switch, on tasmota, Do you know what that command should be?

I tried sending like this http://192.168.1.117/cm?cmnd=POWER+TOGGLE and this is just toggling the LED, same as the edge driver is doing

For the gosund 3-way light switch, on tasmota, I found that http://192.168.1.117/cm?cmnd=Status will give me a response like this below, and “Power” will indicate 4,5,6,7 where even numbers the light is on, and odd numbers the light is off, based on the state of the smart switch or the dumb switch being toggled.

How does this edge driver get the current light status from the light to indicate the light state in SmartThings? Does it use a polling like this, or does it use something like MQTT?


{“Status”:{“Module”:0,“DeviceName”:“BasementHall”,“FriendlyName”:[“BasementHall”,“Tasmota2”,“Tasmota3”],“Topic”:“basementhall”,“ButtonTopic”:“0”,“Power”:5,“PowerOnState”:3,“LedState”:1,“LedMask”:“FFFF”,“SaveData”:1,“SaveState”:1,“SwitchTopic”:“”,“SwitchMode”:[1,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],“ButtonRetain”:0,“SwitchRetain”:0,“SensorRetain”:0,“PowerRetain”:0,“InfoRetain”:0,“StateRetain”:0,“StatusRetain”:0}}

For the gosund 3-way light switch, on tasmota, this command reliably turns the light off or on, whatever is the opposite of the current lighting status

http://192.168.1.117/cm?cmnd=POWER2+TOGGLE

Hello @hongtat

Hope all is well on your end. I wanted to recall this idea and see possibility of implementation anytime soon.

Meaning is there a way to change the value that appears on the WebUI so we can reflect that on the ST app.

Thank you.

It reads the POWER status. What does /cm?cmnd=status 0 show?

image

I get the two below back with the switch toggled

{
  "Status": {
    "Module": 0,
    "DeviceName": "BasementHall",
    "FriendlyName": ["BasementHall", "Tasmota2", "Tasmota3"],
    "Topic": "basementhall",
    "ButtonTopic": "0",
    "Power": 2,
    "PowerOnState": 3,
    "LedState": 1,
    "LedMask": "FFFF",
    "SaveData": 1,
    "SaveState": 1,
    "SwitchTopic": "",
    "SwitchMode": [
      1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0
    ],
    "ButtonRetain": 0,
    "SwitchRetain": 0,
    "SensorRetain": 0,
    "PowerRetain": 0,
    "InfoRetain": 0,
    "StateRetain": 0,
    "StatusRetain": 0
  },
  "StatusPRM": {
    "Baudrate": 115200,
    "SerialConfig": "8N1",
    "GroupTopic": "tasmotas",
    "OtaUrl": "http://ota.tasmota.com/tasmota/release/tasmota.bin.gz",
    "RestartReason": "Power On",
    "Uptime": "14T21:45:59",
    "StartupUTC": "2023-12-18T18:34:08",
    "Sleep": 50,
    "CfgHolder": 4617,
    "BootCount": 85,
    "BCResetTime": "2023-12-14T04:17:16",
    "SaveCount": 1373,
    "SaveAddress": "F8000"
  },
  "StatusFWR": {
    "Version": "13.3.0(tasmota)",
    "BuildDateTime": "2023-12-12T14:29:05",
    "Boot": 31,
    "Core": "2_7_4_9",
    "SDK": "2.2.2-dev(38a443e)",
    "CpuFrequency": 80,
    "Hardware": "ESP8285N08",
    "CR": "432/699"
  },
  "StatusLOG": {
    "SerialLog": 2,
    "WebLog": 2,
    "MqttLog": 0,
    "SysLog": 0,
    "LogHost": "",
    "LogPort": 514,
    "SSId": ["tron", ""],
    "TelePeriod": 300,
    "Resolution": "558180C0",
    "SetOption": [
      "00008009",
      "2805C80001000600003C5A0A192800000000",
      "00000080",
      "00006000",
      "00004000",
      "00000000"
    ]
  },
  "StatusMEM": {
    "ProgramSize": 637,
    "Free": 364,
    "Heap": 21,
    "ProgramFlashSize": 1024,
    "FlashSize": 1024,
    "FlashChipId": "144051",
    "FlashFrequency": 40,
    "FlashMode": "DOUT",
    "Features": [
      "0809",
      "8F9AC787",
      "04368001",
      "000000CF",
      "010013C0",
      "C000F981",
      "00004004",
      "00001000",
      "54000020",
      "00000080",
      "00000000"
    ],
    "Drivers": "1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37,45,62,68",
    "Sensors": "1,2,3,4,5,6",
    "I2CDriver": "7"
  },
  "StatusNET": {
    "Hostname": "basementhall",
    "IPAddress": "192.168.1.117",
    "Gateway": "192.168.1.1",
    "Subnetmask": "255.255.255.0",
    "DNSServer1": "192.168.1.1",
    "DNSServer2": "0.0.0.0",
    "Mac": "E0:98:06:DD:D1:DF",
    "Webserver": 2,
    "HTTP_API": 1,
    "WifiConfig": 4,
    "WifiPower": 17.0
  },
  "StatusMQT": {
    "MqttHost": "",
    "MqttPort": 1883,
    "MqttClientMask": "DVES_%06X",
    "MqttClient": "DVES_DDD1DF",
    "MqttUser": "DVES_USER",
    "MqttCount": 0,
    "MAX_PACKET_SIZE": 1200,
    "KEEPALIVE": 30,
    "SOCKET_TIMEOUT": 4
  },
  "StatusTIM": {
    "UTC": "2024-01-02T16:20:07",
    "Local": "2024-01-02T17:20:07",
    "StartDST": "2024-03-31T02:00:00",
    "EndDST": "2024-10-27T03:00:00",
    "Timezone": "+01:00",
    "Sunrise": "08:43",
    "Sunset": "17:03"
  },
  "StatusSNS": {
    "Time": "2024-01-02T17:20:07",
    "Switch1": "OFF",
    "Switch2": "ON"
  },
  "StatusSTS": {
    "Time": "2024-01-02T17:20:07",
    "Uptime": "14T21:45:59",
    "UptimeSec": 1287959,
    "Heap": 22,
    "SleepMode": "Dynamic",
    "Sleep": 50,
    "LoadAvg": 19,
    "MqttCount": 0,
    "POWER1": "OFF",
    "POWER2": "ON",
    "POWER3": "OFF"
    
  }
}


{
  "Status": {
    "Module": 0,
    "DeviceName": "BasementHall",
    "FriendlyName": ["BasementHall", "Tasmota2", "Tasmota3"],
    "Topic": "basementhall",
    "ButtonTopic": "0",
    "Power": 1,
    "PowerOnState": 3,
    "LedState": 1,
    "LedMask": "FFFF",
    "SaveData": 1,
    "SaveState": 1,
    "SwitchTopic": "",
    "SwitchMode": [
      1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0
    ],
    "ButtonRetain": 0,
    "SwitchRetain": 0,
    "SensorRetain": 0,
    "PowerRetain": 0,
    "InfoRetain": 0,
    "StateRetain": 0,
    "StatusRetain": 0
  },
  "StatusPRM": {
    "Baudrate": 115200,
    "SerialConfig": "8N1",
    "GroupTopic": "tasmotas",
    "OtaUrl": "http://ota.tasmota.com/tasmota/release/tasmota.bin.gz",
    "RestartReason": "Power On",
    "Uptime": "14T21:48:38",
    "StartupUTC": "2023-12-18T18:34:08",
    "Sleep": 50,
    "CfgHolder": 4617,
    "BootCount": 85,
    "BCResetTime": "2023-12-14T04:17:16",
    "SaveCount": 1374,
    "SaveAddress": "F7000"
  },
  "StatusFWR": {
    "Version": "13.3.0(tasmota)",
    "BuildDateTime": "2023-12-12T14:29:05",
    "Boot": 31,
    "Core": "2_7_4_9",
    "SDK": "2.2.2-dev(38a443e)",
    "CpuFrequency": 80,
    "Hardware": "ESP8285N08",
    "CR": "432/699"
  },
  "StatusLOG": {
    "SerialLog": 2,
    "WebLog": 2,
    "MqttLog": 0,
    "SysLog": 0,
    "LogHost": "",
    "LogPort": 514,
    "SSId": ["tron", ""],
    "TelePeriod": 300,
    "Resolution": "558180C0",
    "SetOption": [
      "00008009",
      "2805C80001000600003C5A0A192800000000",
      "00000080",
      "00006000",
      "00004000",
      "00000000"
    ]
  },
  "StatusMEM": {
    "ProgramSize": 637,
    "Free": 364,
    "Heap": 21,
    "ProgramFlashSize": 1024,
    "FlashSize": 1024,
    "FlashChipId": "144051",
    "FlashFrequency": 40,
    "FlashMode": "DOUT",
    "Features": [
      "0809",
      "8F9AC787",
      "04368001",
      "000000CF",
      "010013C0",
      "C000F981",
      "00004004",
      "00001000",
      "54000020",
      "00000080",
      "00000000"
    ],
    "Drivers": "1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37,45,62,68",
    "Sensors": "1,2,3,4,5,6",
    "I2CDriver": "7"
  },
  "StatusNET": {
    "Hostname": "basementhall",
    "IPAddress": "192.168.1.117",
    "Gateway": "192.168.1.1",
    "Subnetmask": "255.255.255.0",
    "DNSServer1": "192.168.1.1",
    "DNSServer2": "0.0.0.0",
    "Mac": "E0:98:06:DD:D1:DF",
    "Webserver": 2,
    "HTTP_API": 1,
    "WifiConfig": 4,
    "WifiPower": 17.0
  },
  "StatusMQT": {
    "MqttHost": "",
    "MqttPort": 1883,
    "MqttClientMask": "DVES_%06X",
    "MqttClient": "DVES_DDD1DF",
    "MqttUser": "DVES_USER",
    "MqttCount": 0,
    "MAX_PACKET_SIZE": 1200,
    "KEEPALIVE": 30,
    "SOCKET_TIMEOUT": 4
  },
  "StatusTIM": {
    "UTC": "2024-01-02T16:22:46",
    "Local": "2024-01-02T17:22:46",
    "StartDST": "2024-03-31T02:00:00",
    "EndDST": "2024-10-27T03:00:00",
    "Timezone": "+01:00",
    "Sunrise": "08:43",
    "Sunset": "17:03"
  },
  "StatusSNS": {
    "Time": "2024-01-02T17:22:46",
    "Switch1": "ON",
    "Switch2": "ON"
  },
  "StatusSTS": {
    "Time": "2024-01-02T17:22:46",
    "Uptime": "14T21:48:38",
    "UptimeSec": 1288118,
    "Heap": 23,
    "SleepMode": "Dynamic",
    "Sleep": 50,
    "LoadAvg": 19,
    "MqttCount": 0,
    "POWER1": "ON",
    "POWER2": "OFF",
    "POWER3": "OFF"

  }
}


@fshadfan - The option to modify the actual value is available now. Go to the distance sensor settings and fill in the values.

This is the formula; ((INPUT-MIN)*DIVISOR)/(MAX-MIN)

Perfect !! It works really well. Thank you @hongtat

I have a smoke detector configured(switch). I change the profile to a smoke detector. I need to invert the switch as it’s currently saying alarm which it is not. Where do I change the status to reverse or invert?

I’m unfamiliar with switchmode, which I think will solve my problem.

Try -

SwitchMode<x>
1 = follow (0 = off, 1 = on)
2 = inverted follow (0 = on, 1 = off)

<x> = switch number