[RELEASE] Tasmota for HE - Auto-detecting Tasmota drivers + Tasmota firmware 7.x/8.x for HE (for use with Tuya, Sonoff and other ESP devices)

Ok, reset the device and removed from HE then redid the whole process using HE firmware 8.3.1 and the slider works fine.

Unfortunately, no web hook in this version.

There is definitely something in HE 8.5.1 that screws up slider control on the device.

1 Like

You should ask Marcus in the other forum. This one is no longer monitored by the developer. Due to the world of Internet censorship we live in, I cannot say anything more about the forum, I do not want to be banned from this community.

Ok, I will do some internet sleuthing and try and track down the forum.

cheers Rick

First of all, thanks to Sebastien for getting me up and running with my T4HE Tasmotized S31s. They are communicating with Hubitat successfully and the power monitoring is working flawlessly. One additional question though for anyone that can help. I have some use cases where although 90% of my use for the Tasmotized S31s is local only with Hubitat, I would like to access them as well through Alexa. I noted that the Tasmotized S31s show up as devices in the Hubitat Amazon Echo Skill App. However, even though they seem to be recognized, even when the devices are selected to use with Alexa, they do not appear to show up on the Alexa devices end. I was hoping they would to simplify access. Does anyone know if they can be accessed or do I have to make virtual contact switches for each outlet and control them indirectly with Alexa through the virtual contact switches? TIA!

1 Like

These should be available in Alexa when selected, like every other device. Do you know how many devices you are sharing with Alexa? There is an upper limit unfortunately...

Hi Sebastien,
Catching you between SuperBowl plays, lol! I have 47 devices shared by Hubitat with Alexa through the Hubitat Amazon Echo Skill. I did try to add some other devices just to see if I could and did not have a problem doing so. Just not able to get my Tasmota devices to show in Alexa, although they do show up with a check box in the Echo Skill (and allow adding them to the Hubitat list in the App.)

Do you know if there is a limit of devices on the Alexa end? I have not been able to find the info with my searches. In addition to the devices shared by Hubitat, I have perhaps 50 more physical devices (mainly light switches, plugs etc) on the Alexa side.

Reaction speed seems to suffer very little lag luckily. IIRC, I seem to remember something in older Tasmota threads about needing to set the Tasmota’d devices with Wemo emulation (or something like that)? Is there a setting to do this (I’m using Mark’s T4HE App and drivers on my S31’s). Thanks again.
Mike

Hehe... I wouldn’t worry about 47 devices. I don’t recall the upper limit, but I think it is over 100...

I have Tasmota devices shared with Alexa and I just confirmed that they worked. Have you tried removing and adding it again? It is really odd that it doesn’t work...

Thanks Sebastien.
Sorry for the trouble but thanks for taking the time to help. I made a newbie mistake. In the past, every time I added a device via the Echo Skill app, Alexa would automatically pick up the devices from the Skill app and they would show up automatically in the Alexa device list. I reloaded a couple of times and they did not show my Tasmota devices. This last time, I tried to discover the devices from the Alexa side (like you do when adding a “conventional” Alexa device) by clicking on the Smart Home device option in the Discover Devices. AND...lo and behold, my S31’s showed up! The Outlets showed up as Light bulbs (I’m assuming because the emulation set in Tasmota is a Hue emulation). Anyway, as always, thank you so much for your great and quick help. :slight_smile:

2 Likes

Hello Everyone!
This is a wonderful project and really does some awesome stuff. I am currently trying to get TreatLife DS02S Dimmers to work fully using Tasmota with webhooks and Hubitat.
I am using the Universal Parent Drivers and the child driver I am using is the Generic Component Dimmer. I followed the DS02S Tasmota install docs from this link:


It seems to work great. I am able to turn the light switch on and off vis Hubitat as well as use "Set Level" to change the dimming level. I am also able to move the slider on the Tasmota WebUI to adjust the dimming level.

The problem I am facing is that neither the Tasmota WebUI nor Hubitat detects when the dimming level is changed locally at the switch. I check the Tasmota console and the switch is reporting the dimming level but it is not getting kicked back to update Hubitat or the WebUI.

Here are some of the responses I get when I increase the dimmer level.

12:49:03 TYA: Send "55aa00000000ff"
12:49:03 {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
12:49:03 TYA: Heartbeat
12:49:08 {"TuyaReceived":{"Data":"55AA0307000802020004000002D2ED","Cmnd":7,"CmndData":"02020004000002D2","DpType2Id2":722,"2":{"DpId":2,"DpIdType":2,"DpIdData":"000002D2"}}}
12:49:08 TYA: fnId=21 is set for dpId=2
12:49:08 TYA: RX value 722 from dpId 2 
12:49:08 {"TuyaReceived":{"Data":"55AA03070008020200040000031834","Cmnd":7,"CmndData":"0202000400000318","DpType2Id2":792,"2":{"DpId":2,"DpIdType":2,"DpIdData":"00000318"}}}
12:49:08 TYA: fnId=21 is set for dpId=2
12:49:08 TYA: RX value 792 from dpId 2 
12:49:08 {"TuyaReceived":{"Data":"55AA0307000802020004000003A2BE","Cmnd":7,"CmndData":"02020004000003A2","DpType2Id2":930,"2":{"DpId":2,"DpIdType":2,"DpIdData":"000003A2"}}}
12:49:08 TYA: fnId=21 is set for dpId=2
12:49:08 TYA: RX value 930 from dpId 2 
12:49:14 TYA: Send "55aa00000000ff"
12:49:14 {"TuyaReceived":{"Data":"55AA030000010104","Cmnd":0,"CmndData":"01"}}
12:49:14 TYA: Heartbeat
12:49:17 WIF: Checking connection...

This is what it looks like when I send a Set Level: 20 command via Hubitat:

2:53:52 HTP: Command
12:53:52 SRC: WebCommand from 192.168.2.34
12:53:52 CMD: Group 0, Index 1, Command "DIMMER", Data "20"
12:53:52 RSL: RESULT = {"POWER":"ON","Dimmer":20}
12:53:52 CFG: Saved to flash at F5, Count 87, Bytes 4096
12:53:53 TYA: Send "55aa0006000802020004000000c8dd"
12:53:53 {"TuyaReceived":{"Data":"55AA0307000802020004000000C8E1","Cmnd":7,"CmndData":"02020004000000C8","DpType2Id2":200,"2":{"DpId":2,"DpIdType":2,"DpIdData":"000000C8"}}}
12:53:53 TYA: fnId=21 is set for dpId=2
12:53:53 TYA: RX value 200 from dpId 2 
12:53:58 WIF: Checking connection...
12:54:00 TYA: Send "55aa00000000ff"

Does anyone have any hints at what I might be doing wrong or how I might be able to troubleshoot this problem better?

Cheers, Rob N

1 Like

I just run into exactly same issue. But note - ON/OFF state on the Tasmota WebUI is reported correctly, and dimmer state is updated to correct position after I refresh the page.

I've tired it both on stock Tasmota 9.2 and 9.1 and on Tasmota 8.5.1 by Theo Arends & with HttpHook by Oh-La Labs

And also, when I go the device settings in Hubitat and press refresh, it's updating it to the correct state.

1 Like

Hmm. I have only tried Tasmota 8.5.1 with HttpHook. When I refresh the webpage it doesn't update and when I refresh on Hubitat it doesn't update. I wonder if that indicates anything. They update when I use Hubitat or use the WebUI but never when I hit the dimmer button on the switch.
Some Device Data
* ip: 192.168.2.46
* port: 80
* deviceConfig: tuyamcu-wifi-dimmer
* driver: v1.1.1.1123T
* uptime: 0T00:00:58
* firmware: 8.5.1(tasmota-he)

Current States
* driver : v1.1.1.1123T
* ip : 192.168.2.46
* ipLink : 192.168.2.46
* lastCheckin : 2021-02-13 18:10:36
* module : [0:DS02SDimmer]
* notPresentCounter : 0
* presence : present
* restoredCounter : 1
* templateData : {"NAME":"DS02SDimmer","GPIO":[0,107,0,108,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
* wifiSignal : 92%

Update:
I have also tried the Tasmota Universal Dimmer (Child) Drive with the same results. I am trying to look through the code now to see if I can pin point why it is not getting updated.

Update again:

Looks like when a Dimmer command is sent via Hubitat or WebUI it comes up on the console like this:

19:52:46 HTP: Command
19:52:46 SRC: WebCommand from 192.168.2.34
19:52:46 CMD: Group 0, Index 1, Command "DIMMER", Data "25"
19:52:46 RSL: RESULT = {"POWER":"ON","Dimmer":25}
19:52:46 CFG: Saved to flash at F7, Count 117, Bytes 4096
19:52:47 TYA: Send "55aa0006000802020004000000fa0f"
19:52:47 {"TuyaReceived":{"Data":"55AA0307000802020004000000FA13","Cmnd":7,"CmndData":"02020004000000FA","DpType2Id2":250,"2":{"DpId":2,"DpIdType":2,"DpIdData":"000000FA"}}}
19:52:47 TYA: fnId=21 is set for dpId=2
19:52:47 TYA: RX value 250 from dpId 2 
19:52:50 TYA: Send "55aa00000000ff"

While when a button is pressed on the controller I get this:

19:53:41 {"TuyaReceived":{"Data":"55AA0307000802020004000001334D","Cmnd":7,"CmndData":"0202000400000133","DpType2Id2":307,"2":{"DpId":2,"DpIdType":2,"DpIdData":"00000133"}}}
19:53:41 TYA: fnId=21 is set for dpId=2
19:53:41 TYA: RX value 307 from dpId 2 
19:53:45 TYA: Send "55aa00000000ff"

It looks as though the HttpHooks or Tasmota code parse the "RESULT = {"POWER":"ON","Dimmer":25}" fine and finds the work Dimmer and can update it correctly. But when a change is made on the switch itself there is no normal Result printout. I need to figure out a way to have Tasmota or the Hubitat app parse the TuyaReceived and recognize the data sting "55AA0307000802020004000001334D" which I believe is associated with the dimmer.

When I run a TuyaSend8 to check all the DpId's this is what I see

19:58:02 RSL: RESULT = {"TuyaSend":"Done"}
19:58:02 {"TuyaReceived":{"Data":"55AA0301002A7B2270223A22716166726F6461626F63327274736130222C2276223A22332E342E33222C226D223A307D26","Cmnd":1,"CmndData":"7B2270223A22716166726F6461626F63327274736130222C2276223A22332E342E33222C226D223A307D"}}
19:58:02 TYA: MCU Product ID: {"p":"qafrodaboc2rtsa0","v":"3.4.3","m":0}
19:58:02 TYA: Send "55aa0002000001"
19:58:02 {"TuyaReceived":{"Data":"55AA0302000004","Cmnd":2}}
19:58:02 TYA: RX MCU configuration Mode=0
19:58:02 TYA: Read MCU state
19:58:02 TYA: Send "55aa0008000007"
19:58:02 {"TuyaReceived":{"Data":"55AA03070005010100010112","Cmnd":7,"CmndData":"0101000101","DpType1Id1":1,"1":{"DpId":1,"DpIdType":1,"DpIdData":"01"}}}
19:58:02 TYA: fnId=11 is set for dpId=1
19:58:02 TYA: RX Relay-1 --> MCU State: On Current State:On
19:58:02 {"TuyaReceived":{"Data":"55AA0307000802020004000001334D","Cmnd":7,"CmndData":"0202000400000133","DpType2Id2":307,"2":{"DpId":2,"DpIdType":2,"DpIdData":"00000133"}}}
19:58:02 TYA: fnId=21 is set for dpId=2
19:58:02 TYA: RX value 307 from dpId 2 
19:58:02 {"TuyaReceived":{"Data":"55AA0307000803020004000000647E","Cmnd":7,"CmndData":"0302000400000064","DpType2Id3":100,"3":{"DpId":3,"DpIdType":2,"DpIdData":"00000064"}}}
19:58:02 TYA: fnId=0 is set for dpId=3
19:58:02 TYA: RX value 100 from dpId 3 
19:58:02 {"TuyaReceived":{"Data":"55AA03070005040400010017","Cmnd":7,"CmndData":"0404000100","DpType4Id4":0,"4":{"DpId":4,"DpIdType":4,"DpIdData":"00"}}}
19:58:02 TYA: fnId=0 is set for dpId=4
19:58:02 {"TuyaReceived":{"Data":"55AA0307000866020004000000007D","Cmnd":7,"CmndData":"6602000400000000","DpType2Id102":0,"102":{"DpId":102,"DpIdType":2,"DpIdData":"00000000"}}}
19:58:02 TYA: fnId=0 is set for dpId=102
19:58:02 TYA: RX value 0 from dpId 102 
19:58:09 TYA: Send "55aa00000000ff"

Sorry for all the console spam but this is the best way I know how to communicate what I am seeing. This is my first time using Hubitat and Tasmota so I am in pretty new territory for myself.

I tried rolling back to Tasmota with HttpHooks v8.3.1 and that fixed it. Not sure why but something with v8.5.1 breaks the reporting of dimmer status to HE hub.

2 Likes

This was pretty random for me - downgrade to 8.3.1 itself didn't help - I've tried restarting both switch and hubitat, and its presence wasn't discovered.
But what worked, surprisingly, is after I've enabled debug logs, to investigate it further it magically started to work. And it keeps on working even now after I've disabled debug logs.

1 Like

I can confirm this. I must have turned on debugging to try and figure out what was going wrong and did not catch the connection between turning it on and it working. I have only tested this with v8.3.1. Still have to try v8.5.1. Thank you Marcik4

First, thank for the great work, and sharing it.
I just got Topgreener plug TGWF115PQM, flashed with 8.5.1 HE firmware; on Hubitat, adding device using Universal Parent; switch on / off works. The device web interface shows the power/current/voltage etcs; However, I did not see any energy monitoring info on Hubitat. Is there a special device type to choose to be able to view the power usage ?

Thanks for the info, I went in and change the child to generic component metering switch, and it stay the same. I removed the device from HE, and add it back again, still show no metering info. Attached screen captures, please let me know if I missed somethings.

Great, I got the metering info now. However, it does not update the usage info unless I manually refresh from the HE device list. I have the httphook point to the HE, anything else needed to have the metering info update automatically ? Thanks,

it updates based on the teleperiod of the device.

1 Like

With help from micollno, at9. I am able to setup TopGreener plug with power monitoring (TGWF115PQM) to work with HE.

1, tuya-convert OTA flash tasmota 9.2; this is the original version without HE mode, as part of the tuya-convert package.
2, after initial flash completed, the plug restart, and front led fast flash (every second or so). connect your PC to the plug via SSID tasmota-xxxxx-xxxx to config the WIFI setup for the device.
3, After save your WIFI setup, the device restart; and connect to your Wireless router.
3, At this time, you can update the firmware to HE 8.5.1 via web page "Firmware Upgrade" option. (I tried to flash the HE minimal version directly from tuya-convert, for some reason the plug was put into an unknown state with ip 192.168.4.1, no web server, and I was not able to recover it yet).
4, From HE add "Tasmota Universal Metering plug" under driver (see #507) and add "Tasmota Device Manager" under apps. Then start the "Tasmota Device Manager" to "Install New Device", I used manual with IP address.
5. After device was added, it will list at the bottom of the page; select 'config' to go to the parent device under device list to continue the setup.
6. At the parent device, "device template" enter template. {"NAME":"TGWF115PQM","GPIO":[0,56,0,17,134,132,0,0,131,57,21,0,0],"FLAG":0,"BASE":18}; then save.
6, Go to child device, make sure the device type is set to "metering plug", save.
7, go to the tasmota device config page, perform the Power Monitoring Calibration.
8. then set the teleperiod to 10 (seconds) by enter "TelePeriod 10" under console.
9. after everything works, do remember to set the web admin password

The device is very picky about the WIFI connections; I had a hard time to get it connect to my AP after power cycle. But, once it settle, it works.

1 Like

Oh, I missed it. The 9.2 is the original version as part of the tuya-convert, not the HE mod. I updated my write up to make it clear.