[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)

Yes, you will need the mod firmware to get device status. There is no status update from the device using original firmware, most important to me are the voltage, power usage change.

Also, the teleperoid defines the httppush interval, range between 10 to 3600 seconds, the default value is 300. Change it to shorter interval to 10 seconds.

I hope it's alright to put this here. I kinda felt like it wouldn't be okay make a new thread for it.

This is a button controller driver for Tasmota switches(really anything with relays). I liked the ability of Zen and Inovelli switches to disable the relay and send the button presses to Hubitat, so here is something that can do the same for Tasmota stuff. It's really nice for controlling smart bulbs, or setting up a fake 3-way, etc. I made the driver as generic as possible. It'll make a child for each relay on your device. And you set how many buttons your device has in the settings.

It has single, double tap, and hold. Since Hubitat doesn't support 3x and 4x taps but Tasmota does, I mapped those to fake extra buttons. For example, lets say you have a three button device: "Button 1 - Triple Tap" will instead show up as "Button 4 - Single Tap". "Button 3 - Quad Tap" will show up as "Button 6 - Double Tap". It was the best way I could think to do it, and still keep everything generic. This works fine, but I hope Hubitat adds at least triple tap support eventually. Three taps are useful.

This driver won't work if the buttons on the device aren't attached to the ESP chip. A lot of TuyaMCU devices have the buttons wired to that chip instead. So Tasmota can't actually "see" them.

Here is the driver:
Hubitat/Tasmota Button Controller - generic switch.groovy at master · Obi2000/Hubitat (github.com)
After you add it Hubitat, add a new virtual device, set it's driver type to "Tasmota Button Controller Generic Switch". Then save and fill in your switch's IP address. If you are using a short hold trigger time, I suggest setting the option to disable device reset due to hold. But it's up to you.

The new button feature requires at least Tasmota 9.1, but Markus's firmware is still on 8.5.1. So I ported his changes to the most recent Tasmota firmware. You can download it here(Tasmota-HttpHook 9.3.1.1). Please note: If you are upgrading from Markus's firmware to this one it will reset your settings. This can't be helped, it's part of the design of Markus's firmware when changing between Tasmotas(different CFG_HOLDER if you're curious). If you get an error when flashing OTA, flash the lite version first, you can get that here.

Update: 3/23 - Added commands to better support Hubitat 2.2.6

3 Likes

Hi @Obi2000

When I flashed one of my 8.5.1 devices with your 9.3.1 firmware it did not have the HttpHook option? Am I going to the incorrect place to get it I clicked on your HttpHook 9.3.1.1 link above.

I'm at work atm. So I can't show you the exact screen. But do you have the Enable HttpHook check box checked? It's in config, other, around the MQTT enable checkbox. Then that should add the HttpHook section. It's about right here:

@Obi2000
Okay I will check but I don't think it was there, if you mouse over your link it says tasmota-9.3.1.1-pr-httphook.bin.gz is that the correct file?

I will flash it again as I went back to 8.5.1

@Obi2000

My apologies, I flashed it again and found the option to tick. I think I might have only flashed the minimal before and not the full firmware.

Thanks again.

No prob. That's good to hear! I was getting anxious to get back home to see what was up. :smiley:

Hi, I have this Sonoff Relay Channel 1, This device was never flushed with Tasmota firmware earlier.
So can I directly flush tasmota-httphook-8.5.1.bin

Thanks
Omair

I just noticed Tasmota 9.4 is out, So I put together some HttpHook versions for use with Hubitat.
Tasmota-httphook.bin,gz
Tasmota-lite.bin.gz
All the rest (Sensors,IR,RF)

Please Note:

  1. If you're installing this on a device that already has Markus' Firmware on it, your settings will be erased and will have to be re-entered. If you get an error when flashing OTA, flash the lite version first.

  2. This firmware will work with Markus' generic drivers. But Tasmota 9.1 changed the template format. And I believe if you have a specific device that Markus added separately in his driver, it tries to set it up using old style template and that won't work. So you may have some problems.

Lemme know if this is too spammy. Just thought some people might want some of the bug fixes or features from 9.4. I threw some simple drivers together here if people wanna look at them for reference on making their own drivers. Obviously Markus' are way better while they are still working.

6 Likes

Is it possible to have a version compiled with httphook and scripting? I have some Gosund dimmers that need scripting which exists in an 8.5.1 version, but without httphook. Is it possible to have both in available space?

Here you go. I compiled a version of Tasmota 9.4 HttpHook with Scripting and USE_BUTTON_EVENT enabled. You will probably have to flash Tasmota-Lite first. I don't use scripting, so I haven't tested this beyond checking that it flashed and that there was an "Edit Script" section in the console.

Hubitat/tasmota-scripting-httphook.bin.gz at master · Obi2000/Hubitat (github.com)

2 Likes

Awesome. I have never compiled tasmota firmware and was expecting a learning curve. My wife has prioritized another project so this was going to the back burner until I had time to learn. Thank you!

Uumm. I don't know if I'm looking at the wrong files but I have tried the tasmota-scripting-httphook.bin and the tasmota-scripting-httphook.bin.gz. Neither have the edit script buttons. I loaded the 9.2.0.4 that I have with scripting (but not httphook) and the option is there. Is there a console command? Am I missing something obvious? (Wouldn't be the first time)

In Tasmota 9.4 they moved the Edit Script button from
Configuration -> Edit script
to
Consoles -> Edit Script

Here is a picture of it from my device:

As I queried. Am I missing something obvious? Duh. Silly part is I did go to the console to do a reset 5 after uploading minimal, but I never looked under console after uploading to the Scripting version. Not seeing the EDIT SCRIPT button where I expected it caused a brain shutdown and I didn't perform my next (always after upload) step of going to the console and doing a reset 5. Thank you so much. No telling how many brain cells you saved me from burning. I really do appreciate it. Now I am off to go play with my script.

1 Like

Out of curiosity, what are you using the scripting for? I had a read after seeing this but can't work out what it adds on top of a Hubitat+Tasmota integration....

I have Gosund Dimmers that use Scripting. Gosund SW2 Dimmer Template for Tasmota. I believe it controls the led(s) brightness slider on the switch and its relationship to output brightness. (but don't hold me to that)
This from the Black Adder website: "Reading local dimming when set by the capacitive touch panel requires a Script-enabled build"
The httphook is what enables Hubitat integration that allows control from and reporting to Hubitat.

1 Like

Thanks, I can see how capacitative touch reading might need something far more intelligent than binary on off!

Tasmota with Scripting Update. I have successfully loaded 2 Gosund dimmers with 9.4.0 w/scripting and httphook, loaded the script from Gosund SW2 Dimmer Template for Tasmota, configured, and everything works. Local dimmer action is mirrored in HE and HE actions are mirrored on the dimmer. And the HE amazon Echo app allows dimming control via voice. How cool is this. All thanks to the many people who take the time to post to the various communities.

I think I have installed and configured T4HE correctly. However, I have a similar problem. I am getting this error when I try to add a device: Error: A device with the same device network ID exists, Please use a different DNI

Here is the debug log:
app:9772021-06-01 20:00:25.227 errorjava.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI on line 1790 (discoveredAddConfirm)

app:9772021-06-01 20:00:24.683 debugCreating Tasmota-based Wifi Device with dni: C0A8561F

app:9772021-06-01 19:59:32.006 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:59:24.805 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:59:14.819 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:59:14.813 debuggetChildDevices: []

app:9772021-06-01 19:59:04.802 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:58:54.812 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:58:44.604 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:58:38.789 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:58:38.786 debuggetChildDevices: []

app:9772021-06-01 19:58:38.771 infodeviceDiscoveryCancel()

app:9772021-06-01 19:58:38.769 debuginitializeAdditional()

app:9772021-06-01 19:58:38.768 debugParent Installed OK

app:9772021-06-01 19:58:38.766 debugBuilding mainPage

app:9772021-06-01 19:58:38.764 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:57:10.292 debuggetAppVersion() = v1.1.1.1123T

app:9772021-06-01 19:57:10.289 debuggetChildDevices: []

I don't see how another device could have the same IP or MAC and I don't understand how I could modify the DNI before the device has been added to the system.

Thank you for any assistance,
Dan