Tasmota: Sonoff T1 2 CH

Created on 23 Dec 2017  Â·  109Comments  Â·  Source: arendst/Tasmota

Dear Community,

is there a way to define the switches of the Sonoff T1 2 CH as pushbuttons?
I can only find the option to change the SwitchMode for external switches.

Would be nice if someone can help me.

Thank you!

Most helpful comment

I received a 3-gang US version direct from Sonoff China today (bought through AliExpress). Although the power wiring isn't typical for USA, it's nicely made. I was able to flash with SonOTA.exe and it seems to be working fine, connected to Home Assistant via MQTT.

The J3 connector labels are accurate (Tx and Rx are not reversed, as I've seen reported) and I can connect at 74880 baud. I haven't been able to get it into flash mode using the switch pushes on the Wiki page, and I haven't been able to figure out where GPIO0 is. Since SonOTA.exe works I'm not desperate, but if anyone has can tell me how to find GPIO0 I'll look and try to flash with a serial connection.

sonoff_t1_r2_us_touch_board_v1 0_front

sonoff_t1_r2_us_touch_board_v1 0_back

All 109 comments

you would need to change the module template to change the gpio from a button to
a switch

I dont think its supported, i started a wiki page with my findings here:
https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-T1

JimmyW, Coincidentally I got the same model of switch today and found your Wiki page. It made me worried, but my T1 2CH UK version (with RF) is working fine, so far.

Did you actually try flashing yours by bringing GPIO0 low during boot? I simply soldered a fly-lead from GND and held it to GPIO0 for a second or so after boot.

No, i did not try that yet. I am trying to figure out how the esp is controlling the relays and reading the buttons first, so i know what gpios they use. It will be hard to find out after flashing tasmota. Im completely sure i can flash it taking GPIO0 low, but then what?

I think you’re making it a lot harder for yourself. T1 2CH is already supported hardware and Tasmota knows how to do all that, so maybe you could look at the code.

I flashed mine yesterday and I verified that the ESP is properly recording the state of both relays even even when using touch controls.

I have tried flashing two 1ch t1's and while they flash fine they dont work after flashing (no wifi or manual control)
i have 1 2ch version but im not sure i want to risk that yet

Are you setting the correct parameters in the Arduino GUI as per the guide?

Getting any serial output if you boot up with the PC still connected? Just the touch board of course, not the AC part.

I can’t imagine the 1CH version is vastly different.

Ive flashed using platformio which autodetects the settings.
Will try the arduino IDE next
A serial monitor just produces 1 line of gibberish on boot/reset.

Update: i changed the baud rate to the bootloader baudrate and i now get
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x07
csum 0x07
csum err
ets_main.c

Tried Arduino IDE but cant get it to flash.
What version of Tasmota you using?

Have now tried v 5.11.1a on both 1ch versions and now my 2ch version and none work

I did some updates, and added a link to this issue from the wiki:
https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-T1

I had not have the time to test flashing the esp my self yet, but please update the wiki when its confirmed working.

Does seem strange. After some initial stability issues both of my T1 2CH are now fine. Both relays work and both buttons are responsive.

@jimmyw you obviously spent a lot of time on the Wiki page and tracing circuits etc, but you never actually tried to flash Tasmota. Why is that? As far as I can see the T1 series have been supported for a while, they are defined in the source code and the GPIO details are known.

@geekypenguin I would suggest using Arduino with v2.4.0 of the ESP8266 core and try flashing with the released version of 5.1.11. It works for me.

Arduino IDE eventually fixed it i think. was also having issues with mcafee doing a real-time scan on the compiled files.
Will try again with platformio with mcafee off tomorrow, and also test the 1 and 3 ch modules and update the wiki appropriately

@SupraJames For the simple reason that i did not find any documentation how to flash it in the wiki, and i totally missed this issue. (i found another one where it seemed not to be working) Also i tried to figure out how to put it in download mode without soldering. When i found the configuration in the source code, i already wrote the wiki page.

is there any videos showing how to set ups the 2 chanel module?

still not having any luck with the 1 ch version, now on my third.
I either get the checksum error on boot or floods of fatal exception.
Im going to try a new flashing tool when it arrives tomorrow and see if that gives me any more luck. Ive not tried the 2 ch again just in case i got lucky

I just managed to flash a 3ch T1. Everything works after boot, and I've had it running 5.10 for the last hour with no issues (well, one issue, but that's for a topic of it's own).

I soldered a wire to GPIO0 and put the other end of it into the corner input from the back of the panel, the socket where it connects to the relay board. For me this was the top-left of the socket.
After I plugged in my USB TTL cable to my laptop, I waited 3 seconds and then remove the grounding wire from the socket.
I made sure that the board type was set to esp01_1m in my platformio.ini file. I also set my monitor_baud setting to 74880 in the ini file, although I'm not sure that had any impact.

For me there was no visible indication that I was in flash mode (my switch is actually this one: https://www.amazon.com/gp/product/B075F28DKH/ which has a T1 board in it).

Got myself a new (read bought rather than home made) flashing tool and I have successfully flashed all 3 versions of the t1 (1,2 and 3 ch variants).
The only limitations I have found have been caused by a power supply issue, and the button push commands dont appear to work properly out of the box, until the module is configured as a t1.

I will update the wiki shortly with this info along with how to put it into flash mode. There is no easy way, the hidden button on the main board is just a reset button, but I used a jump wire to connect a ground pin on J2 to the IC side of R19 which was previously identified as being the GPIO-0

Good news, and echoes my experience. I'd be interested to see how you get on with the boards. I have 2 x Basic and 2 x T1, and the T1's are by far the troublemakers. They both stop responding to ping after a while and just won't connect to my old router which was going to be dedicated for this purpose.

Also my wife says she'd much prefer a physical button to press, and I kind of agree :)

the plan is to replace all switches as the hue's i have at the moment have a low WAF as they have to be done via the app, using the wall switch messes everything up.

Ive found the 1ch mode boots into flashing mode when pushing button 1 and the reset button. will double check the 2 and 3ch versions if they are the same

yep, entering flash mode can be done without modification, but the method changes based on the version.
I am focusing on getting the last of my units flashed today and will update the wiki tomorrow with my findings.
I think its safe to say tasmota support on the t1 has been proven? With the exception of the 433MHz feature. Anyone able to test this?

Have you tried OTA flashing (using Sonota)? if it works it can be a good alternative without any hardware manipulation...

From the units I have, they all came with a version of the stock FW which is not compatible with SonOTA. No hardware manipulation is required to flash the T1s, with the exception of hooking up a serial programmer, which can be done with jumpleads and no soldering etc. I am currently writing an update to the wiki which has full instructions.
_Wiki now updated_

Apologies for potentially hijacking this thread, but the following is not clear from the Wiki -

Is it possible to publish switch presses via MQTT?
Is it possible to publish switch presses via MQTT _without_ triggering the relays?
Is it possible to switch the relays via MQTT?

Thanks in advance

yes
yes
yes

lookup switchtopic for the first two, the third is the common mode of operation

On Sun, 14 Jan 2018, Matthew Harrold wrote:

Date: Sun, 14 Jan 2018 01:07:15 +0000 (UTC)
From: Matthew Harrold notifications@github.com
Reply-To: arendst/Sonoff-Tasmota
[email protected]>
To: arendst/Sonoff-Tasmota Sonoff-Tasmota@noreply.github.com
Cc: David Lang david@lang.hm, Comment comment@noreply.github.com
Subject: Re: [arendst/Sonoff-Tasmota] Sonoff T1 2 CH (#1424)

Apologies for potentially hijacking this thread, but the following is not clear from the Wiki -

Is it possible to publish switch presses via MQTT?
Is it possible to publish switch presses via MQTT _without_ triggering the relays?
Is it possible to switch the relays via MQTT?

Thanks in advance

I am reading the instructions from the wiki. Does that mean that the GPIO 0 is no longer need to be connected to ground (as mentioned in the other threads)?

@geekypenguin I am trying to flash mode using the instructions ie press down button4 and button1 a few sec after boot. The blue led shows 2 short brinks consecutively but still cannot flash. Any hints? Thanks.

Yes you no longer need to solder to gpio0 to connect to ground as it can be achieved using the mentioned combination or button presses.

Wait for the so off to boot, then hold button 1, press and release 4, count to 3 and release 1. Should now be in flash mode. The main led will be off and the LEDs behind the touch buttons will be on faintly

I'll update the wiki if it's not clear

@geekypenguin I have managed to get to the "blue tint" mode using the steps you have mentioned but still cannot flash. Are you using esptool to flash and what are the flashing parameters? The following is my flashing parameters.

esptool --port com5 --baud 115200 write_flash -fm dout -fs detect -ff 40m 0x0 sonoff.ino.bin

Thanks.

I have been using Arduino IDE to flash.
What is your output of the above? Is it showing a connection but not flashing, timing out before connecting, or flashing but then not booting?

I would recommend using the Arduino IDE if you can and compiling your own image from source, and baking in your WiFi credentials. It makes configuring a lot easier

The wiki has the parameters for using esptool as
esptool.py --port COM5 write_flash -fs 1MB -fm dout 0x0 sonoff.bin

The serial link is connected but not flashing. The behaviour is similar to the behaviour when the ESP is not put into flashing mode .

I am using prebuild bin file because the arduino compiled version is greater than 512k and caused the ESP to reboot in my sonoff touch.

I have 4 new T1s waiting to deploy to my smart home. I have an earlier batch which is able to flash via Sonota but this batch the SSID is not broadcasted. Feeling desperate now.

What does a serial monitor at 74880 baud show?

I think there is a labelling error in your diagram. the pin beside the 3v3 should be RX.

I managed to flash but the settings keep reset back to default. e.g. when I set my ssid to my home ssid, it reset back to "indebuurt1" when the ESP restart itself.

It isn't my diagram but yes, there have been discussions about the labeling and the conclusion was that it depends how your programmer is labeled. Some are labeled as to where to connect (Rx to Rx for example) and others are what they are (Rx to tx)

That is another reason to roll your own with credentials baked in. When the so off resets a few times in quick succession it resets to default configuration. It will reset frequently if powered by your programmer as they rarely have the capacity

Just to share my experience after successfully flashed 4 set of T1s.

  1. I think the diagram is not correct as the marking is on the T1 board and it should show the Pinout as shown on the board, not on the programmer pinout.
  2. Flashing the T1 only needs to press button 4 (long press ~2-3s). Pressing 1 is not required. If it doesn't go into flashing mode, do again. you should see something like when the serial port baud rate is set to 74880.

    ets Jan 8 2013,rst cause:2, boot mode:(1,6)

when this is shown, the T1 is ready to flash with the Tasmota firmware.

  1. I have the problem of flashing my own compiled version. It keeps rebooting after I have uploaded. For the pre-built firmware, using it has a chicken and egg problem. Because there is not enough power to drive the board, the setting keep reseting to default. Connecting the T1 to main while my FTDI is connected is very risky. The alternative method which I am using to prevent electrocuting myself is to setup a guest wifi "indebuurt1" at my router. I powered up the T1 and reconfigure it to my network.

Hopefully, this will help others who are planning to use T1. Really missed the sonota update method. I think iTead has stopped boardcasting the SSID. I have a new batch of S20 and POW also have the SSID hidden.

Yes, a long repeated presses does sometimes drop you into programming mode as it upsets the bootloader thinking there is a problem with the sketch so drops out to programming mode, but this is not the correct or reliable way to enter the bootloader

For some reason I am getting similar behaviour as @gheesung with my T1 2CH- where the device can be mostly configured (connected to an AP and MQTT broker) and then for no reason it will reboot and lose all of its configuration.

I am using release 5.11.1, flashed successfully with esptool.py. IP configuration is either done with SmartConfig or WifiMaanger - either way, and it will seemingly randomly reboot either mid configuration, or after a convincingly long period of communication with MQTT.

It's not a power issue, as I'm measuring the current draw through USB and the UART, and it's pulling 0.1A - 'traditional' USB is good for 0.5A

In addition, frequently after multiple resets, the Tasmota SSID stops being available, and the device has to be hard power cycled.

Plugged it into the relay board and mains, and it worked for 5 minutes. When sitting idle for a while, it beeped once, and again twice, and then reset. It toggled off relay/switch 2, and now appears to be power cycling whilst in single relay/switch mode. Button 2 is dead to the world, and button 1 is only available for short periods of time (presumably between reboot loops).

Understandably it's unusable in this state

using the 2 chanel module with mqtt i doenst have state topic only control topic, any way to have a state topic?

@kylegordon, Tasmota is not able to save the setting when it is powered by the FTDI, the firmware is reset back to the default setting which is Sonoff basic (if you use the pre-compiled bin file). I have not tried long usage and will find some time this weekend to check the stability and post my finding.

@kylegordon: when it power cycles like that it does default back to basic settings which is why it looses connection, and everything but button 1 becomes unresponsive.

Of the 15 I have flashed I had two do this to me. One was solved with by erasing the flash then a re-flash but unfortunately the other couldn't be saved. I don't think it is an issue with the tasmota firmware but the boards themselves. (Swapping the parts around, the issue follows the front board with the esp).
My only option in this case was to return it for a replacement unit.

@vMeph. Please expand on what you are meaning? What are you trying to change? Some settings can only be changed via the console (or via mqtt instructions) and not the UI.

@gheesung & @geekypenguin Thanks for the info. I'd been flashing it and configuring IP and MQTT details whilst on FTDI, and then transferring it to the mains powered unit in order to change the module configuration and test it.

Later today I'll erase it, reflash it, and then immediately do the rest of the config on the mains unit, and will report back

@gheesung @geekypenguin Can confirm, you guys are right. It will only operate in a stable fashion when attached to the mains backend. The ESP8285 board doesn't draw that much current, so it must be failing to access a chip on the relay board and then power cycling, or something.

Problem solved, though. Thank you :+1:

@geekypenguin got it to work mate :)

@geekypenguin im having a problem with the touch t1, when i touch 1 button to close then he will turn back on, or will turn the other on, what this could be, this dont happens all the time but it happens
edit:
im using with home assistant so im calling like this with mqtt light component

  • platform: mqtt
    name: "test1"
    state_topic: "stat/sonoff/POWER1"
    command_topic: "cmnd/sonoff/power1"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
    optimistic: false
  • platform: mqtt
    name: "teste2"
    state_topic: "stat/sonoff/POWER2"
    command_topic: "cmnd/sonoff/power2"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
    optimistic: false

i figuer ou the problem, its a balast light i got pulggen into the son off witch produces a eletromagnetic field that will trigger sonoff t1, i changed the light to a normal one and wotks perfect

i wasnt able yet to upload firmware with OTA, any one could give info with the required steps to be able to flash with OTA

@vMeph Flashing Via SonOTA isnt possible any more. If you are referring to flashing a new version of Tasmota over an existing one then it is the same as for any other Sonoff device

FWIW I was able to reflash tasmota over my v1.6 stock firmware last night, following the instructions on the web page (hold button 1, then button 4 for 4 secs or so, release button 1, release button 4). Hardest part was maintaining good contact with the pads, I didn't solder in any headers as not sure the clearance is there for them to be there permanently. Might look at sourcing pogo pins if need to do several.

Hi all, which is the configuration needed on the Arduino IDE? ESP8285, 74880 baud,... ?

Thanks!

See the wiki...

Hi guys. Is anyone having problems with the T1 UK 1 gang and 2 gang turning on and off randomly without being pressed. Button 1 on both variants is causing problems. Button 2 seems fine. Something appears to be setting off the capacitive button post Tasmota flash.

I have 4 of these (2 and 3 gang) deployed and have never had that happen with any version of the firmware.

@FatBeard
@SupraJames

Flash with ESP tool followed by Tasmota. 99% of the time issue is fixed.

WIKI

Thanks for the response guys. @jeylites Are you saying to flash with the esptool first and then flash tasmota over the air? Also have you had the issue i described or is esptool/tasmota just a way of fixing issues genericall?

@FatBeard

Yes Flash with ESP Tool as shown below and on the third attempt flash with Tasmota. Out of twenty eight , 3gang T1s that I flashed, only three had an issue like yours. So much so these days any new Sonoff, I clear out the flash before re flashing with Tasmota simply because I do t want to do it twice.

Over the air something I have yet to explore. All my flash has been manual. I got to learn how to do OTA at some point.

Open a command prompt and execute command
esptool.py --port COM5 erase_region 0x0F4000 0x008000
Optional Clear the complete flash with command
esptool.py --port COM5 erase_flash

@FatBeard is your UK t1 the latest version or old type. Old type meaning PSF module types...

I have both OLD and NEW, it bothers me that the back Light on the NEWER ones are dimmer than the OLDER one which makes it difficult to see the buttons at night.

Do you have similar issues?

@jeylites I seem to have the older ones with the PSF sticker/module. Didn't realise until now that there were different versions of it. See attached below.

img_0208
img_0206

Yeah, that’s the old one. Thinking of it I like the old one better for its
bright LED touch :)

I currently looking at way to crank up the brightness of the newer ones. If
any one have ideas, post it up...

On Fri, Mar 2, 2018 at 10:57 PM FatBeard notifications@github.com wrote:

@jeylites https://github.com/jeylites I seem to have the older ones
with the PSF sticker/module. Didn't realise until now that there were
different versions of it. See attached below.

[image: img_0208]
https://user-images.githubusercontent.com/4692143/36904794-979549f8-1e29-11e8-9d72-1db3c0b12d8d.jpg
[image: img_0206]
https://user-images.githubusercontent.com/4692143/36904795-97afee34-1e29-11e8-8962-c4744cc25bba.jpg

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/arendst/Sonoff-Tasmota/issues/1424#issuecomment-369942954,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIw6wLogEftzWTBp3cP1Lz5RyCJwZ-1hks5taV3NgaJpZM4RLpLp
.

>

Sent from Iphone Mobile

Have any of you tried this version of a T1 EU 2 Gang?
Can't see any holes for the pins to flash the MCU.
img_20180302_195924
img_20180302_195915
img_20180302_195939

@MTrab You will have to connect to the PSF...

Can somebody post a picture of the T1 EU 2Gang? I want to reverse engineer the board a bit and want to see the difference in the parts that are actually soldered.

Here are some high res pictures of my T1 3Gang UK
img_0743
img_0744

and a T1 1Gang EU
img_0745
img_0746

I just took pictures of my UK T1 2-gang, but then realised you said EU version. Do you still need the UK plctures?

I think the parts are the same, evening the labels. Everything is welcome! :)

Thanks!

T1 UK 2-gang

Wall part

img_4938

Note that bent header pins are added by me

img_5847

img_8633

I bought couple of EU version switches, glad i could share internals photos :)
1 button version:
t1_eu-1b_1
t1_eu-1b_2
t1_eu-1b_3

2 button version:
t1_eu-2b_1
t1_eu-2b_2
t1_eu-2b_3

Note that GPIO2 is not available there at J3 connector :(

merci! :)

My idea was that the buttons are maybe activated in the firmware via resistors and that the actual firmware is the same.

it seems like that the parts are the same for versions. Stange is that C3 is missing in the 1 gang and 2 gang version.

Maybe i will try to read the firmware from the extension chip.

Just received one Sonoff T1 R2 EU 2-gang and looks just like in @Thoom19 pics. Uploaded Tasmota and after setting SetOption13 ON everything works like a charm.

I also noticed that the 5th pin in J3 connector (with text LOG next to it) IS connected to GPIO2!
It can also be seen in pics above if you follow the traces carefully :)

How about in UK model? Is the 5th pin also connected to GPIO2 of ESP8285?
If yes, Should the GPIO2 setting be enabled in Tasmota Configuration UI?

You select the 8285 board in the Arduino GUI? Is that really giving another performance compared to selecting the 8266 board in the Arduino GUI? I ask this because I tried both and did not really experienced a difference on first glance.
(And if it has consequences, I will update the wiki)

I am selecting also 8285 in the GUI. so far everything works fine.

I got the exact one as Thoom19 sonoff T1 EU 2CH but I cannot flash it, I tried pressing button 1 and then hold reset for few seconds and then release, I can confirm that the central (wifi) led is not blinking or lights up and the two button are dimly lit, but I cannot flash it. the strange thing is that now every time I give power via the ftdi the situation is not changing. I mean that it stays like that and i have no blinking in the wifi.... any help how to flash this correctly? @kanttti @Thoom19

@kegra, did you remove it from the backplate with the relay? Your procedure sounds ok to me.

Yes I did that in the first place. but the weird thing is that if i disconnect the ftdi should the sonoff return to the previous state? i mean led in wifi blinking etc? @kanttti

@kantttiI have flashed in the past several sonoffs without any problems. to clarify something button 1 is the one on the left as we look the board with the up arrow pointing up :-) because the wiki shows only the old UK version (not the same as @Thoom19 and yours.)

Look to your flash settings? DOUT and that stuff

Updated the wiki to include the US-variant, reorder the flash instruction and added a description of the EU layout. Only doubt on whether you should advise people to use the ESP8285 board API and create a specific 8285.bin or whether they can use the ESP8266 - as mentioned in the general instructions.

@kegra I'm using Visual Studio Code and didn't make any change to the Tasmota code.`Version uploaded was 5.12.0h.
In platformio.ini I'm using all defaults

platform = espressif8266
framework = arduino
board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py

Please note that to enter flashing mode you need to (at least for 2ch model)

  1. Detach the relay board
  2. Power on the board with programming cable (3.3V)
  3. Hold down touch button 1 (the one on the left in Thoom19 picture) (I recommend to DO NOT touch with your bare fingers. Please use as example a paper between the touch "button" and finger to avoid leaving grease to the touch plate. Residue from fingers on the touch plate will generate false button presses)
  4. Press reset quickly just to reset the board
  5. Release touch button 1

After this the Wifi led will NOT be lid and the touch buttons will be lit dimly and you can upload the program.

Does somebody know in T1 1ch model, is it the middle touch plate (the only one) you need to hold to enter flash mode or do you need to short circuit some pins going to the missing leftmost touch plate?

@kanttti , thank you for giving all the details and for spending time trying to help, i have done all exactly as you say , i have now two sonoffs t1 eu 2ch at the exact same state (no wifi lit , buttons dimly lit ) tried both to reverse also trx to trx and trx to rx in case labeling was not the right no luck... Can i revert them to boot normaly ? exit flash mode ? seems that even removing power both return to the same state.

@kegra Have you tried to clean touch button 1 panel? Maybe you have left residue to the panel and for ESP it seems to be hold down all the time and it enters flash mode on every boot up?

In my T1 there was some minor residue left to the panel that caused the lights to switch on/off every minute. After cleaning the panel with a damp cloth I haven't had any issues. This residue could only be seen as a greasy fingerprint in bright light.

@kanttti I have even removed the thin plastic film that is on top to make sure no residue has been left, also this is happening to two not just one T1 both of them exact same behaviour, entered flash state, and then no matter how many time i remove power and connect power again the T1s remain in the same state.
unable to flash them , unable to go back also , this is very weird behavior.
img_8767

@kegra Use ESP tool to clear the flash followed by upload. Check wiki

On Thu, Mar 29, 2018 at 1:42 AM Ioannis notifications@github.com wrote:

I have even removed the thin plastic film that is on top to make sure no
residue has been left, also this is happening to two not just one T1 both
of them exact same behaviour, entered flash state, and then no matter how
many time i remove power and connect power again the T1s remain in the same
state.
unable to flash them , unable to go back also , this is very weird
behavior.
[image: img_8767]
https://user-images.githubusercontent.com/8533178/38046446-66d4d2ee-32c8-11e8-8872-0999532d0221.JPG

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/arendst/Sonoff-Tasmota/issues/1424#issuecomment-376973609,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIw6wAw7OibDcOnYf1ZGtR0IZNQUWfi3ks5ti8uGgaJpZM4RLpLp
.

>

Sent from Iphone Mobile

@jeylites @kanttti , thank you for the suggestion , esptools same as platformio cannot connect to T1.
failed to connect to espressif , seems like the T1 is not in flash mode even thought visualy seems so... but i have no clue how to exit that state i have tried everything...

Have you tried manually jumpering gpio0 to groubd when you power on the sonoff? This is the hard way to enter flashing mode bypassing all the push buttons etc?

What does a serial output of the bootloader (74500 baud) show when you power on the sonoff? If you're not getting an output try reversing tx and rx

When you power on the board normally (no flashing mode), the GPIO0 should be high (around 3V). Touching the touch panel should pull it low. You should be able to see this transition with a normal multimeter.

3.3V should be found in the via pointed in picture below.

As geekypenguin said. Try to pull down GPIO0 manually from R19 to ground. This way you can pull down first, then connect power.

Is your usb-ttl board still working with other esp boards?

cbd29428-d126-4daa-aa8f-7cdc8b09ba5d

@kanttti thank you for the detailed instructions I will try this, tomorrow because i have no soldering or multimeter here , need to go to a friend for that, my FTDI works perfectly I just flashed a sonoff basic just to make sure that this was not the problem. Its very weird for me that the T1 keeps that state (as in the photo i uploaded during power on /off) also in that state pressing reset just turn off all lights and nothing else happens.

Check them out our.of the bootloader serial console if you can't get the gpio0 method working until tomorrow.that will tell you if there is a problem with the bootloader (likely a dead board) or if it's just a software/flashing problem.
If the software is missing or corrupted after a failed flash, then it will boot to bootloader every time regardless, which could explain the symptoms you see

@geekypenguin i connected ground to R19 as @kanttti showed before connecting the usb , connected and nothing changed , T1 at the state i show in the picture few posts above and esptools and platformio cannot upload or erase the flash , same exact ftdi usb pc platfrom that few minutes ago flashed a sonoff basic. out of options and luck , with two "bricked T1" i have a 3rd but really i am afraid i will turn that to a zombie too....

Ok, it's very unlikely that you have bricked them completely.
What does the serial console show when you connect the ftdi? If the symptoms don't change when connecting gpio0 to ground then it's deffinatley not booting to flash and is stuck at the bootloader, but without seeing the serial console I can't say what state the bootloader is in

@geekypenguin i get this when i give power to t1

Exception in thread rx:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(self.__args, *self.__kwargs)
File "/Users/kegra/.platformio/penv/lib/python2.7/site-packages/serial/tools/miniterm.py", line 445, in reader
data = self.serial.read(self.serial.in_waiting or 1)
File "/Users/kegra/.platformio/penv/lib/python2.7/site-packages/serial/serialposix.py", line 509, in read
raise SerialException('read failed: {}'.format(e))
SerialException: read failed: [Errno 6] Device not configured

@geekypenguin one quick press in the reset button gives me this to the serial console

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

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x07
csum 0x07
csum err
ets_main.c

Ok so the first bit is platformio failing to communicate with the programmer/esp.
The second bit is the important stuff, that's the bootloader output. This is showing that you are communicating with the esp correctly.
Rst cause 2 is saying the device has reset because you pushed the reset button, and bootmode 3 is booting from flash.
So the good news there is your device isn't broken, it just has a corrupted flash (hence checksum error).

If, after getting that printout, you go through the enter flashing mode process (any method) you should see the bootmode change to 2, indicating you have entered flashing mode. If it doesn't then there is something wrong with how you are entering flash mode. Having the serial console attached is the best way to determine if you are in flash mode (far more reliable than LEDs being off/on)

Once you have confirmed in flash mode from the console, try flashing tasmota again and see if you have any luck.

I've not re-read the whole thread, just dip in when I can, but if it still doesn't work then have you tried using esptool to clear the flash then flashing with Arduino IDE?

I had lots of problems flashing 20+ t1s of different flavours and i only have one truly dead one (and even that was a power supply issue rather than flashing) so I've picked up quite a lot of tips and tricks along the way, most of which I used to write the wiki

@geekypenguin thank you for giving me hope! tried this again after pressing the reset button but failed, I will try one more. Hope this thread will help many others. (have tried the esptools flash clear process with no luck too).

Seems that SonOTA works again with Sonoff firmware v2.0.1.

issacg: no issues at all, kcsj17: no issues except it took a while (20mins at least) for the FinalStage SSID to appear, flochocinco: OK but without option ("-s" doesn't work). no lines when finished

is it possible to publish switch presses via MQTT without triggering the relay and how i have to configure it? I want to switch some Phillips hue light without turning them completely off with the relay. Hope someone can help me out.

@atriOo I think you should be able to do that with one of the SetOption commands. https://github.com/arendst/Sonoff-Tasmota/wiki/Commands

I don't fully understand it yet, but I also want similar behaviour. I want it to turn on if off, and stay on even if pressed again. I know Tasmota can decouple the button from relay, but I'm not sure if it can do that kind of behaviour (which I consider crucial for a switch controlling a smart bulb)

@atriOo what you need to do it define one of the touch buttons as a Switch, rather than a Key. So in sonoff_template.h find your model (Sonoff T1 2CH) and change GPIO_KEY1 or GPIO_KEY2 to GPIO_SWT1 or GPIO_SWT2 and recompile.

You can then use SwitchMode and SwitchTopic to set the behaviour of that switch.

I have one 2CH unit where button 1 is a regular key and toggles relay 1, but button 2 is defined as a Switch, and simple fires an MQTT message (switchTopic) when it's pressed.

You need some 'middleware' like a python script, or HomeAssistant (what I use) to interpret that MQTT message and do something with it.

ah okay. Thanks. i'm still waiting for my Sonoff T1 and hope the OTA firmware flash is as easy as the other Sonoff devices. Firmware is compiled and everything should be ready... hopefully xD

one question: is it possible to configure the T1 to act as a normal light switch when there is no wifi connection and , to act in different mode ( controlled by mqtt ) when it is connected to the broker ?, tks

I received a 3-gang US version direct from Sonoff China today (bought through AliExpress). Although the power wiring isn't typical for USA, it's nicely made. I was able to flash with SonOTA.exe and it seems to be working fine, connected to Home Assistant via MQTT.

The J3 connector labels are accurate (Tx and Rx are not reversed, as I've seen reported) and I can connect at 74880 baud. I haven't been able to get it into flash mode using the switch pushes on the Wiki page, and I haven't been able to figure out where GPIO0 is. Since SonOTA.exe works I'm not desperate, but if anyone has can tell me how to find GPIO0 I'll look and try to flash with a serial connection.

sonoff_t1_r2_us_touch_board_v1 0_front

sonoff_t1_r2_us_touch_board_v1 0_back

I have flashed the 3-gang US version (as photographed by meneelyt) successfully with Tasmota 5.13.1
The T1 R2 US TOUCH BOARD V1.0 enters flash mode by touching pad P3 while pressing switch S1. This may require multiple presses but it does work and will flash with 1M (NO SPIFFS). Good luck.

@atriOo Set the ButtonTopic to something other than the normal topic and a button press will just send an MQTT message but not toggle the relay. Search for ButtonTopic on this Wiki Page. This worked for me with recent EU version and the newest Tasmota release. There is no need to change the source code.

@meneelyt Can you explain how you do it to install Tasmota with Sonota.exe? I try but I just can't.
I have Sonoff touch and on them I can install with Sonota.exe but not on Sonoff t1 us.

@kegra Did you get rid of these strange button behavior with the tips @kanttti suggested?

I also have an T1 R2 2CH and button1 occasionally turns on and off. The log shows that the button was directly pressed (so not triggered by MQTT or whatsoever). I also removed the plastic film, but nothing changed. Button2 works fine.
I've run out of ideas.

Turns out, it was just this known issue: https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-T1-UK-and-T1-EU#known-issues-please-read

@meneelyt @PiOver2

Please help us by providing specific instructions. Mine is a 1 gang T1 US R2 version 1.8.1 firmware. I held the only button for 7 secs, release, and hold for another 7 secs. The light will blink continuously and broadcast the ITEAD SSID. Then I tried Sonota but then after I connected to the ITEAD SSID and reconnected to my own router's SSID (I think Stage 2), then the T1 fails to connect to my PC "Server". The led flashes 2 times and pause...2 times and pause etc.

Please help!

@tosie can you clarify if is possible to set button topic to only one button? Seems like the option turns all three buttons into toggles. If is not possible with the console is the only option then the one described by @SupraJames?

I have two T1 2CH EU lying around. As I currently don't have any use for them switching the built-in relays, I thought about using them as nicely looking remote switches indepedendently.

After taking off the front plate and PCB it should be as simple as powering the chip with 3V3 via J1/J3 or with 5V via J2 with a regular USB charger, and somehow tape it to wherever I want it to be. Connection of the buttons to some logic will happen via NodeRed. Just need to find a good connection for the wiring (would prefer J2 for that reason) and a back plate.

Do you see any issues with that setup being run permanently?

hello to the community,

I got yesterday the T1 shown in the picture and i want to flash it, can someone tell me how to put it in flash mode? Pins are 3.3V Rx Tx GND starting from the square one correct? Which one is the GPIO0? i read something about reset button and touch button but i do not have reset button. baudrate should be set to 74480 and the latest sonoff.bin firmware it will work? Thanks for your time.

20180823_005957
20180823_010016

Hi,

Closing this issue as it is too long to follow. Please, if you have an issue, open a new one with the troubleshooting template completed in order to help you properly.

Thanks a lot for everyone sharing it experiences.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Clooney82 picture Clooney82  Â·  123Comments

rasti70 picture rasti70  Â·  125Comments

sleezy100 picture sleezy100  Â·  373Comments

Bloodyagent picture Bloodyagent  Â·  323Comments

bloodhound83 picture bloodhound83  Â·  262Comments