[RELEASE] Tasmota (Connect) for Sonoff, Tuya, SmartLife & other ESP8266 devices)

Can you provide a link to the device and the template configuration?

Full tasmota command

IRsend ... - https://tasmota.github.io/docs/Tasmota-IR/#sending-ir-commands
IRHVAC ... - https://tasmota.github.io/docs/Tasmota-IR/#sending-irhvac-commands

This is not supported on the virtual hvac yet.

Hi, thanks for the quick reply. Here is a link to the device:

And here is the template I am using:

I have also set the following through the console:

TuyaMCU 11,1
TuyaMCU 12,7
TuyaMCU 21,2
TuyaMCU 22,8

This gives me a fully working 2 channel dimmer:

But this is something (model) I could put on the virtual switch command then correct?

Are the virtual devices supposed to be created automatically by the SmartApp? If not, I don’t see a temp/humidity virtual device to add manually in the SmartApp…alongside the motion, etc virtual sensors.

I added a TH16 with a temp sensor, but I don’t see any temp child device in ST. I have added all of the latest DTH’s in the repository, and have the latest version of the SmartApp.

Any ideas on why I receive no response from a Sonoff TH10 with Tasmota 9.1.0 to either the SmartThings App (newest version) or the Smarthings web Dashboard? Commands DO appear to arrive at the TH10 when looking at its’ web console. I have the latest versions of hongtat’s SmartApp and Device Handlers installed.

Hub: SmartThings V2, FW Version 00.32.12, IP address 192.168.1.3
TH10: Tasmota Version 9.1, IP address 192.168.1.39

Console log startup…

00:00:00 CFG: Loaded from flash at FA, Count 89
00:00:00 QPC: Count 1
00:00:00 SER: Set to 8N1 115200 bit/s
00:00:00 Project tasmota Tasmota on SonOff TH10 Version 9.1.0(tasmota)-2_7_4_5
00:00:00 WIF: Connecting to AP1 athome-n600 Channel 3 BSSId 14:35:8B:1E:68:E1 in mode 11N as tasmota_00C0CC-0204…
00:00:02 WIF: Connected
14:06:57 HTP: Web server active on tasmota_00C0CC-0204 with IP address 192.168.1.39
14:06:58 RSL: tele/tasmota_00C0CC/INFO1 = {“Module”:“Sonoff TH10”,“Version”:“9.1.0(tasmota)”,“FallbackTopic”:“cmnd/DVES_00C0CC_fb/”,“GroupTopic”:“cmnd/tasmotas/”}
14:06:58 RSL: tele/tasmota_00C0CC/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:“tasmota_00C0CC-0204”,“IPAddress”:“192.168.1.39”}
14:06:58 RSL: tele/tasmota_00C0CC/INFO3 = {“RestartReason”:“Software/System restart”}
14:06:58 RSL: stat/tasmota_00C0CC/RESULT = {“POWER”:“ON”}
14:06:58 RSL: stat/tasmota_00C0CC/POWER = ON
14:07:00 QPC: Reset
14:07:02 RSL: tele/tasmota_00C0CC/STATE = {“Time”:“2020-12-03T14:07:02”,“Uptime”:“0T00:00:10”,“UptimeSec”:10,“Heap”:24,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“POWER”:“ON”,“Wifi”:{“AP”:1,“SSId”:“athome-n600”,“BSSId”:“14:35:8B:1E:68:E1”,“Channel”:3,“RSSI”:100,“Signal”:-37,“LinkCount”:1,“Downtime”:“0T00:00:04”}}
14:07:02 RSL: tele/tasmota_00C0CC/SENSOR = {“Time”:“2020-12-03T14:07:02”,“SI7021”:{“Temperature”:65.3,“Humidity”:60.1,“DewPoint”:51.1},“TempUnit”:“F”}
14:10:08 RSL: stat/tasmota_00C0CC/STATUS8 = {“StatusSNS”:{“Time”:“2020-12-03T14:10:08”,“SI7021”:{“Temperature”:65.3,“Humidity”:60.1,“DewPoint”:51.1},“TempUnit”:“F”}}
14:10:08 RSL: stat/tasmota_00C0CC/STATUS11 = {“StatusSTS”:{“Time”:“2020-12-03T14:10:08”,“Uptime”:“0T00:03:16”,“UptimeSec”:196,“Heap”:24,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:24,“MqttCount”:0,“POWER”:“ON”,“Wifi”:{“AP”:1,“SSId”:“athome-n600”,“BSSId”:“14:35:8B:1E:68:E1”,“Channel”:3,“RSSI”:100,“Signal”:-39,“LinkCount”:1,“Downtime”:“0T00:00:04”}}}

.
.
When I attempt to turn the switch on from the App, the App state times out and doesn’t change even though the command succeeds.

Console log of Turn On command from App on my phone…

16:44:24 RSL: stat/tasmota_00C0CC/RESULT = {“POWER”:“ON”}
16:44:24 RSL: stat/tasmota_00C0CC/POWER = ON
16:44:24 RUL: POWER1#STATE performs "WebSend [192.168.1.3:39500] /?json={“StatusSTS”:{“POWER1”:“1”}}"
16:44:24 RSL: stat/tasmota_00C0CC/RESULT = {“WebSend”:“Done”}

Thanks!

Select Sonoff TH, and it should create a parent switch device and a child temp/humidity sensor device.

It seem that the HTTP connection from the Sonoff device to ST hub is dropped. You can verify whether it is the case in ST IDE Live Logging. It shows the send & receive messages between them.

Try restart the ST hub. And check your network/firewall, it’s likely a network issue.

@hongtat, thanks for your answer.

I’m not sure why it did not create the child device.

Should Virtual Temp/Humidity Sensor be one of the device types listed in “What device do you want to add”? I do not have it listed. I’m guessing it should be. I see:

Virtual Air Conditioner
Virtual Contact Sensor
Virtual Motion Sensor
Virtual Shade/Blind

Tasmota Child Temp/Humidity Sensor is in my Device Handlers list.

Could I create the child device and assign the DH to it manually…to test?

Could it be not adding the child device because I don’t have the temp & humidity sensor? I have the DS18B20, which is only a temp sensor.

Hi Dave, I have a very similar module but when I opened it up I could see no gpio pins exposed to flash it with Tasmotizer. How did you flash it please?

@hongtat, here are some Live Logging messages. What do the NullPointerExceptions mean in the logs? I used the switch’s button to turn it off followed by using the App to turn it “On”. This did close the switch. Again, no update at the App, only a message saying, *“A network error occurred. Try again later.”

I will check my network as you requested. Note, for this connection, the LAN element is a wireless access point with an embedded ethernet switch. This is wire connected to the Smartthings hub and wirelessly connected to the Tasmota switch.
.

Live Logging output with a few working Z-Wave motion sensor logs (…dcd4)

8915d8df-2212-4cd2-9de0-efe44b02baa7 10:18:13 AM: error java.lang.NullPointerException @line 129 (parseEvents)

50e661df-182e-4def-8258-495106a6b25c 10:18:13 AM: debug Humidity Switch (192.168.1.39) called: POWER1 1

6320d8eb-e611-4737-b676-a019b2bbdcd4 10:17:57 AM: debug Motion is active

6320d8eb-e611-4737-b676-a019b2bbdcd4 10:16:46 AM: debug Motion is inactive

8edd8a27-2be9-4d58-9cd5-f20a5577cd5f 10:16:32 AM: info Node Applet Bridge Status: Not Accessible

8915d8df-2212-4cd2-9de0-efe44b02baa7 10:15:09 AM: error java.lang.NullPointerException @line 129 (parseEvents)

8915d8df-2212-4cd2-9de0-efe44b02baa7 10:15:09 AM: error java.lang.NullPointerException @line 129 (parseEvents)

8915d8df-2212-4cd2-9de0-efe44b02baa7 10:15:09 AM: error java.lang.NullPointerException @line 129 (parseEvents)

8915d8df-2212-4cd2-9de0-efe44b02baa7 10:15:09 AM: error java.lang.NullPointerException @line 129 (parseEvents)

50e661df-182e-4def-8258-495106a6b25c 10:15:09 AM: debug Humidity Switch (192.168.1.39) called: Status 11

50e661df-182e-4def-8258-495106a6b25c 10:15:09 AM: debug Humidity Switch (192.168.1.39) called: Status 8

50e661df-182e-4def-8258-495106a6b25c 10:15:09 AM: debug Humidity Switch (192.168.1.39) called: Status 5

50e661df-182e-4def-8258-495106a6b25c 10:15:09 AM: debug Humidity Switch (192.168.1.39) called: Status 2

8915d8df-2212-4cd2-9de0-efe44b02baa7 10:13:08 AM: error java.lang.NullPointerException @line 129 (parseEvents)

50e661df-182e-4def-8258-495106a6b25c 10:13:06 AM: debug Humidity Switch (192.168.1.39) called: POWER1 1

6320d8eb-e611-4737-b676-a019b2bbdcd4 10:11:58 AM: debug Motion is active

10:11:40 AM: info Waiting on events…

10:11:40 AM: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.

10:11:40 AM: info This console provides live logging of your SmartThings.
.

Thanks!

Here is a link to the page I used - https://github.com/arendst/Tasmota/issues/5737

Tasmotizer couldn’t flash it for me, but using esptool I managed to get it flashed. My tip is to connect 3V, GND, Tx, Rx - power up with GPIO0 connected to GND and then briefly connect the RST pin to GND - that gets it into programming mode. Erase the flash and then program tasmota - all good.

@BartschLabs I think i might be having the same problem. When I try to add a new Tasmoto Device in the Tasmota (Connect) Smart App, the switch isn’t showing up in my list of devices even though it is listed under “Installed Devices”.

I am probably doing something wrong because I am having the exact same problem with @erocm1231 Sonoff-Connect Smart App. It must be some nuance on how the new iOS app functions that i am not understanding.

I think i found the issue here:

https://community.smartthings.com/t/smartthings-new-app-not-showing-all-devices-vs-classic-app-40-missing/193111?u=daniel_paulsen

@Daniel_Paulsen, do you mean the device gets created for you and shows up in the IDE but doesn’t show up in the new app?

For me, the child device just doesn’t get created. I think the smartapp isn’t recognizing that I have a sensor on my TH16 while it’s creating my TH16 device. My TH16 device gets created just fine and shows up in all three places: IDE, classic app, & new app.

Hi @hongtat, by the way very happy with the virtual switch on the IR blaster turning on and off the air conditioner (even with a fixed temp).

I was wondering I could use one of your DHs to a Standard Sonoff switch, with the tasmota-sensors.bin version and using the Tem/Humd sensors or a light sensor or a PIR sensor.

Does it supports?

Did you create it as “Sonoff TH” device? And any errors in the IDE “Live logging”?

@hongtat Thank you so much for your hard work and skill bringing this integration to us all!

I have my Sonoff Pow R2 successfully connected, and it toggles on and off correctly, but I can’t get any power meter readings.

I’ve installed the app and all the device handlers via GitHub. The Sonoff is flashed to Tasmota 9.1.0 and the power information all shows correctly in the web interface.

Have tried adding the device via Tasmota Connect as both a Pow R2 and also a Generic Metering Switch (1ch) but neither seems to provide power information. The only info I get in SmartThings (using the v2 app btw) other than the state of the relay is the wifi signal strength.

Any pointers gratefully accepted!

ps if it helps here is the log information that seemed relveant:

45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Backlog Rule3 ON Tele-Energy#Power DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Power”:"%value%"}}} ENDON ON Tele-Energy#Total DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Total”:"%value%"}}} ENDON ON Tele-Energy#Voltage DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Voltage”:"%value%"}}} ENDON ON Tele-Energy#Current DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Current”:"%value%"}}} ENDON;Rule3 1;TelePeriod 10
45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Backlog Rule2 ON Power5#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER5”:"%value%"}} ENDON ON Power6#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER6”:"%value%"}} ENDON ON Power7#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER7”:"%value%"}} ENDON ON Power8#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER8”:"%value%"}} ENDON;Rule2 1
45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Backlog Rule1 ON Power#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER”:"%value%"}} ENDON ON Power1#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER1”:"%value%"}} ENDON ON Power2#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER2”:"%value%"}} ENDON ON Power3#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER3”:"%value%"}} ENDON ON Power4#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER4”:"%value%"}} ENDON;Rule1 1
45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Status 5
db8bd051-59be-48b3-9702-464003f4aa9a 18:37:26: debug MAC: ‘84:F3:EB:8D:61:19’, DNI: ‘84F3EB8D6119’
45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Backlog Rule3 ON Tele-Energy#Power DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Power”:"%value%"}}} ENDON ON Tele-Energy#Total DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Total”:"%value%"}}} ENDON ON Tele-Energy#Voltage DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Voltage”:"%value%"}}} ENDON ON Tele-Energy#Current DO WebSend [192.168.2.79:39500] /?json={“StatusSNS”:{“ENERGY”:{“Current”:"%value%"}}} ENDON;Rule3 1;TelePeriod 10
45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Backlog Rule2 ON Power5#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER5”:"%value%"}} ENDON ON Power6#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER6”:"%value%"}} ENDON ON Power7#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER7”:"%value%"}} ENDON ON Power8#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER8”:"%value%"}} ENDON;Rule2 1
45780ed7-56ec-44a0-a11b-91c3185d8fee 18:37:26: debug Iron (192.168.3.196) called: Backlog Rule1 ON Power#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER”:"%value%"}} ENDON ON Power1#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER1”:"%value%"}} ENDON ON Power2#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER2”:"%value%"}} ENDON ON Power3#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER3”:"%value%"}} ENDON ON Power4#state DO WebSend [192.168.2.79:39500] /?json={“StatusSTS”:{“POWER4”:"%value%"}} ENDON;Rule1 1

1 Like

@hongtat, yes I created the device as a “Sonoff TH” device.

Initially it showed up with !!!, but a couple of minutes later the !!! went away.

Here is an abridged log:

10:41:26 AM: debug Freezer Thermometer (192.168.x.x) called: Status 11
10:41:26 AM: debug Freezer Thermometer (192.168.x.x) called: Status 8
10:41:26 AM: debug Freezer Thermometer (192.168.x.x) called: Status 8
10:41:26 AM: debug Freezer Thermometer (192.168.x.x) called: Backlog Rule2 ON Power5#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER5”:"%value%"}} ENDON ON Power6#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER6”:"%value%"}} ENDON ON Power7#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER7”:"%value%"}} ENDON ON Power8#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER8”:"%value%"}} ENDON;Rule2 1
10:41:26 AM: debug Freezer Thermometer (192.168.x.x) called: Backlog Rule1 ON Power#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER”:"%value%"}} ENDON ON Power1#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER1”:"%value%"}} ENDON ON Power2#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER2”:"%value%"}} ENDON ON Power3#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER3”:"%value%"}} ENDON ON Power4#state DO WebSend [192.168.x.x:39500] /?json={“StatusSTS”:{“POWER4”:"%value%"}} ENDON;Rule1 1
10:41:26 AM: debug Freezer Thermometer (192.168.x.x) called: Status 5
10:40:32 AM: debug getChildDevices(false), children=3
10:40:22 AM: debug Created ‘Freezer Thermometer’ - 2ch
10:40:22 AM: debug channel: 2
10:39:35 AM: debug getChildDevices(false), children=2