Sonoff TH – Temperature & Humidity Sensing Relay on the Cheap

I have been following the Sonoff devices ever since they released the original 10 amp 2 wire wifi relay several months back. Itead, the company behind Sonoff’s stuff, has gotten quite the reputation in the hacker community for making low cost devices that are easily updated with custom firmware. There are several Sonoff devices that I have merely taken out of the shipping box, tore open, and began to tinker with before even testing the Itead firmware. That’s how community friendly they are.

The Sonoff TH, I believe, is a great product to add temperature sensing to multiple rooms in your home. The fact that it has a low price tag makes a whole home deployment much more palatable. Other than that, how does the Sonoff TH stack up against the rest?


The TH is nearly identical to the POW and Dual on the outside. The plastic is hard and sturdy, but truthfully, the footprint is a little big for my taste. If they could have gotten the size of the device closer to that of the original Sonoff, I would be much happier. Nevertheless, for the price, I can’t be too picky and what is more important is its functionality and reliability (which I will discuss later). You have the option of getting this unit in either a 10amp or 16amp version and can bundle either a waterproof temperature sensor or a non-waterproof temperature / humidity sensor with the purchase. I’ve known many people use the former for fish tanks, pools, and hot tubs to provide a simple way to measure that environment. The sensors are also well built and provide a great addition to the functionality of the Sonoff line.

Itead opted for some push clamp wire terminals instead of the screw ones they used on the original Sonoff. These connectors have their advantages and disadvantages. They work great with solid core wire, but can sometimes be a little difficult with stranded wire. Ultimately I think I prefer the screw terminals. They sometimes require a little extra work, but are better all around.


Warning: Do not attempt to flash this unit while mains power is connected to it. Doing so can be dangerous and could cause harm to yourself and/or your property.

Flashing the Sonoff TH is very straight forward. Of course you will need an FTDI adapter to provide the flashing interface to your computer. The header is at the rear of the PCB and is clearly marked with VCC and Ground markings. GPIO 0 is connected to the push button on the board so holding it down while connecting the FTDI adapter will bring it up into flashing mode. At this point, you can run the flash.bat script provided in this zip file, input the COM port that your FTDI adapter is using, and the flashing should begin. After flashing is complete you can follow the steps provided here to connect your switch to your wifi network and to SmartThings.


I’ve carried most of the features of the original Sonoff over to this firmware and added a few extra. Most notably (of course) is the ability to hook up an external device. In addition to being able to add the two sensors mentioned above, I have added the ability to connect an external switch (momentary or toggle) to the 2.5mm port on the TH’s side.

My firmware really is intended to work with SmartThings (although it can be controlled with other systems as well). Once integrated into your SmartThings ecosystem, the switch can be configured to send temperature and humidty reports every x minutes. It also includes my standard features of auto off, static or dhcp ip address, password security for control and or configuration, factory reset, uptime reports, etc.


This is a great, sturdy relay at an amazing price. The size of the device and the clamp terminals are my only complaints, but they can easily be overlooked because of the many positives this device has. With the added ability to measure temperature or humidity, you get a lot of bang for your buck with this WiFi controlled smart home device.

Where to Buy

It just so happens that Itead is having a promotional sale on their products. Click through to this link to get some great smart home gear at up to 20 – 30 % off!


Flashing Tool & Firmware

Sonoff (Connect) SmartThings SmartApp

Sonoff TH Device Handler

2 thoughts on “Sonoff TH – Temperature & Humidity Sensing Relay on the Cheap

  1. Hi, just try the Integration into smartthings.
    Flashing the normaly wifi-Switch & intergration: works fine, great Job, thx
    Flashing the TH16 works, Integration in my Network works (Access via Webinterface). But, the intergation in smartthings doesnt work. I have published both device handlers (for the integrated Switch and the TH16). If i want to integrated the TH16, I get the errormessage :Error – bad state. unable to complete page configuration

    Any Idea´s, whats wrong?
    Michael from germany

    1. Any luck figuring this out? Are you adding the device manually through the SmartThings app or are you using the “discover” method?

Leave a Reply

Your email address will not be published. Required fields are marked *