-
Notifications
You must be signed in to change notification settings - Fork 2
Sonoff TH

Sonoff TH is a relay board equipped with temperature and humidity sensor.
Sonoff TH can be paired with the following sensor models:
- AMS2302 (also known as DHT22), provides temperature and humidity
- DS18B20 (also known as Dallas 1-wire sensor) provides temperature
- Si7021 provides temperature and humidity (not currently supported by espQToggle)
By default, it runs Sonoff proprietary firmware.
Provisioning configuration names:
- flash mode: DOUT
- flash frequency: 40MHz
| Number | Function | Remarks |
|---|---|---|
| 0 | push button | active low |
| 12 | relay | active high |
| 13 | status LED | active low |
| 14 | temperature/humidity sensor |
| Id | Type | Description | Range/Unit | Remarks |
|---|---|---|---|---|
push_button |
boolean | on/off button, setup button | ||
relay |
boolean | relay | ||
temperature |
number | temperature | °C | |
humidity |
number | humidity | 0..100 % | only AMS2302 model |
- a philips screwdriver
- a USB-to-serial adapter
- a laptop running Windows, Linux or macOS
-
⚠️ Do not power the device from mains! Do not connect it to AC at all during this procedure! -
Read the flashing instructions and be prepared to follow the flashing procedure.
-
Open the device by unscrewing the screws:

-
Take out the board and identify the RX, TX, GND and VCC pads:

-
Ensure the USB-to-serial adapter is not plugged into your laptop.
-
Connect the following USB-to-serial adapter wires to their corresponding connectors on the board: RX, TX, GND and VCC.
-
Ensure device will boot into bootloader mode by pressing and holding the button on the device.
-
Plug the USB-to-serial adapter into your laptop, effectively powering the ESP chip on the board.
-
You can now release the button.
-
Follow the flashing procedure to flash the espQToggle firmware on the ESP chip.
-
Disconnect all wires and reassemble the device.
You can now power your device by connecting it to mains. Follow the initial setup instructions to connect the device to Wi-Fi and add it to your qToggle system.