Sonoff Touch - qtoggle/espqtoggle GitHub Wiki
Device
Description
Sonoff Touch is a smart touch lightswitch.
By default, it runs Sonoff proprietary firmware.
There appears to be a large number of Sonoff Touch models with inconsistent naming. However there are some criteria that may help classifying them:
- wall switch standard:
- EU
- UK
- US
- number of channels (gangs):
- 1 channel
- 2 channels
- 3 channels
- generation:
- 1st generation (with round touch point indicators)
- 2nd generation (with square touch point indicators)
- color:
- black
- white
Configuration
Provisioning configuration names:
espqtoggle/sonoff/touch/1-channel
espqtoggle/sonoff/touch/2-channel
espqtoggle/sonoff/touch/3-channel
Flash Parameters
- flash mode: DOUT
- flash frequency: 40MHz
Pins
Number | Function | Remarks |
---|---|---|
0 | push button 1 | active low |
4 | relay 3 | active high |
5 | relay 2 | active high |
9 | push button 2 | active low |
10 | push button 3 | active low |
12 | relay 1 | active high |
13 | status LED | active low |
Ports
Id | Type | Description | Range/Unit | Remarks |
---|---|---|---|---|
push_button1 |
boolean | on/off button 1, setup button | ||
push_button2 |
boolean | on/off button 2 | only models with 2 and 3 channels | |
push_button3 |
boolean | on/off button 3 | only models with 3 channels | |
relay1 |
boolean | relay 1 | ||
relay2 |
boolean | relay 2 | only models with 2 and 3 channels | |
relay3 |
boolean | relay 3 | only models with 3 channels | |
button_held |
button_held | button held status |
Installation
Requirements
- a flat screwdriver
- a USB-to-serial adapter
- a laptop running Windows, Linux or macOS
Procedure
-
:warning: 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 using the flat screwdriver:
-
Take out the board and identify the RX, TX, GND and VCC connectors. The actual placement of the connectors will depend on the device model. The bad news is that, for some models (mostly UK and EU ones), you'll also have to identify a connection to GPIO0 on the board. The good news is that no soldering is needed.
Here are some pictures indicating the position of the 5 connectors above, on some models:
-
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. Depending on the model, there are two ways:
- pressing and holding the button closest to the four connectors (usually US ones with 2 or 3 channels)
- connecting the second GND wire of your USB-to-serial adapter to the GPIO0 connection identified above
-
Plug the USB-to-serial adapter into your laptop, effectively powering the ESP chip on the board.
-
You can now release the button or disconnect the secondary GND from GPIO0. If the led on the board is off, your board has been booted into bootloader mode.
-
Follow the flashing procedure to flash the espQToggle firmware on the ESP chip.
-
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.