Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›IoT & Wireless
  4. ›Sonoff TH10, TH16 and THR320D

Component guide · Beginner · 3 min read

Sonoff TH10, TH16 and THR320D

Temperature and Humidity Switch Setup

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhat the Sonoff TH isSonoff TH pinoutWiring the Sonoff THExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

Sonoff TH switches are Wi-Fi relays with a jack for a temperature or humidity sensor, so they can run a heater, fan, dehumidifier, aquarium heater or incubator by reading, not just by schedule. The TH10 and TH16 switch 10 and 16 A; the THR320D Elite switches 20 A and has an LCD. Set limits in the eWeLink app, or run ESPHome or Tasmota for Home Assistant.

Key specs at a glance

Load
TH10 10 A, TH16 16 A, THR320D 20 A at 100 to 240 V AC
Sensors
Sonoff THS01 (temperature and humidity), DS18B20 waterproof probe (temperature), and others by model
Sensor jack
2.5 mm jack (TH10/TH16), RJ9 (THR320D and newer sensors)
Chip
ESP8266 (TH10, TH16), ESP32 (THR320D)
Display
LCD on THR320D
Modes
Thermostat and humidistat rules in the app or firmware
!Safety: Mains voltage can kill

This part is often wired to 230 V mains. Do all wiring with the plug pulled out, keep mains wires inside a closed box with strain relief, add a fuse, and never touch the board while it is plugged in. If you are new to mains wiring, have an electrician check it before you switch on.

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Sonoff TH16A Temperature Humidity WiFi Smart Switch₹936
  • Option 2Sonoff TH10 Smart Temperature & Humidity Switch₹875
  • Option 3Sonoff THR320D Elite Smart Temperature Humidity Monitoring Switch₹2,709
01

What the Sonoff TH is

Typical uses: keep a geyser or room heater between two temperatures, run an exhaust fan when humidity rises, or control a brooder lamp. The thermostat rule switches on below the low limit and off above the high limit, which avoids rapid cycling.

Check sensor compatibility: the older 2.5 mm jack sensors fit the TH10 and TH16, and the RJ9 sensors fit the THR320D.

02

Sonoff TH pinout

The pins on the Sonoff TH and what each one does.

PinFunction
L in / N inMains supply
L out / N outLoad
Sensor jackTHS01 or DS18B20 probe
ButtonPair and toggle
PinFunction
L in / N in
Mains supply
L out / N out
Load
Sensor jack
THS01 or DS18B20 probe
Button
Pair and toggle
03

Wiring the Sonoff TH

Mains wiring must be done with the power off, in a proper enclosure, with cable and a fuse or MCB rated for the load. If you are not sure, have a qualified electrician install it. Place the sensor where it reads the controlled space, not next to the heater itself.

Sonoff TH pinTH10 / TH16THR320D
L in / N inSupply through MCBSupply through MCB
L out / N outHeater or fanHeater or fan
Sensor2.5 mm jack sensorRJ9 sensor
L in / N in
TH10 / TH16:
Supply through MCB
THR320D:
Supply through MCB
L out / N out
TH10 / TH16:
Heater or fan
THR320D:
Heater or fan
Sensor
TH10 / TH16:
2.5 mm jack sensor
THR320D:
RJ9 sensor
04

Example code

Pins are for the TH16; the THR320D differs. Minimum run and off times protect the relay and the load from rapid switching.

ESPHome thermostat for a TH16 with a DS18B20 probe · yaml
one_wire:
  - platform: gpio
    pin: GPIO14
sensor:
  - platform: dallas_temp
    id: temp
    name: "Temperature"
switch:
  - platform: gpio
    pin: GPIO12
    id: relay
    name: "Heater"
climate:
  - platform: thermostat
    name: "Heater control"
    sensor: temp
    min_heating_off_time: 60s
    min_heating_run_time: 60s
    min_idle_time: 30s
    heat_action: [switch.turn_on: relay]
    idle_action: [switch.turn_off: relay]
    default_preset: Home
    preset:
      - name: Home
        default_target_temperature_low: 24
05

Setup and tuning

eWeLink

add a scene: if temperature below X, turn on; if above Y, turn off.

Hysteresis

leave at least 1 to 2 C between on and off limits.

Sensor cable

extension cables are available; keep the jack dry.

Heaters

a 2 kW heater draws about 9 A, fine on a TH16.

06

What you need

Shop this list6 of 7 found in our store · ₹28,186

  • Sonoff TH16A Temperature Humidity WiFi Smart Switch: the part this guide coversSonoff TH16A Temperature Humidity WiFi Smart Switch₹936
  • Sonoff TH10 Smart Temperature & Humidity Switch: another version this guide coversSonoff TH10 Smart Temperature & Humidity Switch₹875
  • Sonoff THR320D Elite Smart Temperature Humidity Monitoring Switch: another version this guide coversSonoff THR320D Elite Smart Temperature Humidity Monitoring Switch₹2,709
  • Home Assistant Green smart home hub: to control the switches locallyHome Assistant Green Smart Home Hub₹23,149
  • DS18B20 waterproof temperature probe: a probe for liquids or outdoors (with a TH-compatible plug or for ESPHome)Sonoff DS18B20 Waterproof Temperature Sensor Probe w/ 1m Cable – 1-Wire Interface₹340Closest match, check the specs
  • Fuse holder: to fuse the switched circuitFind this part
  • Digital multimeter: to check supply and signal voltagesDigital Multimeter₹177
07

Alternatives and when to choose them

  • ✓DS18B20 temperature sensor: the probe used for temperature.
  • ✓Sonoff BASIC and MINI: switches without a sensor input.
  • ✓Sonoff, Tasmota and ESPHome: open firmware.
08

Common mistakes to avoid

  • !Buying a sensor with the wrong jack for the model.
  • !Setting on and off limits too close together.
  • !Placing the sensor next to the heater.
  • !Overloading the relay with a large heater.
09

Frequently asked questions

Which sensor do I need?

THS01 for temperature and humidity, or a DS18B20 probe for temperature only; match the jack to your model.

Can it control an AC?

It can switch power, but an AC's own thermostat is better; use an IR blaster instead.

Does it work without internet?

Local rules work on newer firmware; ESPHome or Tasmota run fully offline.

Can I use it for an incubator?

Yes, with a probe and tight limits; add an independent over-temperature cut-out.

TH16 or THR320D?

THR320D for 20 A and a display; TH16 for lower cost.

Parts for this guide

  • Sonoff TH16A Temperature Humidity WiFi Smart Switch
    ₹936View
  • Sonoff TH10 Smart Temperature & Humidity Switch
    ₹875View
  • Sonoff THR320D Elite Smart Temperature Humidity Monitoring Switch
    ₹2,709View
  • Home Assistant Green Smart Home Hub
    ₹23,149View
  • DS18B20 Waterproof Temperature Sensor Probe w/ 1.8m Cable – 1-Wire Digital Interface
    ₹1,679View
  • Fuse Holder (Panel, PCB and HRC)
    ₹105View
  • Digital Multimeter
    ₹177View
Shop Smart Home Switches, Relays & Energy Meters

Projects that use it

Put this into practice: 154 step-by-step builds in our project library use parts from this guide.

Beginner · 1 hourFreezer temperature alarmView projectIntermediate · 2 hoursAquarium heater controllerView projectBeginner · 45 minutesBig-digit room thermometerView project
Browse all 154 projects

Keep learning

Component guideBeginnerDS18B20 Waterproof Temperature SensorThe DS18B20 is a digital temperature sensor that talks over a single data wire called 1-Wire.3 min read · SensorsHow-toIntermediateWi-Fi Smart Switches and RelaysSmart switches are Wi-Fi relays that turn lights and appliances on and off.3 min read · IoT & WirelessConcept explainerIntermediateMQTT and Home Assistant for ESP32MQTT is a lightweight messaging system: devices publish messages to named topics on a broker, and anything subscribed to that topic receives them.3 min read · IoT & Wireless

Sources

  • Sonoff TH10/TH16 and THR320D user manuals
  • ESPHome thermostat documentation

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Sonoff TH isSonoff TH pinoutWiring the Sonoff THExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide3 items · ₹24,262

Sonoff TH16A Temperature Humidity WiFi Smart Switch · Home Assistant Green Smart Home Hub · Digital Multimeter

Ask the Community

Ask a question