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

That shouldn't be a problem, if you set Debug Mode to Insanely Verbose and get the logs which start with "result:" like "result: [POWER1:ON]" I will get it clear. Then it's a simple thing to map, do tell me how you expect this to translate to button events in HE if you have some thoughts on that?

I'm happy it worked as expected! I'm not certain how things will behave with temperature in Fahrenheit though, if there's any issue, please do tell me.

Yes, I did the convert of C to F using the direct tasmota SetOption command.

I actually didn't even look to see if any conversion code was embedded in the Hubitat driver .

Ok, if that works, let's keep it that way :slight_smile:

A little reminder to those who really want to keep their internal private IPs secret for some reason. In Hubitat, the hex values you see above "C0A8XXXX" (I removed the last 2 bytes) are actually the IP in HEX. And the other part "84F3EBXXXXXX" is the network MAC. Just friendly pointer.

THIS VERSION WORKS
@mackj12345 I've merged in Tasmota 7.2 and 8.1, I've not released binaries yet since I've not tested these new firmwares yet, at least not more than flashing them through TTL onto a device. If you want to try, the binaries will be available shortlyare available below. I would NOT recommend trying this new firmware on a device you can't easily flash through TTL.
Make SURE you follow the official migration recommendations!
Do keep in mind that there is a REQUIRED migration path when changing between Tasmota versions:

"tasmota-basic" is now "tasmota-lite" (this is the version to use for Tuya OTA etc (UNTESTED!), use minimal for upgrading over http (Partially tested but use caution!) and then install the version you want (Partially tested but use caution!).

So if anyone wants to try, keep in mind this is somewhat UNTESTED! Keep TTL flashing on standby... For TTL flashing, follow the official docs!

Tasmota for Hubitat v7.2.0 - Binary Release Here

Tasmota for Hubitat v8.1.0 - Binary Release Here

Migration Instructions

1 Like

thank you markus and i have not compiled firmware before. if you dont mind compiling them for me ill be the guinea pig with afew of my sonoff's s31's and switchs i have cause there pins for flashing are easy to access

Ok, I will compile it tomorrow, there's a bug I need to get rid of first, and now I need to sleep... 3 in the morning here...

EDIT: A working version is now available, binaries will follow shortly.

After setting Debug Mode to Insanely Verbose, when I press buttons the logs look like the following:

dev:6952020-01-10 03:53:16.244 pm debugresult: [POWER1:ON]

dev:6952020-01-10 03:53:16.242 pm debug========== Parsing Report ==========

dev:6952020-01-10 03:52:57.414 pm debugresult: [POWER2:ON]

dev:6952020-01-10 03:52:57.411 pm debug========== Parsing Report ==========

dev:6952020-01-10 03:52:54.962 pm debugresult: [POWER3:ON]

dev:6952020-01-10 03:52:54.960 pm debug========== Parsing Report ==========

dev:6952020-01-10 03:52:47.344 pm debugresult: [FriendlyName1:Kitchen Switch]

Power1 is the main relay. Power2 - Power6 are a bar of status leds on the faceplate. Right now they toggle when a button is pressed. I guess it doesn't send the actual button presses to the driver? only the relay states? That's too bad.

Maybe track when Power2 - Power6 toggle, and have that act as 5 different buttons. I can write a rule in tasmota to trigger the LEDS to change when a button is pressed or held. Something like this:

Rule1 on switch2#state=3 Do power4 TOGGLE endon

If you can find a setting in Tasmota to get the button presses to show in the Tasmota Console, then they can be made to be sent to the driver and I can parse that there. If not, then there's only the relay state. I see 6 relays and 3 switches in your template, so the relays are pushable buttons or just LEDs?

First let's see what we can get in states from this, see above. I don't have anything similar to this, so once you see your different button presses in the Tasmota Console, send me the console log and I'll sort it out from there.

Only Relay1 is an actual relay. The rest are just dimmer status LEDs. I dont need to be able to control the LEDs.

Switch1, Switch2, and Switch3 are the buttons.

So anyway, I was not able to find a setting to make Tasmota output button presses to the console. I was able to write a message to a variable using rules on button press. And that DOES display on the console. It also displays in the Insanely Verbose log. Maybe you can use that? I apologize for taking so much of your time.

WEB CONSOLE OUTPUT:

04:51:43 RUL: SWITCH1#STATE=2 performs "var1 [Switch1 Press]"
04:51:43 RSL: RESULT = {"Var1":"[Switch1 Press]"}
04:52:16 RUL: SWITCH1#STATE=2 performs "var1 [Switch1 Press]"
04:52:16 RSL: RESULT = {"Var1":"[Switch1 Press]"}
04:52:16 RUL: SWITCH2#STATE=2 performs "var1 [Switch2 Press]"
04:52:17 RSL: RESULT = {"Var1":"[Switch2 Press]"}
04:52:18 RUL: SWITCH3#STATE=2 performs "var1 [Switch3 Press]"
04:52:18 RSL: RESULT = {"Var1":"[Switch3 Press]"}
04:52:23 RUL: SWITCH1#STATE=3 performs "var1 [Switch1 Hold]"
04:52:23 RSL: RESULT = {"Var1":"[Switch1 Hold]"}
04:52:26 RUL: SWITCH2#STATE=3 performs "var1 [Switch2 Hold]"
04:52:26 RSL: RESULT = {"Var1":"[Switch2 Hold]"}
04:52:29 RUL: SWITCH3#STATE=3 performs "var1 [Switch3 Hold]"
04:52:29 RSL: RESULT = {"Var1":"[Switch3 Hold]"}

HUBITAT LOG:

dev:6952020-01-10 09:52:25.555 pm debugresult: [Var1:[Switch3 Hold]]
dev:6952020-01-10 09:52:25.552 pm debug========== Parsing Report ==========
dev:6952020-01-10 09:52:22.765 pm debugresult: [Var1:[Switch2 Hold]]
dev:6952020-01-10 09:52:22.762 pm debug========== Parsing Report ==========
dev:6952020-01-10 09:52:19.423 pm debugresult: [Var1:[Switch1 Hold]]
dev:6952020-01-10 09:52:19.420 pm debug========== Parsing Report ==========
dev:6952020-01-10 09:52:14.279 pm debugresult: [Var1:[Switch3 Press]]
dev:6952020-01-10 09:52:14.276 pm debug========== Parsing Report ==========
dev:6952020-01-10 09:52:12.897 pm debugresult: [Var1:[Switch2 Press]]
dev:6952020-01-10 09:52:12.893 pm debug========== Parsing Report ==========
dev:6952020-01-10 09:52:12.117 pm debugresult: [Var1:[Switch1 Press]]
dev:6952020-01-10 09:52:12.115 pm debug========== Parsing Report ==========

I will look at this some more later today, but for now, have you set SetOption32 correctly? There should be a HOLD action being sent...

SetOption32 was set to 15. I changed it back to the default of 40. Everything acts the same except it now takes longer for the hold action to trigger.

I think maybe the HOLD action is only sent when using MQTT. But I'm inexperienced on this stuff.

The Hubitat integration sends anything that would have been sent using MQTT... I'll see if I have a device I can test this with.

I couldn't sleep last night, so I played around with this abit. I winded up just using this rule

Rule1 on switch1#state=2 Do var1 1 endon on switch1#state=3 Do var1 4 endon on switch2#state=2 Do var1 2 endon on switch2#state=3 Do var1 5 endon on switch3#state=2 Do var1 3 endon on switch3#state=3 Do var1 6 endon

With this added to the parse() section of your Generic Switch Driver:

if (result.containsKey("Var1")) {
theButton = result.Var1
logging("Button: $result.Var1",99)
events << createEvent(name: "pushed", value: Integer.parseInt(theButton), isStateChange: true )
}

It works well enough for my use. The different states show as 6 individual buttons. And everything is pretty fast. So I think I'm gonna just go with this. Thank you very much for this awesome firmware and driver combo!

1 Like

Ok, nice you got it working, I'll add that as a "hidden feature" to the driver in the parse function of the Generic Switch Driver.

I have been playing around with capabilities in the drivers to see how they effect how an item is treated in Alexa.

In Alexa I have found that lights and switches are both treated like lights if you have a group of lights, switches and plug all associated to the same room. So if I say "Alexa, Lights on" in that room all the lights and switches go on.

If you add the capability "Outlet" to the driver the item is then seem as a plug in Alexa and is not controlled by alexa as a light, which is what I wanted.

Does it matter if the capability light is also present, or does it need to be with switch and outlet only?

I have not tried adding light as I thought it might cause issues, l will try later to confirm.

I do know that in Alexa you still have the switch that you can select it as a plug or light, which was exactly what I wanted.