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

hi i have a dht11 temp/humid sensor but that uses a digital out to gpio14
using the sonoff th module type

I don’t have a NSPanel and no plans for it yet.

Yes. Sonoff iFan is the only supported Fan device. Treatlife DS02/03 is on my to-do.

It’s closed-source.

1 Like

Usually, I’d 8.5 full → 9.x minimal → 9.x full → 10.x minimal → 10.x full → and so on… to the latest.
Use the same version in Minimal & Full (e.g. 9.1.0 minimal → 9.1.0 full)

Hi @hongtat,

We’ve install the Tasmota Edge Driver on our hub and set up a NodeMCU ESP8266 board to replace our Konnected setup. We’ve managed to get it working by setting the template in Tasmota to “Generic” and setting a PIN up in the web UI to control an LED. We can control it via the commands or the button on the web UI.

However, in SmartThings when we create a “Light (RGBW)” we can’t toggle the LED on the board. whenever we click on and off in SmartThings, we get this showing in the logs:
15:34:20.874 RSL: RESULT = {“Command”:“Error”}
15:34:23.536 RSL: RESULT = {“Command”:“Error”}

Strangly though, when I adjust the colour temprature or the dimmer setting in the Light on SmartThings, the LED lights up for a split second, then turns off and shows this in the logs:
15:34:44.434 RSL: RESULT = {“Command”:“Unknown”}

Here is what LogCat shows on our ST Hub when I turn the device off:

2022-10-01T14:36:15.641571576+00:00 TRACE Tasmota Edge Received event with handler capability
2022-10-01T14:36:15.651702243+00:00 INFO Tasmota Edge <Device: 8abf7455-2aca-4280-a498-ee9ed31f1fb6 (Tasmota Light RGBW)> received command: {“args”:{},“capability”:“switch”,“command”:“off”,“component”:“main”,“positional_args”:{}}
2022-10-01T14:36:15.657500243+00:00 TRACE Tasmota Edge Found CapabilityCommandDispatcher handler in tasmota-edge
2022-10-01T14:36:15.663632577+00:00 PRINT Tasmota Edge [cmd:switch] For: “Tasmota Light RGBW (ip: 192.168.0.193)”, EP: “nil”, tasmota command: “{POWER=“0”}”
2022-10-01T14:36:15.767711577+00:00 INFO Tasmota Edge <Device: 8abf7455-2aca-4280-a498-ee9ed31f1fb6 (Tasmota Light RGBW)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-10-01T14:36:15.787064910+00:00 DEBUG Tasmota Edge Tasmota Light RGBW device thread event handled

Are you able to advise/are we missing anything? It’s like SmartThings doesn’t know what GPIO to control…

@Nathan_Bendall I am trying to do the same thing, but haven’t been able to get the sensor inputs to work (unless attached to relays). Currently looking at other options but would be interested to know if you get it working.

I was able to get this working. I created a switch in tasmota and set it to be disconnected from a relay. following the tasmota instruction Detach Switches with…~

SetOption114

I then added a rule
"ON Switch3#state DO WebQuery %mem1% POST %mem2% {"Mac":"%MACADDR%","STS":{"POW3":"%value%"}} ENDON

So then when the switch changes states it would send a POW3 to the edge driver indicating the switch had changed.

This is kinda kludgely, but it is a good proof of concept.

@hongtat would be help to have a profile to do this.

2 Likes

Tried using I for the first time. Working well. Thank you.

@hongtat the fan part stops working. Can you check what happened? It’s something in the driver, since via DHT it continues to work normally…

…in the same hub ir control the fan and an air conditioner (via driver edge and also dht), the air conditioner continues working in both ways (driver edge and DHT), but the fan via driver has stopped, so it is not a hardware problem and it’s also not a problem in the IR code, since at the beginning of September, it was working.

@Nathan_Bendall @ragoss @gst

Can I have a screenshot of your module parameters (under configure module)?
For GPIO configured as “Switch”, are you able to control them from Tasmota? e.g. (http://IP/cm?cmnd=Switch2 OFF)
Would mapping these “Switches” as contact sensor (open/closed) in SmartThings good for you?

And would you prefer Tasmota device with multiple switches to appear as individual ST devices (e.g. 5 switches = 5 ST Contact sensors), or as a single ST device (e.g. 5 switches = 1 ST device with 5 sensors in a single view)


I have multiple devices (previously flashed with Konnected firmware) used as an alarm interface. Module 1 has several door and window contact sensors (switch) and the siren output (relay). Module 2 has additional contact sensors (switch) and inputs from a keypad (switch), an LED status indicator (relay) and a buzzer for exit warning (this could perhaps be configured as an LED).

I detached the switches from the relay using SetOption114 1 as these are separate entities.

Command Switch2 OFF results in {“Command”:“Unknown”} from console or http. Changing the state of contact switches does update correctly using status 10 but does not change in the Edge driver.

Yes, mapping the switches to contact sensors is exactly what I require.

I think multiple devices would be better as they currently appear, rather than a single view.

1 Like

For GPIO configured as “Switch”, are you able to control them from Tasmota? e.g. (http://IP/cm?cmnd=Switch2 OFF )

No, it just shows {“Command”:“Unknown”}

Would mapping these “Switches” as contact sensor (open/closed) in SmartThings good for you?

Exactly what I am looking for.

I really don’t know if I care. I think having them in one view might be cleaner.

As someone who will be migrating their ESPs running Konnected code in the near future, I would prefer individual sensors and switches showing up in ST rather than a super device. I think this is better for dashboards as well as Alexa integrations.

I’m unable to reproduce the problem. Can you check in the IR/RF bridge console, does it receive the code that you configured for the virtual fan?

I’m having some trouble with virtual motion detector. I’ve set up the RF Bridge on Smartthings, and separately set up an tasmota TH switch (which is working so Tasmota Edge is working).
I can get it to publish PIR1 = ON/OFF if I set up MQTT so I know the hardware is working.
My log looks like this. Rule1 is the only rule. I’m not sure if another rule is needed to have some sort of data sent to the rf bridge to make it send the status? I’m a bit lost on this. I’m new to Tasmotta and new to the Edge stuff so please be patient with me.
when I run the smartthings edge:drivers:logcat 1 command from my linux box it shows receiving the attributes but never motion senses?

01:22:44.800 RSL: RESULT = {“Rule1”:{“State”:“ON”,“Once”:“OFF”,“StopOnError”:“OFF”,“Length”:217,“Free”:294,“Rules”:“ON RfReceived#Data DO WebQuery %mem1% POST %mem2% {"Mac":"%MACADDR%","RfReceived":{"Data":"%value%"}} ENDON ON RfReceived#RfKey DO WebQuery %mem1% POST %mem2% {"Mac":"%MACADDR%","RfReceived":{"RfKey":"%value%"}} ENDON”}}
01:22:45.264 RSL: RESULT = {“POWER”:“ON”}
01:22:45.266 RSL: POWER = ON
01:22:51.136 RSL: RESULT = {“POWER”:“OFF”}
01:22:51.139 RSL: POWER = OFF
01:22:52.128 RSL: RESULT = {“POWER”:“ON”}
01:22:52.130 RSL: POWER = ON
01:23:00.519 RSL: STATUS = {“Status”:{“Module”:18,“DeviceName”:“Tasmota”,“FriendlyName”:[“Tasmota”],“Topic”:“tasmota_BCC392”,“ButtonTopic”:“0”,“Power”:1,“PowerOnState”:3,“LedState”:1,“LedMask”:“FFFF”,“SaveData”:1,“SaveState”:1,“SwitchTopic”:“”,“SwitchMode”:[1,0,0,0,0,0,0,0],“ButtonRetain”:0,“SwitchRetain”:0,“SensorRetain”:0,“PowerRetain”:0,“InfoRetain”:0,“StateRetain”:0}}
01:23:00.550 RSL: STATUS1 = {“StatusPRM”:{“Baudrate”:115200,“SerialConfig”:“8N1”,“GroupTopic”:“tasmotas”,“OtaUrl”:“http://ota.tasmota.com/tasmota/release/tasmota.bin.gz",“RestartReason”:"External System”,“Uptime”:“0T00:01:18”,“StartupUTC”:“2022-10-07T00:21:42”,“Sleep”:50,“CfgHolder”:4617,“BootCount”:12,“BCResetTime”:“2022-10-06T14:43:26”,“SaveCount”:923,“SaveAddress”:“F9000”}}
01:23:00.584 RSL: STATUS2 = {“StatusFWR”:{“Version”:“12.1.1(tasmota)”,“BuildDateTime”:“2022-08-25T11:33:55”,“Boot”:31,“Core”:“2_7_4_9”,“SDK”:“2.2.2-dev(38a443e)”,“CpuFrequency”:80,“Hardware”:“ESP8266EX”,“CR”:“386/699”}}
01:23:00.601 RSL: STATUS3 = {“StatusLOG”:{“SerialLog”:2,“WebLog”:2,“MqttLog”:0,“SysLog”:0,“LogHost”:“”,“LogPort”:514,“SSId”:[“dte3d”,“”],“TelePeriod”:300,“Resolution”:“558180C0”,“SetOption”:[“00008001”,“2805C80001000600003C5A0A192800000000”,“00000080”,“00006000”,“00004000”,“00000000”]}}
01:23:00.632 RSL: STATUS4 = {“StatusMEM”:{“ProgramSize”:624,“Free”:376,“Heap”:26,“ProgramFlashSize”:1024,“FlashSize”:4096,“FlashChipId”:“1640EF”,“FlashFrequency”:40,“FlashMode”:3,“Features”:[“00000809”,“8F9AC787”,“04368001”,“000000CF”,“010013C0”,“C000F981”,“00004004”,“00001000”,“54000020”,“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”,“Sensors”:“1,2,3,4,5,6”}}
01:23:00.668 RSL: STATUS5 = {“StatusNET”:{“Hostname”:“tasmota-BCC392-0914”,“IPAddress”:“192.168.15.113”,“Gateway”:“192.168.15.1”,“Subnetmask”:“255.255.255.0”,“DNSServer1”:“192.168.15.1”,“DNSServer2”:“207.164.234.193”,“Mac”:“A4:E5:7C:BC:C3:92”,“Webserver”:2,“HTTP_API”:1,“WifiConfig”:4,“WifiPower”:17.0}}
01:23:00.692 RSL: STATUS7 = {“StatusTIM”:{“UTC”:“2022-10-07T00:23:00”,“Local”:“2022-10-07T01:23:00”,“StartDST”:“2022-03-27T02:00:00”,“EndDST”:“2022-10-30T03:00:00”,“Timezone”:“+01:00”,“Sunrise”:“06:58”,“Sunset”:“18:16”}}
01:23:00.712 RSL: STATUS10 = {“StatusSNS”:{“Time”:“2022-10-07T01:23:00”,“Switch1”:“ON”}}
01:23:00.719 RSL: STATUS11 = {“StatusSTS”:{“Time”:“2022-10-07T01:23:00”,“Uptime”:“0T00:01:18”,“UptimeSec”:78,“Heap”:26,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“Wifi”:{“AP”:1,“SSId”:“dte3d”,“BSSId”:“0E:C5:B4:F2:50:58”,“Channel”:11,“Mode”:“11n”,“RSSI”:72,“Signal”:-64,“LinkCount”:1,“Downtime”:“0T00:00:03”}}}
01:23:03.756 RSL: RESULT = {“POWER”:“OFF”}
01:23:03.758 RSL: POWER = OFF
01:23:04.849 RSL: RESULT = {“POWER”:“ON”}

@hongtat Only today I managed to verify what happened, I found out easily, for some reason the IR codes were erased from the console of the image below.

Thank you for everything you do for the community!

@hongtat I added a Sonoff POW metering switch but it doesn’t show the total power consumption.


image

Hongtat, would it be possible to add more device types in smart things, like sirens, buzzers and motion sensors?

@hongtat - As another user who is currently looking to convert from Konnected to a local setup I also think separate devices would be nicer, also if switches could be configured as different device types, contact sensors, motion sensors, sirens, buzzers, etc… that would make things really slick and clean.

Love the work and happy to contribute if I can get everything how I need it…

Under the Tasmota device console, do you see similar to this?

Yes.