Broken my Sonoff Basic switch by trying to hold it down once to often

2,987 views
Skip to first unread message

Duncan Smith

unread,
Jul 1, 2018, 9:52:55 AM7/1/18
to SonoffUsers
Hi all,

I am looking for a way to put my Sonoff Basic into programming mode with a broken button switch.

I broke it when trying for the 50th time to flash it with a cheap fake RTL device (since bought a pucker one with no issues).

It is still working and will connect to eWeLink if I wanted it to (which I don't). Shall I bin it?

Or is there a way of shorting something to emulate switch being pushed?

Just wondering if I can salvage it and put Tasmota on it, preferably without having to solder anything.

George Ioakimedes

unread,
Jul 1, 2018, 12:07:21 PM7/1/18
to SonoffUsers
The switch is just a device to electrically connect 2 points in a circuit. To simulate the switch you can take a piece of wire and touch it across the 2 legs on the same side of the switch. Most switches like the one on your board are configured like this so when you press the button the switch will connect pin 1 to 3. Since pin 1 is internally connected to pin 2 and pin 3 is internally connected to pin 4 it does not matter if you short 1 to 3 or 2 to 4. Just be careful not to slip and let your wire touch anything else.


Oxyandy

unread,
Jul 1, 2018, 4:17:14 PM7/1/18
to SonoffUsers
I have broken a couple over time..
I simply apply some Kwik Grip glue to corners and under metal retaining cover edge
it fixes the switch better than original 
as glue allows for some flex

Philip Knowles

unread,
Jul 1, 2018, 4:22:27 PM7/1/18
to Oxyandy, SonoffUsers

If it connects to Ewelink you can use SonOTA to flash it to Tasmota. Links from Tasmota site. No need to use USB TTL all done via wifi.

Regards

Phil


--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oxyandy

unread,
Jul 1, 2018, 4:32:00 PM7/1/18
to SonoffUsers
Provided firmware is PRE-v1.6 right Phillip ?
v1.6 and above, over the air flashing is not possible.. unless they have solved this limitation ?

pete c

unread,
Jul 2, 2018, 8:00:43 AM7/2/18
to sonof...@googlegroups.com
Here too broke one SonOff basic WiFi button and fixed it using a bit of Gorilla glue at the corners of the metal cover of the switch.  Just utilize a toothpick to apply the glue and let it set before touching the stalk of the switch.

You can flash firmware OTA fine except now it is a two part flash because of the size of the base firmware relating to the Tasmota firmware builds.  OTA load the minimal build then the final build of the firmware.

I also noticed with the upgrading of firmware revisions the SonOff basic Wifi device is losing its SSID / password configuration.  Most likely this is due to a shift of the area in flash where the information is written. 

Relating to the button presses Tasmota has published an instructional document here relating to button usage:


The main button on a Sonoff-Tasmota flashed module provides the following functionalities:
  • 1 short press: Toggles the relay either directly or by sending a MQTT message like cmnd/sonoff/POWER1 ON. This will blink the LED twice and sends a MQTT status message like stat/sonoff/POWER1 ON. If cmnd/sonoff/ButtonRetain on has been used the MQTT message will also contain the MQTT retain flag.
  • 2 short presses: Toggles the relay 2 if available on the device like Sonoff Dual. This will blink the LED twice and sends a MQTT status message like stat/sonoff/POWER2 on.
  • 3 short presses: Start Wifi smartconfig allowing for SSID and Password configuration using an Android mobile phone with the ESP8266 SmartConfig app. The LED will blink during the config period. A single button press during this period will abort and restart sonoff.
  • 4 short presses: Start Wifi manager providing an Access Point with IP address 192.168.4.1 and a web server allowing the configuration of Wifi. The LED will blink during the config period. A single button press during this period will abort and restart sonoff.
  • 5 short presses: Start Wifi Protected Setup (WPS) allowing for SSID and Password configuration using the router's WPS button or webpage. The LED will blink during the config period. A single button press during this period will abort and restart sonoff.
  • 6 short presses: Will restart the module
  • 7 short presses: Start OTA download of firmware. The green LED is lit during the update
Pressing the button for over forty seconds: Reset settings to defaults as defined in user_config.h and restarts the device

The button is connected to GPIO 0 (NodeMCU pin D3)

Current SonOff basic WiFi project here is:

1 - SonOff basic WiFi - cutting the high voltage traces to use relay in a low voltage scenario
2 - wiring up GPIO 4 (need good solder skills)
3 - using the SonOff basic Wifi device as a combination garage door opener open/close sensor, garage door opener button, temperature sensor (DS18B20) and PIR using Mosquitto which will work fine with open source automation software and / or using Node Red.

Will document above with pictures here on the forum.

Duncan Smith

unread,
Jul 2, 2018, 2:44:09 PM7/2/18
to SonoffUsers
Thanks everyone for all your advice, I have a selection of options now for the weekend to try :-)

kiat....@gmail.com

unread,
Jul 19, 2018, 1:36:06 PM7/19/18
to SonoffUsers
On Monday, 2 July 2018 13:00:43 UTC+1, pete c wrote:

The button is connected to GPIO 0 (NodeMCU pin D3)

Current SonOff basic WiFi project here is:

1 - SonOff basic WiFi - cutting the high voltage traces to use relay in a low voltage scenario
2 - wiring up GPIO 4 (need good solder skills)
3 - using the SonOff basic Wifi device as a combination garage door opener open/close sensor, garage door opener button, temperature sensor (DS18B20) and PIR using Mosquitto which will work fine with open source automation software and / or using Node Red.

Will document above with pictures here on the forum.

Interested to hear how you are able to use a PIR and door opener with a single Sonoff - could you share your circuit design?

 

waipei

unread,
Nov 2, 2019, 12:39:12 PM11/2/19
to SonoffUsers
hello all
I have been very clumsy and broke the right hand copper track when. trying to remove the broken switch (iron too cool), Iv'e since looked for schematics yet can't see where I can get to gpio0 to make a manual connection... any ideas?

tyvm


IMG_0DBBAAC112E5-1.jpeg

Phil

unread,
Nov 3, 2019, 7:00:11 PM11/3/19
to SonoffUsers
Hi if its a sonoff device you may find schematics on the wiki page for the product?

Larry Johnson

unread,
Nov 3, 2019, 8:01:24 PM11/3/19
to waipei, SonoffUsers

--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/3fe7b65e-408c-4d52-8580-2862912cd13f%40googlegroups.com.

Edward Ramski

unread,
Nov 3, 2019, 9:32:02 PM11/3/19
to SonoffUsers

It looks to me from your picture you did not break the trace.  there are 2 traces associated with the switch


Mansion0767.jpg

Pardon my lousy drawing, my talents are elsewhere.  But the switch S-1 is across Trace A and Trace B.  Pressing the switch shorts across the 2 connections All you have to do is get a wire soldered to any point on those traces ( I see where you already have a wire on Trace A) You can try that other pad on Trace B but its tight
      
this is a simplified schematic

   ------------
Reply all
Reply to author
Forward
0 new messages