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

Ok, so I found one other oddity now. Tasmota sets B=0 (in HSB setting) when using ColorTemperature mode. Rather than using B for the "Level" value (as I understand you have set your code up to do) it uses the Dimmer parameter.

01:10:15 RSL: stat/tasmota/RESULT = {"POWER":"ON","Dimmer":28,"Color":"0000003413","HSBColor":"0,75,0","Channel":[0,0,0,20,7],"CT":244}

With the code the way it is set now, there is no way to set the brightness in Hubitat when using color temperate more.

However, setting the light color in Tasmota using HSB, B is always equal to Dimmer. Therefore, I think it would work better with Hubitat if your code always used "Dimmer" in place of the "B" parameter. This is required so the RGB light panel in the Hubitat dashboard works correctly.

If this is not clear, I can expand my answer. I'll probably try to change the code sometime this evening to see if it will work.

1 Like

This is mostly correct, should have been there to begin with, I don't have any RGBWW lights yet. Should have ordered them a long time ago, ordered them now.

The code should be:

if (result.containsKey("CT")) {
    t = Math.round(1000000/result.CT)
    if(colorTemperature != t ) events << createEvent(name: "colorTemperature", value: t)
    logging("CT: $result.CT",99)

This is not a complete solution. I will fix it once my RGBWW light arrives.

It's clear, and I really should implement it that way, will see if I can get it right without having a proper light to test with, otherwise so in a few days.

Thanks. I should've looked a little more carefully.

Yes, I've realized since then that it doesn't handle the setting of state.colorMode correctly which causes some other problems. I assumed there may be some side effects I missed since I am not familiar with your code yet.

However, in thinking of how to fix thing, I played around with the light and Hubitat a bit more and have a few related questions that I have not yet found the answer to. Perhaps you will know, and that will influence how the driver is adjusted.

  1. Is there a way from the Hubitat Dashboard to explicitly set the #RRGGBBCWWW values? It seems to me that Hubitat is always just setting HSB, and never the RGB values directly(i.e. I didn't see setRGB ever being called)

  2. As I am sure you know, the type of light I am using actually has 2 white LEDs - one at about 2000K and one at 5000K. It blends them together to get different color temperatures. However, when setting the color temperature somewhere in the middle, Tasmota always decreases the PWM rate for those 2 lights to somewhere below 100%. It seems to just do a linear blend. However, I can make the bulb brighter by turning on both PWMs for the white LEDs to 100% by issuing a command like this:

Therefore, I think a possibly better way to set the color temperature is to have both of the LEDS at 100% in the middle color temperature (about 3500K) rather than have them both at 50%, which is how Tasmota seems to work. This will give a brighter light.

Did you ever consider adding code that allows directly setting the #RRGGBBCWWW values from Hubitat so the brightness of the bulb can be maximized? The control of Color Temperature could be directly in the driver, rather than Tasmota. Just an idea. Maybe not a good one :slight_smile:

Not sure about the Dashboard part, when I get my RGBWW light strips, I will check around... setRGB is used by the color functions, like Red, Blue and Green.

Yes, that sounds like a good way of doing it, let me see when I get my lights. Should also look more at how other drivers are doing it...

@hoi I found a good quality Tuya dimmer here in China (should be easy, but it wasn't, basically no dimmers available here, only switches). It will be shipped form the manufacturer on Thursday, so will have it here during the weekend. When I have time I'll look at these drivers again after that.

Created my first release of Sonoff RF Bridge and Tasmota + RFLink drivers. For these special drivers, please check out this thread.

Very sorry but i have a silly question. I have been flipping back & forth between many threads and tuya-convert youtube vids but i still can not find my answer.

I have been using the basic tasmota 6.5 FW on my Teckin SP10 for the last six months with the Sonoff-Tasmota ported to HE by dkkohler. Of course i used tuya-convert to do the FW upgrade on all 14 plugs that i have.

I am just getting around now to upgrading to your FW and drivers.

I understand that tasmota-hubitat.bin exceeds the 512kb size so i can not program this directly and that I need to load tasmota-minimal.bin first. If i understand correctly, this leaves enough ram in the device available so updating the flash with a larger bin file is supported.

So, my first mistake was going to the http page of my targeted plug and hitting FW upgrade and selecting the minimal FW and, well, i can't seem to get that plug back into program mode. My assumption, which i now understand was incorrect, was that the http page would still be available to do the next upgrade. (i know, i know). This device only has a single button/led on it. Right now i can turn the switch on & off, but holding the button for 4+ seconds no longer puts it into program mode.

Ok, so i had a new four pack of these things that i haven't touched yet. I updated my tuya-convert (to 2.0 i believe) and i can connect to the new one but i have not pulled the trigger yet to program it with anything because i am worried of a repeat.

Can some one please educate me on what i am missing or point me to a procedure somewhere?

The following do not address bin files larger than 512kb:

1 Like

I have not done many upgrades from 6.x using the web interface, but I can test doing so from the version you were using, send me a link to the bin and I will put it on one of my devices and then upgrade to 7.1.2.
I can say the following however, the Minimal build doesn't reset config variables, so using that for upgrading can be hit and miss from certain versions. For Tuya Convert I use the Basic version (my 7.1.2 binary), after that down to Minimal through the web interface and lastly from Minimal to tasmota-hubitat.bin.
So in short, if changing VERSIONS, best is to use Basic first, that has much higher success rate. I believe it is mentioned in the Tasmota docs as the ONLY supported upgrade path, or rather, that Minimal is NOT supported for version upgrades. I'll add that to the instructions here as well.

I has some issues originally with updating to to the 7.0 firmware and couldn't access the web interface and had to use the the fast power cycle reset the device.
This removes any setting but fixed the issue.

Hi Markus, thanks for getting back to me.

Ok so v7 basic first, then minimal, then Hubitat bin files and I should be able to do this through the http interface and not have to screw around with TuYa-convert.

I am not sure I still have the 6.5 FW that I used. I have been screwing around with my pi over the last six months and started off fresh today with a clean install before upgrading to TuYa 2.0, so I may have lost the 6.5 file.

Nice. I will try this tomorrow as well. Thanks.

If you don't have Tasmota on the device at all, you'd need to use Tuya convert to begin with, or flash through serial. If you already have Tasmota on the device, Tuya Convert can't be used for flashing/recovery.

I just ordered 1 of these to have a play. Is this similar to what you are planning to try out?

Yes, do check in the Tasmota Device List, but I believe it’s got a TuyaMCU. Just like the one I’ve ordered.
You’re the one who asked about Sonoff RF Bridge before, right? What is it that you wanted to use that for?

1 Like

I checked before my purchase and a guy on YouTube explained it supports a TuyaMCU.

I have replied back to you on the other thread given it's about the Sonoff RF Bridge. I wanted to use it for rolling out cheap RF motion sensors as opposed to move expensive Zigbee ones. Also just gives a lot more options with buttons etc too.

Hi @markus, @at9
I have successfully upgraded one of the new four pack SP10s :wink:
I first used tuya-convert on it and it was reporting Boot Version 4 ... i didn't know if this meant that i had to do a three stage upgrade to v7, but i couldn't find v5 so i attempted throwing in v7 basic ... but it wasn't connecting to my 2.4g wifi when i was entering the correct credentials. All my previous SP10s are using 2.4, but this new SP10 seems to only like my 5g network.
Anyway, i was then able to do the minimal & then the hubitat version.
Next I will start to do the side. Thank you for your help.

I still wasn't able to get the reset working on one of my older devices, but one with v7 basic installed is still functioning with my HE and the old driver but i am not able to access it's http page. Kinda weird. Anyway, progress !! i won't tell you how many hours i played on this today to get this far :slight_smile:

1 Like

That seems very odd as the chips don't support the 5g frequency.

Are all your old devices connected to your WiFi and if so can you send http commands to them?

1 Like

Glad it is mostly working, and as @at9 is saying, very strange with the 5G network part, I have not seen a chip in the ESP8266 series with 5G support, didn't know it existed. Are you SURE it is really the 5G network, or do you have a 2.4G network with the same SSID set? Many home routers do that.

As for the device that works but doesn't have a webpage, try to get status using this command:
http://[device ip]/cm?cmnd=Status%200
With password set
http://[device ip]/cm?user=admin&password=[device password]&cmnd=Status%200

If that works, you could try the Reset command described here.
Once you've read that and have decided you want to try, use an URL like the above with the reset commands, you could try eg Reset%204 or if that doesn't work Reset%202 . Read the docs first though.


Yes that’s what I remembered from a couple years ago when I was using an esp8266 with Arduino.

My 2.4 ssid is leonardo and my 5g is leonardo 5g.

But I do have the same password on both. Possible the module is getting confused.

When I tried connecting with the 2.4 ssid the device would reset and apparently try to connect but a minute later SP10 snapped back to AP mode and the ssid showed up on my phone. I repeated this three times.

When I scan for networks both ssid’s pop up. If a device can only connect to 2.4, the 5g ssid should be seen, no?

More work tomorrow. I might disable the 2.4 and see what hangs on. Thanks for the comments.