Sonoff T1 UK and T1 EU - pauloromeira/Sonoff-Tasmota GitHub Wiki

Known issues, please read

  • Tasmota firmware has functionality to perform special actions on multiple quick button presses and long press
    • This will cause the T1 board to reset if relay board is not connected, because long press on button 1 will be detected
    • These special functions probably do not make sense for a wall switch
    • To disable, use command setoption13 1
  • If powered only with 3.3 V from debug connector long press will be detected by Tasmota on button 1
  • If powered only with 3.3 V from debug connected RF functions do not work

Sonoff T1 UK

The Sonoff T1 UK with 1 to 3 gang is fully supported by Tasmota starting with version 5.6.1.

See below for verified way of flashing.

Sonoff T1 EU

The Sonoff T1 EU with 1 to 3 gang is fully supported by Tasmota starting with version 5.6.1.

See below for verified way of flashing.

Sonoff T1 US

The Sonoff T1 US with 1 to 3 gang was launched March 2018. Support is not known.

State of implementation

** Follow support progress in this issue: https://github.com/arendst/Sonoff-Tasmota/issues/1424

Sonoff T1 Image

Sonoff-T1 seems to be an evolution of Sonoff-Touch, and exists in one, two or three button variations and contains a 433MHz radio.

Sonoff Touch is also based on the ESP8285, But are using a Silabs EFM8BB1 microcontroller to extend the number of IO:s needed to control 3 buttons, with separate relays and leds together with the radio. SYN470R is used as 433Mhz Radio, and chip for touch is unlabeled

EFM8BB1 Data Sheet

ESP8385 Data Sheet

SYN470R Data Sheet

Serial Connection

Connections

There is 3 connectors available on the top board J1 to J3. J1 is tied to EFM8BB1:

  1. VDD
  2. DATA
  3. CLOCK
  4. GND

J2 goes to the relay board (Pins counted cw):

  1. Relay 3
  2. Relay 1
  3. GND
  4. +5V
  5. +5V
  6. GND
  7. Relay 2
  8. Some kind of relay feedback.

J3 is a serial pinout, with the same pins as sonoff basic:

  1. VDD
  2. RX
  3. TX
  4. GND
  5. GPIO02

With standard firmware, i get a short print out with an non-standard board rate: 74 880bps (esp8285 bootloader bitrate)

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0
tail 8
chksum 0xd8
csum 0xd8

2nd boot version : 1.6
  SPI Speed      : 40MHz
  SPI Mode       : DOUT
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rf cal sector: 251
rf[112]▒ector: 251@ 10008Mbit(512KB+512KB) mode:(3,7)

The board is normally powered by the relay board with 5V. When 3.3 volts get applied to the board over J1 or J3 the AMS1117 "leaks" ~2.7V reverse to the LEDs of the touch buttons. This causes them to dimm.

Flashing

The following board layouts are from the 3 variants of the Sonoff T1 UK variant and are marked Sonoff T1 R2 UK Touch Board, Ver 1.0. These are the currently supplied versions shipping with firmware version 1.6.2.
This version of the stock firmware makes them unsuitable for flashing with SonOTA which only works on versions up to 1.6. Version 1.6 onwards removed the broadcast WiFi network for configuration. Seems that SonOTA works again with Sonoff firmware v2.0.1 but this need to be checked.

For the Sonoff T1 R2 EU version when pointing the arrow up and the reset button above the touch buttons, the most left touch button is 1, and the needed pins are at the right.

img_20180113_094236

Preparation
The front circuit board should be disconnected from the rear relay board to prevent power draw upsetting the flashing process. The unit must be powered up before attempting to enter programming mode. If touch button 1 is held while power is connected, the ESP will not go into programming mode. The touch IC does not have time to recognise the key-press before the ESP boots.

Entering Flashing mode varies between the 1 2 and 3 channel versions. See the above picture for button nomenclature used. (The variations between the 3 versions appear to be managed by the touch IC rather than in the ESP).
To enter flashing mode the unit should be powered and connected to the programmer of choice. Touch Button 1 should then be held while the reset button (4) is pressed. This will cause the unit to reboot into flash mode. This is confirmed on a serial console (74880 baud) by the boot mode displaying (1,x) indicating that we are booted to the bootloader and not the flash. Button 1 can then be released. You can also confirm booted to flash without a serial console, the main led should be off and the backlight LEDs lit dimly. There is no longer a need to solder anything to GPIO0 or to ground it while powering up, like previously believed. This step is replaced by the above button sequence.

The board contains a ESP8285 - which is an ESP8266 with built-in 1M bytes of SPI Flash. Tasmota can be flashed and configured as usual. Both firmware based on ESP8285 or ESP8266 seems to function. The module type will need to be configured to a T1 1/2/3CH.

DO NOT attempt to power the device from your programmer when connected to the relay board. This draws too much power and will cause the ESP to reboot frequently and will reset all the configured settings.

Quick config

After flashing and communication setup you might want to execute command SetOption13 1 to configure the touch switches to only allow a single tap for quick response.

433MHz remote

The Tasmota firmware is compatible with the RF remote feature built in to the T1 modules. Pairing a new remote is the same procedure as a stock Sonoff, I.E. hold the desired button on your sonoff until you are given 1 beep (approx 7 seconds), press the button on your RF remote. The Sonoff will beep to confirm the pairing. To unpair a remote, press until you are given 2 beeps, press the button on your RF remote. The Sonoff will beep to confirm the unpairing.

Circuit

I tried to reverse engineer the circuit and I noticed:

ESP8285


GPIO0 EFM8BB1 P1,3 (Goes low when first touch button is pressed)
GPIO04 is connected to the small (soft) reset button on the front.
GPIO09 EFM8BB1 P1,4
GPIO10 EFM8BB1 P1,5
GPIO13 is connected to status LED D3.

On the EFM8BB1 (QFN20 package)

P0,0 Relay 1
P0,1 Relay 2
P0,2 Relay 3
P0,3 Button 1
P0,4 Button 2
P0,5 Button 3
P0,6 SYN470R Data Out
P0,7 Relay protection?
P1,0 Led button 1
P1,1 Led button 2
P1,2 Led button 3
P1,3 ESP8285 GPIO0
P1,4 ESP8285 GPIO09
P1,5 ESP8285 GPIO10
P1,6 ESP8285 EXT_RSTB (RESET)

Known so far

  • It seems that the state of the 3 relays are saved inside the EFM8BB1, and not inside the ESP8285.
  • When pushing a button, the touch chip lift the power high to the EFM8BB1, and the EFM8BB1 chip ties the signal line for each button low, for the full duration of the keypress. There is no serial data, that i have seen at all.
  • 433MHz remotes are compatible with the Tasmota firmware
  • DO NOT attempt to power the device from your programmer when connected to the relay board. This draws too much power and will cause the ESP to reboot frequently and will reset all the configured settings.

Unknown so far

  • How does the ESP8285 change and read the the state inside EFM8BB1. We only know that the ESP8285 can read if button is pressed or not, but now how the ESP8285 changes or reads the state.

New model, PCB looks like https://photos.google.com/share/AF1QipM1zLb_7_2SkFFfRWgVAL75VhNBYn3hvkkeMLeLkXOfQvsnIUuK9D5nzLNwrKg-Gw/photo/AF1QipMuZaw48dtqAuP1Ibk1dVZfBIwMPFnkN3kjNseb?key=UWsyS3VrZHBpaldyUnl3Zmh0c2hqNDRmM2wyaDRB

Looks like the programming headers are top right