[Release] Tasmota Sonoff Hubitat Driver & Device Support

From what I can tell, you need to know the GPIO layout of the power monitor circuit. None of my devices have this, not have I been able to guess the layout successfully. Here are a handful of devices that supposedly have the layouts figured out (these are US plugs only).

Tekin SP20: Amazon.com: SP20
40 for 4, 2 for 21

NX-SM800: Apromio NX-SM800 Wi-Fi Enabled Outlet Work with Amazon Alexa Google Home Oval 2 Packs Smart Plug, White 16A
2 for 22


2 for 12.99

ZooZee SA102

2 for 18

Ok, I'll have a look when mine arrive, until now all my plugs and wall sockets are Zigbee devices. Just using Sonoff Minis, PowR2s and Tuya touch wall switches with Tasmota. Also now adding some IR and RF modules running Tasmota as soon as I have decoded the IR and RF protocols used. But I do like running Tasmota in my devices, so if I can find nice Tuya based plugs and wall sockets, I may very well use those.

Do you have the .bin file for the latest Tasmota/HE version you can share? I'd like to use it with your energy monitor driver to see if I can get it to work with this flashed plug.

EDIT: I have tried some other drivers but it stops refreshing or I get errors in the HE logs so I am looking around to see if I can find something to make it work.

1 Like

I will try to find some time this weekend to release a binary version, will have to merge in all changes from the original Tasmota first.
I have some different WiFi plugs with energy monitoring that will be delivered within the next few days (the first I ordered turned out to be Broadlink based, I have no time to write everything from scratch for those...), will test it on the new ESP8266 based ones arriving soon.


Thank you mate I really appreciate it.

I created a new thread for this release to keep them separate since many people still use the 6.7.1 version.

1 Like

Some cheap plugs that support power monitoring popped up on my radar today Tasmota plugs w/ energy monitoring

Hello, two weeks ago I asked this question but no one replied. I'm using several basics and minis, but got tons of log lines every few minutes from them. So far, I disabled them in their Hubitat device pages and in their own web sites, but I still get lots of them.
Is there a way to completely disable logs?

Thank you.

This depends on the drivers you are using, for questions like this, much more detail is needed for a better reply. However, the ones I have published for the 7.x firmware have a setting which makes them almost silent. Have a look in this thread. The Basic R3 drivers should work, but if they don't, they would just need some minor adjustments.

It is totally dependent on what driver you are using. I would not recommend using a driver that is paired to another firmware unless you are 100% sure it will work. In general, only use the driver that was designed for your firmware unless the developer has said it's okay (i.e. if they wrote both drivers).

If the firmware is the 6.7.1 released by @ericm or my 7.x firmware, my drivers will most likely work for those models. I’ve only tested them recently with 7.x, but there are no changes affecting thise particular type of devices in the communication with Hubitat.

NOW it's safe. :slight_smile: I've just seen so many people grab a driver from one post and expect it to work with firmware from another.

I have received my plugs and written drivers for them. Had to first figure out which chips were used and to which pins they went. A multimeter and reading on the chips was all I needed. If you figure out the pins a driver is quick and easy. In fact, my currently released drivers with a device Template with the correct pins should be all that is needed. Though I’d be happy to generate a driver if you have the template.

Which plugs? Can you link to them?

If they take Tasmota, they are ESP8266. I mean, what else does Tasmota work with? If they don't how will you flash the firmware to them? I'm a little confused by what you're saying. You just can't write a driver and have that work with any wifi plug out there.

I live in China and got these off Taobao, can't find them outside of China. They are Tuya based, I've not seen any similar to them in the device list for Tasmota. This is why I had to trace down which pins the HLW8012 chip and the LEDs were connected to. I find the easiest way to do so is by getting the specs of the chip, figuring out which pin(s) are used to communicate with it and then trace those pins back to the pins on the ESP8266 MCU.

See above for the chip-part. When it comes to Tasmota based devices, writing drivers which can handle all devices Tasmota can handle, is not at all difficult.
For example, at the moment any Wifi plug used for Energy Monitoring running the 6.7.1 or 7.x Tasmota firmware with Hubitat support really only need to make sure the correct Template is applied as well as possibly some other settings in Tasmota. I can add this template to the driver and generate a driver which automatically applies that Template. In fact, the driver I have already released allows you to paste in your own Template in Preferences to override the one used by the driver.
When it comes to other capabilities, such as temperature and humidity reading and other sensor data, that is only a matter of adding parsers and attributes for the data sent by Tasmota. A debug log using my EM Plug driver showing both manual and automatic updates from such a device is really all that is needed, as long as the correct Template and settings are applied to the Tasmota-based device to begin with.
If you would talk about writing drivers for any Wifi plug out there running any firmware, yes, that would be complicated and take a lot of time.

1 Like

I'm sorry but I still don't understand why you have to look at what chip the plug is using. They are all using ESP8266 of your can't use TASMOTA. Correct?

Oh this is cool. After looking at your drivers I get it. If I already know the template names, will your connect app find sonoff devices and allow you to apply templates to generic devices without having to create a new driver in Hubitat?

The main chip (MCU) is the ESP8266, many devices have secondary chips for things such as Temperature reading, Energy Monitoring, or even to turn on and off the relays and receive button presses (such as many of the Tuya wall switches). These are the chips you must know to which pins they are connected. Tasmota handles the communication with these secondary chips. Same goes for any LEDs and buttons on the devices, those you also need to know where they are connected to.

1 Like