Sonoff TH - qtoggle/espqtoggle GitHub Wiki


Device

Description

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.

Configuration

Provisioning configuration names:

Flash Parameters

  • flash mode: DOUT
  • flash frequency: 40MHz

Pins

Number Function Remarks
0 push button active low
12 relay active high
13 status LED active low
14 temperature/humidity sensor

Ports

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

Installation

Requirements

Procedure

  1. :warning: Do not power the device from mains! Do not connect it to AC at all during this procedure!

  2. Read the flashing instructions and be prepared to follow the flashing procedure.

  3. Open the device by unscrewing the screws:

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

  5. Ensure the USB-to-serial adapter is not plugged into your laptop.

  6. Connect the following USB-to-serial adapter wires to their corresponding connectors on the board: RX, TX, GND and VCC.

  7. Ensure device will boot into bootloader mode by pressing and holding the button on the device.

  8. Plug the USB-to-serial adapter into your laptop, effectively powering the ESP chip on the board.

  9. You can now release the button.

  10. Follow the flashing procedure to flash the espQToggle firmware on the ESP chip.

  11. Disconnect all wires and reassemble the device.

Next Steps

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.