[DEPRECATED] Tasmota 7.x/8.x firmware for Hubitat + Tuya, Sonoff and other drivers

Which module have you set Tasmota to for the Sonoff Basic R3? I have Sonoff Minis so that one I know. The Zigbee-based one would be outside of the scope for these drivers, probably need some special parsing. When I get to rewriting my drivers for all Xiaomi devices I have, I'm sure it would be easy to get that one supported as well, if you find a driver for the Zigbee based one, give me a shout and I'll add it as reference material for my future updates. I intend to have all drivers I use to be created using my own framework, that way I get consistency, adding some extra devices on the way just improves my over all code.

For temperature readings I'm not certain what is being sent since I have no temperature/humidity sensors with Tasmota. If you could run one of my drivers with logging set to "Reports+Status" and post the log, that would help. Make sure you see things in the logs regarding temperature and humidity. Also press the "Refresh" button of the driver. That may generate some additional messages which need decoding. Also need the Template or Module number for this one.

Pretty sure it's this driver that I am using.

It seems the guys are getting buy with the generic zigbee HE driver so maybe that's enough.

Sure I can do that. btw I am using the Tasmota sensor version here so i'd imagine it will require re-packaging with this version too. In relation to the module it's a BME280 sensor see here.

How will you go about this? Do you reflash to 7 minimal then this version? Mine are all on 6.5 I believe.

Yeah that would be the plan, just minimal flash then reload.

Ok, so you have made no changes on the Tasmota device webpage? What I need to know is which module selection and if you've set a Template on the Tasmota webpage. If you have, I can make those part of the driver so that they are set correctly.

Then there is no need for anything special.

ok, will need the Template setting you're using in Tasmota so I get that to be part of the driver.

1 Like

Yes, first 7 minimal if you're already on Tasmota, when going with Tuya convert, flash with 7 Basic first. After Basic you can flash with minimal and finally with the actual Hubitat firmware. Do make sure to use the firmware from the same release together, mismatching/mixing MIGHT cause problems.

Why would you try and flash Tasmota to the Zigbee version. The zigbee version doesn't have an ESP8266 chip. The zigbee based one works with the generic Zigbee switch driver out of the box.

1 Like

Not talking about the firmware here, just the HE drivers. Since they work with the Generic driver, then there is no need to do anything. I have Zigbee devices which do need special drivers, like Aqara curtain motors. When I do get around to releasing Zigbee drivers for devices not working with generic ones, I will create a new thread for those to keep the confusion down...

1 Like

Sonoff Mini - {"NAME":"Sonoff Mini","GPIO":[17,0,0,0,9,0,0,0,21,56,0,0,255],"FLAG":0,"BASE":1}
Sonoff Basic R3 - just using module type Sonoff Basic no other changes
Brilliant plug (tuya) - I am using this template

For the Brilliant plug (tuya) with my temp sensor mod it's similar to the above one I mentioned with the additional I2C SCL and SDA functions to support the BME280 sensor.

Also while I am at it, here is the Brilliant energy monitor plug template details which I use with the driver you updated for me the other day.

I've got my plug flashed with the custom firmware, however the app isn't discovering yet. Do I need to do anything with 'emulation'? Or just populating the hubitat ip / port should do it?

Oh. and also looking for a driver with this template. {"NAME":"Prime","GPIO":[0,0,0,0,57,56,0,0,21,122,0,0,0],"FLAG":0,"BASE":18}

Thanks

I've used my Mini with a different setup, but this one works well, have switched the driver to that.
The Sonoff Basic driver has been updated. Not sure if I really should generate one for Basic and one for Basic R3, they are now identical except in name.

For your Brilliant plug with the BME280 sensor

I've been so caught up with the firmware and the drivers I forgot to mention that currently the auto-discovery feature of the app is broken. It is using some undocumented features of HE to do this, and right now it doesn't work. Will work on fixing that when I find some time.
At the moment the only way is to input the IP of the device into the Tasmota Connect app and add it manually. Once added it can be found in the Device list with all other devices and the settings of the device are done there.
My Generic Wifi Switch driver will work with that template, just paste that template into the Template field of the driver, save Preferences and press Configure. That should do it. If you use a password on your Tasmota device, also add that to the device config. As long as you don't have an exotic and non-standard (ie just a normal home network with a router and no firewalls or other filtering network equipment between HE and your device) network setup, no other settings should be needed.
What kind of device is that "Prime" one? What's the full name of it? Need this for naming the driver I'll generate.

1 Like

This is the same Template as my S120 Plug driver. Mine look the same, except the socket pins are for China.

1 Like

Sorry didn't quite follow that, which driver should I use with this one? I would also need a new Tasmota Sensors .bin as well if I was to bring this one over as it needs the sensors addon.

Sorry, I was interrupted and forgot to finish that sentence, so no wonder you don't understand :stuck_out_tongue:
The driver to use for the debug-log would be the generic-pm-plug one which will be in the repository in a bit, but without the sensor addon the logs will not be complete, so best to handle that first. Set debug to Insanely Verbose and give me the rows which start with "result:".
Ah, if you need the sensors addon I can compile a bin for that, will have to see how large that gets though.
@jchurch I've compiled a sensors-binary, it is on GitHub in the same release. It is UNTESTED. Ie, I have not flashed it to any device. Compilation was successful without errors and size looks ok. Go from minimal to this one and there should be no issues. Please tell me how it goes.

1 Like

All good, I added it via IP and it seems to work. Interestingly enough, setting the template in hubitat makes the tasmota 'forget' its wifi configuration and go back to AP mode after 5 minutes or so.

I wasn't sure whether your generic wifi switch was for a plug, or just a light switch. I ended up using your sonoff s2x driver, and it seemed to work as well.

The prime plug is referenced here: Prime CCRCWFII113PK

Thanks for all your work to this integration.

How/when did this happen? This could be a bug that would need fixing in the Tasmota firmware. The driver does NOT change that setting.

That is a good point, I renamed the driver to "Tasmota - Generic Wifi Switch/Plug". I also made a driver for the Prime CCRCWFII113PK plug with the Template specified inside the driver. Please test it.

Thanks for the new firmware. I've got this light up RGB Switch, that I'm gonna try and write a driver for.
{"NAME":"RGB Switch","GPIO":[56,255,58,10,39,38,0,0,57,9,37,21,157],"FLAG":0,"BASE":18}

Under the Hue Emulation it shows up as two separate devices, a switch and an RGB bulb. I was wondering, do you think the best way to go about making a driver would be to set it up with child devices?

I don't have any RGB switches, but as far as controls go, for me that one looks like it would make most sense to do without child devices.
I misunderstood what this device was at first. This should probably use a child device for one of the two buttons, since you probably want to be able to turn them on and off individually and there is only one on/off state per device without using attributes/state to save a second state. But doing that would make it harder to use in Dashboard.
When you have a working driver, let me know and I'd love to take a look:) I have an RGB controller I want to add to my setup with an RGB strip, maybe I find time to write a driver for that one...
If your Python skills are good you could use my generation scripts for building the driver with minimal effort, though they have very little comments and no documentation. They are also not adapted for external use and require you to read and understand them to use them. If they're of any help, do use them, they can even automatically update changes and upload them to HE. Without understanding the script at least partially, it won't start, this is by design.

Alright all done.

dev:8242019-12-18 06:59:42.258 pm warnNo route to host (Host unreachable)

dev:8242019-12-18 06:59:39.241 pm debugrefresh()

dev:8242019-12-18 06:59:31.381 pm debugresult: [FriendlyName1:Comms Rack GPO]

dev:8242019-12-18 06:59:31.302 pm debugresult: [HubitatPort:39501]

dev:8242019-12-18 06:59:31.074 pm debugresult: [HubitatHost:192.168.1.9]

dev:8242019-12-18 06:59:30.959 pm debugresult: [SetOption113:ON]

dev:8242019-12-18 06:59:30.842 pm debugresult: [TelePeriod:10]

dev:8242019-12-18 06:59:30.672 pm debugModule: [43:Sonoff Pow R2]

dev:8242019-12-18 06:59:30.667 pm debugresult: [Module:[43:Sonoff Pow R2]]

dev:8242019-12-18 06:59:30.558 pm debugTemplate: {"NAME":"Generic","GPIO":[255,255,255,255,255,255,255,255,255,255,255,255,255],"FLAG":15,"BASE":18}

dev:8242019-12-18 06:59:30.546 pm debugresult: [NAME:Generic, GPIO:[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], FLAG:15, BASE:18]

dev:8242019-12-18 06:59:30.401 pm debugModule: [18:Generic]

dev:8242019-12-18 06:59:30.398 pm debugresult: [Module:[18:Generic]]

dev:8242019-12-18 06:59:30.189 pm debuginitialize()

dev:8242019-12-18 06:59:30.180 pm debug[GET /cm?cmnd=Module HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=Template HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=Module%2043 HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=TelePeriod%2010 HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=SetOption113%201 HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=HubitatHost%20192.168.1.9 HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=HubitatPort%2039501 HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , GET /cm?cmnd=FriendlyName1%20Comms+Rack+GPO HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat Host: 192.168.30.10:80 Content-Type: application/x-www-form-urlencoded Content-Length: 0 , null]

dev:8242019-12-18 06:59:30.027 pm debugRunning sync()

dev:8242019-12-18 06:59:29.974 pm debugThis DOESN'T start with [43 [18:Generic]

dev:8242019-12-18 06:59:29.969 pm debugdevice.currentValue('module'): '[18:Generic]'

dev:8242019-12-18 06:59:29.960 pm debugSetting the Module soon...

dev:8242019-12-18 06:59:29.952 pm debug{"NAME":"Generic","GPIO":[255,255,255,255,255,255,255,255,255,255,255,255,255],"FLAG":15,"BASE":18}

dev:8242019-12-18 06:59:29.941 pm debugCan't set the Template...

dev:8242019-12-18 06:59:29.871 pm debugupdated()