Th16 temp sensor for c-7

new to hubitat community and hubitat hubs.
looking for directions to load the temp data from a sonoff th16 to a C-7 hubitat hub.
i've been searching not able to find any codes that would work with the TH16

I have my TH16 working with Hubitat using Tasmota and specifically using this 3rd party code:

It is a little more DIY than most integrations as you have to flash the TH16 and iirc there is no OTA flashing option. So you will need a Serial Programmer and some jumper wires. But after you do that it should be smooth sailing as tasmota is great when it is up and running. One thing to note, you will lose access to the Ewelink app, but it still supports alexa and you can control from the network just by browsing to it's IP address.

This is the getting started guide for Tasmota:

It may look daunting at first but Tasmotizer (the flashing software) has come a long way and is relatively user friendly, especially when compared to the command line.

Here is a specific template for the Sonoff TH series once you have tasmota flashed:

Mods please let me know if this is not kosher and I will remove it, but the active development of Tasmota for HE is hosted somewhere else, here:


cjkeenan... i'll try those codes and drivers
I really appreciate your reply

forgot to say the TH16 is already flashed with Tasmota 9.2.0 ....the latest firmware.
I'm not able to capture the temp/humidity data to use in Hubitat Elevation as a tile or to control a pump with it.
i've tried a few device drivers and made a virtual device to make a tile on the dashboard... but not able to incorporate the temp data over to the tile.

Oh perfect the hard part is done then, just flash with Markus' Tasmota firmware and you should be ready to go. Remember you need the sensors variant of the firmware to be able to see the temp/humidity sensors.

HI cjkeenan
i'm trying to load the sensor variant of Tasmota.. for some unkown reason ... the current firmware 9.2.0 will not allow me to load the minimal bin in order to relaod the sensor firmware.
the current firmware 9.2.0 when configured to sonoff Th module (TH4) .. and using the sonoff Th template, the temp and humidity data is shown on the web GUI when logged into the sonoff
Question is: loading the sensor variant ...will that show a differnt format or display the temp/humidity differently?
i've never loaded anything other than minimal and the updated sonoff bin... so i'm not sure what to look for on the outcome of loading the sensor bin.
i'm currently at work... but will try to load the Th16 from the usb device instead of upgrading from the web GUI of the sonoff TH16 when I get home

Sorry I have not done this in a while, but all I can say is that I followed this guide and it worked:

It mentions in there something about Sonoff DIY mode and recommends never flashing a minimal binary when using it, so I wonder if that applies here. If someone has more experience I hope they can chime in, otherwise I might take this line of questions to the support thread I posted above, they are very friendly and good people.
Also, is it giving any error when trying to flash the 8.5.1 minimal?

My understanding is that the sensor variant is for HE. It actually exposes and communicates that sensor data over to HE where the base version does not.

Hi cjkeenan
i've flashed the TH16 with firmware 8.5.1 (sensor bin) installed my hub ip address in the
http hook parameters module as the Host. i have Tasmo admin manager ...discovered a parent child device ... added it the dashboard. I can see all of the parameters of the sonoff such as IP address, wifi , module ... bu no temp data.
where am I going wrong I need a different template ...i used the attribute to find the temp data but i'm not succesful. a little prodding or hand holding would help ...thank you

You may need to use a new template but before messing with that, go to the device page, does it contain all of the data which you want to show on your dashboard and is it updating properly?

FYI, I just tried putting the temperature on my dashboard with my TH16 that has a SI7021, not the water resistant probe, and it worked fine using the attribute template.

If I had to guess your issue is likely with the parent/child device architecture. When you pair your TH device, 2 children should be created, one for the internal relay, and one for the sensor. You need to reference that sensor child device as the tile device in your dashboard, not the parent and not the relay.

Hi cjkeenan
you hit the nail right on the head!
i'm not getting the 2 children that should be present as you have so graciously taken the time to troubleshoot.. "I thank you so much in advance"
those children are not present ....only 1 ...that is the child for the relay.
so that's where i'm stuck ... everything else populates and seem to be working or can be controlled when i go into the actual device and toggle the condition.
Is there something in the custom template that I need to pay attention to?.. I have GPIO 14 set to the sensor water resistant DS18B20..
A copy of my current parameters: is there anything you see that I may not have correct??

Template parameters
Name SonoffTH
Based on Sonoff TH (4)
GPIO0 Button1 (17)
GPIO1 User (255)
GPIO2 None (0)
GPIO3 User (255)
GPIO4 User (255)
GPIO5 None (0)
GPIO9 None (0)
GPIO10 None (0)
GPIO12 Relay1 (21)
GPIO13 Led1i (56)
GPIO14 DS18x20 (4)
GPIO15 None (0)
GPIO16 None (0)
ADC0 None (0)

This is the ModuleParameters:

Module parameters
Module type (Sonoff Basic)
Sonoff TH (4)
GPIO1 Serial Out None (0)
GPIO2 None (0)
GPIO3 Serial In None (0)
GPIO4 None (0)
GPIO14 Sensor DS18x20 (4)

Hopefull you can see where I've gone wrong on the setup..
Thanks for taking the time with me

hi cjkeenan
ureka!!!! it!
thank you! thank you so much !!!
how do I buy you a beer and all the other supporters and code makers

Had to download drivers.. downloaded a bunch of drivers ...don't know which one did the trick .. but it pulled the temp sensor in as a 2nd child device so now the temp is being displayed.
Humbled and grateful to you and all that helped !!!
Thank you!

1 Like