ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware

Tags: #<Tag:0x00007fd3112e6f80> #<Tag:0x00007fd3112e6df0> #<Tag:0x00007fd3112e6c38>

(Matt Shepherd) #528

I used Platformio to flash tasmota on my Sonoff and it worked so much better. I’m not sure if this helps??

(WJ) #529

Hi Jürgen, thanks your offer to take a look at my small problem, small because I likely can life without it (who cares the prefix “V”) or just ignore the warning. I start with my second problem because I found some additional info in the log:

2018-04-02 21:28:26.650 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type REGEX
2018-04-02 21:28:26.699 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type REGEX    ==> /var/log/openhab2/events.log <==
2018-04-02 21:28:26.717 [vent.ItemStateChangedEvent] - SonoffCurrentVersion changed from NULL to REGEX(.*?(\d+\.\d+\.\d+).*)

Think i still forgot something is this a transform .map file or something completely else? I cut & paste #126 and even did not to forget to add the line in mqtt.cfg :slight_smile:

For the first problem both sonoff basic are using the same settings; it looks like that one of the Sonoff basic sends an erroneous STATUS2 response but I do not see any visual difference:

{"StatusFWR":{"Version":"5.12.0","BuildDateTime":"2018-02-09T14:54:51","Boot":6,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}} //sonoff1
{"StatusFWR":{"Version":"5.12.0","BuildDateTime":"2018-02-09T14:54:51","Boot":6,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}} //sonof

This is the only error I see using this Sonoff. Here are the requested details, again ordinary cut & paste from this topic.

# Tasmota Release Status (cached twice a day)

rule "Sonoff Maintenance"
    Item Sonoff_Action received command
    logInfo("sonoff.rules", "Sonoff Maintenance on all devices: " + receivedCommand)
    for (String device_id : sonoff_device_ids) {
        switch (receivedCommand) {
            case "restart" : {
                logInfo("sonoff.rules", "Sonoff restart on device: " + sonoff_device_ids)
                publish("broker", "cmnd/" + device_id + "/restart", "1")
            case "queryFW" : {
                logInfo("sonoff.rules", "Sonoff FW Query on device: " + sonoff_device_ids)
                publish("broker", "cmnd/" + device_id + "/status", "2")
            case "upgrade" : {
                logInfo("sonoff.rules", "Sonoff upgrade on device: " + sonoff_device_ids)
                publish("broker", "cmnd/" + device_id + "/otaurl", "")
                publish("broker", "cmnd/" + device_id + "/upgrade", "1")

String  Sonoff_Action "Sonoff Action"               <sonoff_basic>
String  Sonoff1_FW "Firmware Sonoff 1 [%S]"         <sonoff_basic> (Sonoff_Maintenance) { mqtt="<[broker:stat/sonoff1/STATUS2:state:JSONPATH($.StatusFWR.Version)"}
String  Sonoff2_FW "Firmware Sonoff 2 [%S]"         <sonoff_basic> (Sonoff_Maintenance) { mqtt="<[broker:stat/sonoff2/STATUS2:state:JSONPATH($.StatusFWR.Version)"}
String  Sonoff_TH_1_FW "Firmware Sonoff TH 1 [%S]"  <sonoff_basic> (Sonoff_Maintenance) { mqtt="<[broker:stat/sonoff_TH_1/STATUS2:state:JSONPATH($.StatusFWR.Version)"}
String  Sonoff_POW_FW "Firmware Sonoff POW [%S]"    <sonoff_basic> (Sonoff_Maintenance) { mqtt="<[broker:stat/sonoff_POW/STATUS2:state:JSONPATH($.StatusFWR.Version)"}
String  Sonoff_Current_FW_Available "Available Release [%S]" <sonoff_basic> (Sonoff_Maintenance) { http="<[tasmotaRelease:10000:JSONPATH($[0].name)]"}

String	Sonoff1LocalVersion "Sonoff #1 running fw version [%s]" { mqtt="<[broker:tele/sonoff1/INFO1:state:JSONPATH($.Version)], <[broker:stat/sonoff1/STATUS2:state:JSONPATH($.StatusFWR.Program)]" }
String	SonoffCurrentVersion "Sonoff fw version on public server [%s]" { mqtt="<[maddox:sonoff-version:state:REGEX(.*?(\\d+\\.\\d+\\.\\d+).*)]" }
String	Sonoff1fwVersion "Sonoff #1 fw version [%s]"
// optional binary flag
Number	SonoffUpgrade

	Frame label="Sysinfo & Maintenance" {
		Text label="SonOff Maintenance" icon="light" {
			Frame label="Reachable" {
				Text	item=Sonoff1_Reachable
				Text	item=Sonoff2_Reachable
				Text	item=Sonoff_TH_1_Reachable
				Text 	item=Sonoff_POW_Reachable
			Frame label="Wifi signaal" {
				Text 	item=Sonoff1_RSSI
				Text 	item=Sonoff2_RSSI
				Text 	item=Sonoff_TH_1_RSSI
				Text	item=Sonoff_POW_RSSI
		Frame label="Sonoff Firmware Details" {
				Text	item=Sonoff_Current_FW_Available
				Text 	item=Sonoff1_FW
				Text 	item=Sonoff2_FW
				Text 	item=Sonoff_TH_1_FW
				Text 	item=Sonoff_POW_FW
				Switch 	item=Sonoff_Action mappings=[restart="Restart", queryFW="Query FW", upgrade="Upgrade FW"]

				//Text	item=Sonoff1LocalVersion
				Text	item=SonoffCurrentVersion			
				//Text	item=Sonoff1fwVersion
				//Text	item=SonoffUpgrade
				// as alternative we use a flag to highlight the version number
				// Text item= SonoffCurrentVersion valuecolor=[SonoffUpgrade==0="green", SonoffUpgrade==1="red"]

(Jürgen Baginski) #530

In order to display the currently used firmware I have:

String Sonoff_Version "Sonoff Version: [%s]" <sonoff_basic> { mqtt="<[opusMQTT:stat/sonoff_TH/STATUS2:state:JSONPATH($.StatusFWR.Version)]"}

Other then that I don’t understand what your problem is.

(WJ) #531

That line also works for me, Another method (SonoffCurrentVersion) is pretending to give a version without the prefix “V”, this one does not work yet, though not very important, perhaps @AndrewZ can give some info what is still missing.

The other problem is just:
[ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
If I understand it correctly the Sonoff basic is sending an incorrect MQTT message
The lights still goes out (and on) so …

Thanks for looking into my problem

(Jürgen Baginski) #532

IMHO the “v” only shows when requesting the the version published, not the actually used one. My solution the show this version without the “v” is Here.

(Tom M ) #533

I need some help with my sonoff devices. At the time I have 4 (Touch, 4CH, Basic, TH16). All of these are flashed with Tasmota. I use MQTT between OpenHAB and Tasmota.
My problem is, that always if I open the Web-Interface of one of the devices, the sonoff stops to work (after 5 to 10 seconds). After that I have to restart the device by power off. If i dont open the Web-Interface everything works fine.

I only use MQTT and WIFI. The MQTT Server is Mosquitto next to Openhabian. Without security.

My MQTT.cfg: (the rest is commented out)

# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883

Did I do something wrong while flashing? At the moment I use Tasmota 5.12. Maybe a problem with the memory? If I disable MQTT all works fine also.
It would be also o.k. to disable the Web-Interface, but i think that´s not the way. :sweat_smile:

Here is my user.config.h

  user_config.h - user specific configuration for Sonoff-Tasmota

  Copyright (C) 2017  Theo Arends

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <>.

#ifndef _USER_CONFIG_H_
#define _USER_CONFIG_H_

 * ATTENTION: Changes to most PARAMETER defines will only override flash settings if you change
 *            define CFG_HOLDER.
 *            Most parameters can be changed online using commands via MQTT, WebConsole or serial
 * Corresponding MQTT/Serial/Console commands in [brackets]

// -- Localization --------------------------------
//#define MY_LANGUAGE            en-GB           // English in Great Britain. Enabled by Default
//#define MY_LANGUAGE            nl-NL           // Dutch in the Netherlands
//#define MY_LANGUAGE            de-DE           // German in Germany
//#define MY_LANGUAGE            pl-PL           // Polish in Poland

// -- Project -------------------------------------
#define PROJECT                "sonoffTH16"          // PROJECT is used as the default topic delimiter and OTA file name
                                                 //   As an IDE restriction it needs to be the same as the main .ino file

#define CFG_HOLDER             0x20161209        // [Reset 1] Change this value to load following default configuration parameters
#define SAVE_DATA              1                 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds)
#define SAVE_STATE             1                 // [SetOption0] Save changed power state to Flash (0 = disable, 1 = enable)

// -- Wifi ----------------------------------------
#define WIFI_IP_ADDRESS        ""         // [IpAddress1] Set to for using DHCP or IP address
#define WIFI_GATEWAY           ""   // [IpAddress2] If not using DHCP set Gateway IP address
#define WIFI_SUBNETMASK        ""   // [IpAddress3] If not using DHCP set Network mask
#define WIFI_DNS               ""    // [IpAddress4] If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)

#define STA_SSID1              "XXXXX"      // [Ssid1] Wifi SSID
#define STA_PASS1              "XXXXX"  // [Password1] Wifi password
#define STA_SSID2              "indebuurt2"      // [Ssid2] Optional alternate AP Wifi SSID
#define STA_PASS2              "VnsqrtnrsddbrN"  // [Password2] Optional alternate AP Wifi password
#define WIFI_CONFIG_TOOL       WIFI_RETRY    // [WifiConfig] Default tool if wifi fails to connect
                                                 //   (WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY, WIFI_WAIT)

// -- Syslog --------------------------------------
#define SYS_LOG_HOST           "domus1"          // [LogHost] (Linux) syslog host
#define SYS_LOG_PORT           514               // [LogPort] default syslog UDP port
#define SYS_LOG_LEVEL          LOG_LEVEL_NONE    // [SysLog]
#define SERIAL_LOG_LEVEL       LOG_LEVEL_INFO    // [SerialLog]
#define WEB_LOG_LEVEL          LOG_LEVEL_INFO    // [WebLog]

// -- Ota -----------------------------------------
#define OTA_URL                "http://domus1:80/api/arduino/" PROJECT ".ino.bin"  // [OtaUrl]

// -- MQTT ----------------------------------------
#define MQTT_USE               1                 // [SetOption3] Select default MQTT use (0 = Off, 1 = On)
// !!! TLS uses a LOT OF MEMORY (20k) so be careful to enable other options at the same time !!!
//#define USE_MQTT_TLS                             // EXPERIMENTAL Use TLS for MQTT connection (+53k code, +20k mem) - Disable by //
                                                 //   Needs Fingerprint, TLS Port, UserId and Password
  #define MQTT_HOST            ""  // [MqttHost]
  #define MQTT_FINGERPRINT     "A5 02 FF 13 99 9F 8B 39 8E F1 83 4F 11 23 65 0B 32 36 FC 07"  // [MqttFingerprint]
  #define MQTT_PORT            20123                // [MqttPort] MQTT TLS port
  #define MQTT_USER            "cloudmqttuser"      // [MqttUser] Mandatory user
  #define MQTT_PASS            "cloudmqttpassword"  // [MqttPassword] Mandatory password
  #define MQTT_HOST            "domus1"          // [MqttHost]
  #define MQTT_PORT            1883              // [MqttPort] MQTT port (10123 on CloudMQTT)
  #define MQTT_USER            "DVES_USER"       // [MqttUser] Optional user
  #define MQTT_PASS            "DVES_PASS"       // [MqttPassword] Optional password

#define MQTT_BUTTON_RETAIN     0                 // [ButtonRetain] Button may send retain flag (0 = off, 1 = on)
#define MQTT_POWER_RETAIN      0                 // [PowerRetain] Power status message may send retain flag (0 = off, 1 = on)
#define MQTT_SWITCH_RETAIN     0                 // [SwitchRetain] Switch may send retain flag (0 = off, 1 = on)

#define MQTT_STATUS_OFF        "OFF"             // [StateText1] Command or Status result when turned off (needs to be a string like "0" or "Off")
#define MQTT_STATUS_ON         "ON"              // [StateText2] Command or Status result when turned on (needs to be a string like "1" or "On")
#define MQTT_CMND_TOGGLE       "TOGGLE"          // [StateText3] Command to send when toggling (needs to be a string like "2" or "Toggle")
#define MQTT_CMND_HOLD         "HOLD"            // [StateText4] Command to send when button is kept down for over KEY_HOLD_TIME * 0.1 seconds (needs to be a string like "HOLD")

// -- MQTT topics ---------------------------------
//#define MQTT_FULLTOPIC         "tasmota/bedroom/%topic%/%prefix%/" // Up to max 80 characers
#define MQTT_FULLTOPIC         "%prefix%/%topic%/" // [FullTopic] Subscribe and Publish full topic name - Legacy topic

// %prefix% token options
#define SUB_PREFIX             "cmnd"            // [Prefix1] Sonoff devices subscribe to %prefix%/%topic% being SUB_PREFIX/MQTT_TOPIC and SUB_PREFIX/MQTT_GRPTOPIC
#define PUB_PREFIX             "stat"            // [Prefix2] Sonoff devices publish to %prefix%/%topic% being PUB_PREFIX/MQTT_TOPIC
#define PUB_PREFIX2            "tele"            // [Prefix3] Sonoff devices publish telemetry data to %prefix%/%topic% being PUB_PREFIX2/MQTT_TOPIC/UPTIME, POWER and TIME
                                                 //   May be named the same as PUB_PREFIX
// %topic% token options (also ButtonTopic and SwitchTopic)
#define MQTT_TOPIC             PROJECT           // [Topic] (unique) MQTT device topic
#define MQTT_GRPTOPIC          "sonoffs"         // [GroupTopic] MQTT Group topic
#define MQTT_CLIENT_ID         "DVES_%06X"       // [MqttClient] Also fall back topic using Chip Id = last 6 characters of MAC address

// -- MQTT - Telemetry ----------------------------
#define TELE_PERIOD            300               // [TelePeriod] Telemetry (0 = disable, 10 - 3600 seconds)

// -- MQTT - Domoticz -----------------------------
#define USE_DOMOTICZ                             // Enable Domoticz (+6k code, +0.3k mem) - Disable by //
  #define DOMOTICZ_IN_TOPIC      "domoticz/in"   // Domoticz Input Topic
  #define DOMOTICZ_OUT_TOPIC     "domoticz/out"  // Domoticz Output Topic
  #define DOMOTICZ_UPDATE_TIMER  0               // [DomoticzUpdateTimer] Send relay status (0 = disable, 1 - 3600 seconds) (Optional)

// -- HTTP ----------------------------------------
#define USE_WEBSERVER                            // Enable web server and wifi manager (+66k code, +8k mem) - Disable by //
  #define WEB_SERVER           2                 // [WebServer] Web server (0 = Off, 1 = Start as User, 2 = Start as Admin)
  #define WEB_PORT             80                // Web server Port for User and Admin mode
  #define WEB_USERNAME         "admin"           // Web server Admin mode user name
  #define WEB_PASSWORD         ""                // [WebPassword] Web server Admin mode Password for WEB_USERNAME (empty string = Disable)
  #define FRIENDLY_NAME        "Sonoff"          // [FriendlyName] Friendlyname up to 32 characters used by webpages and Alexa
  #define USE_EMULATION                          // Enable Belkin WeMo and Hue Bridge emulation for Alexa (+11k code, +2k mem)
    #define EMULATION          EMUL_NONE         // [Emulation] Select Belkin WeMo (single relay/light) or Hue Bridge emulation (multi relay/light) (EMUL_NONE, EMUL_WEMO or EMUL_HUE)

// -- mDNS ----------------------------------------
#define USE_DISCOVERY                            // Enable mDNS for the following services (+8k code, +0.3k mem) - Disable by //
  #define WEBSERVER_ADVERTISE                    // Provide access to webserver by name <Hostname>.local/
  #define MQTT_HOST_DISCOVERY                    // Find MQTT host server (overrides MQTT_HOST if found)

// -- Time - Up to three NTP servers in your region
#define NTP_SERVER1            ""       // [NtpServer1] Select first NTP server by name or IP address (
#define NTP_SERVER2            ""    // [NtpServer2] Select second NTP server by name or IP address (
#define NTP_SERVER3            ""  // [NtpServer3] Select third NTP server by name or IP address (

// -- Time - Start Daylight Saving Time and timezone offset from UTC in minutes
#define TIME_DST               North, Last, Sun, Mar, 2, +120  // Northern Hemisphere, Last sunday in march at 02:00 +120 minutes

// -- Time - Start Standard Time and timezone offset from UTC in minutes
#define TIME_STD               North, Last, Sun, Oct, 3, +60   // Northern Hemisphere, Last sunday in october 02:00 +60 minutes

// -- Application ---------------------------------
#define APP_TIMEZONE           1                 // [Timezone] +1 hour (Amsterdam) (-12 .. 12 = hours from UTC, 99 = use TIME_DST/TIME_STD)
#define APP_PULSETIME          0                 // [PulseTime] Time in 0.1 Sec to turn off power for relay 1 (0 = disabled)
#define APP_POWERON_STATE      3                 // [PowerOnState] Power On Relay state (0 = Off, 1 = On, 2 = Toggle Saved state, 3 = Saved state)
#define APP_BLINKTIME          10                // [BlinkTime] Time in 0.1 Sec to blink/toggle power for relay 1
#define APP_BLINKCOUNT         10                // [BlinkCount] Number of blinks (0 = 32000)
#define APP_SLEEP              0                 // [Sleep] Sleep time to lower energy consumption (0 = Off, 1 - 250 mSec)

#define KEY_HOLD_TIME          40                // [SetOption32] Number of 0.1 seconds to hold Button or external Pushbutton before sending HOLD message
#define WS2812_LEDS            30                // [Pixels] Number of WS2812 LEDs to start with

#define TEMP_CONVERSION        0                 // [SetOption8] Return temperature in (0 = Celsius or 1 = Fahrenheit)
#define TEMP_RESOLUTION        1                 // [TempRes] Maximum number of decimals (0 - 3) showing sensor Temperature
#define HUMIDITY_RESOLUTION    1                 // [HumRes] Maximum number of decimals (0 - 3) showing sensor Humidity
#define PRESSURE_RESOLUTION    1                 // [PressRes] Maximum number of decimals (0 - 3) showing sensor Pressure
#define ENERGY_RESOLUTION      3                 // [EnergyRes] Maximum number of decimals (0 - 5) showing energy usage in kWh

// -- Sensor code selection -----------------------
#define USE_ADC_VCC                              // Display Vcc in Power status. Disable for use as Analog input on selected devices

                                                 // WARNING: Select none for default one DS18B20 sensor or enable one of the following two options for multiple sensors
//#define USE_DS18x20                              // Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1.3k code)
//#define USE_DS18x20_LEGACY                       // Optional for more than one DS18x20 sensors with dynamic scan using library OneWire (+1.5k code)

#define USE_I2C                                  // I2C using library wire (+10k code, 0.2k mem) - Disable by //
  #define USE_SHT                                // Add I2C emulating code for SHT1X sensor
  #define USE_HTU                                // Add I2C code for HTU21/SI7013/SI7020/SI7021 sensor
  #define USE_BMP                                // Add I2C code for BMP/BME280 sensor
  #define USE_BH1750                             // Add I2C code for BH1750 sensor
//  #define USE_VEML6070                           // Add I2C code for VEML6070 sensor (+0.5k code)
//  #define USE_ADS1115                            // Add I2C code for ADS1115 16 bit A/D converter based on Adafruit ADS1x15 library (library not needed) (+0.7k code)
//  #define USE_ADS1115_I2CDEV                     // Add I2C code for ADS1115 16 bit A/D converter using library i2cdevlib-Core and i2cdevlib-ADS1115 (+2k code)
//  #define USE_INA219                             // Add I2C code for INA219 Low voltage and current sensor (+1k code)

#define USE_IR_REMOTE                            // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0.3k mem)
//  #define USE_IR_HVAC                            // Support for HVAC system using IR (+2k code)
  #define USE_IR_RECEIVE                         // Support for IR receiver (+5.5k code)

#define USE_WS2812                               // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem) - Disable by //
  #define USE_WS2812_CTYPE     1                 // WS2812 Color type (0 - RGB, 1 - GRB, 2 - RGBW, 3 - GRBW)
//  #define USE_WS2812_DMA                         // DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow

#define USE_ARILUX_RF                            // Add code for Arilux RF remote controller (+0.8k code)

 * Compile a minimal version if upgrade memory gets tight ONLY TO BE USED FOR UPGRADE STEP 1!
 *   To be used as step 1 during upgrade.
 *   Step 2 is re-compile with option BE_MINIMAL commented out.
 *   !!! Needed for next release of Arduino/ESP8266 (+22k code, +2k mem) !!!

//#define BE_MINIMAL                               // Minimal version if upgrade memory gets tight (-45k code, -2k mem)

 * No user configurable items below

#if defined(USE_MQTT_TLS) && defined(USE_WEBSERVER)
  #error "Select either USE_MQTT_TLS or USE_WEBSERVER as there is just not enough memory to play with"

#endif  // _USER_CONFIG_H_

After the flashing progress i configure the MQTT settings.

(Johann Obermeier) #534

In the screenshots you use Tasmota V.5.10 not 5.12.
Try latest build, and in userconfig.h disable not used features.
-> Hass and Domoticz
A good idea too is to fill in your wifi settings…

(Johann Obermeier) #535

Your device is not in flash mode, or your Pc setup does not work as it should.
Have you read the Wiki on the Tasmota page

(Tom M ) #536

Yes, that is an other Version but i tried it with different releases and it is always the same.

I will try the Point with the User_config.h

(Michael Ingraham) #537

@Confectrician @opus - I’ve been searching for a means to have a temporary way to attach to the Sonoff GPIO. Now that the OTA method is not an option (newer Sonoff firmware since January/February), hardwired flashing is the only means. Since I plan to use quite a few of these switches, I was hesitant to take on the task of soldering headers to each one in order to be able to go down the flashing route. Because of this, so far I’ve opted to stay with the factory Sonoff image (even trying the no flash workaround ipsumdomus found along with the sonoff-simple-server.

But then I saw Jürgen’s photo followed by Jerome’s pogo pin offer. I can’t tell you how many different ways I’d searched for “solderless” pins or connections to come up blank. “Pogo” never occured to me… but makes sense now. Jerome - how do you make pogo pins remain in “contact” with the Sonoff PCB? What style pogo pins did you use? I want to purchase the right type. I’m in the US so I can’t take advantage of your kind offer. Fortunately they are relatively inexpensive - even though I only need four in all.

Jürgen - I guess you’re not using any kind of spring loaded pin… so how does the header on your patch cable make contact with the PCB terminals? I understand that you are recommending using the case to keep the header in place and to provide stability for the push button. My question is how is your patch cable header able to actually make electrical contact with the board? It is not possible to see this detail of the pin header in your photos.

Thanks in advance for your responses.


(Jürgen Baginski) #538

I was using male pins with female cables, held them together with some white tape.
I inserted those male pins into the sonoff vertically, that way the contact could not be assured. By bending the cables in order to close the cover the male pins were tilted and that way the contact was made. That is not a bulletproof solution, but it did work. You only need the connection for a minute!
I also tried the pogo pins, however I could not connect them to my cable without breaking them. I believe someone wrote that they need to be soldered to the cable, the story with those pins ends here for me.
I found myself unable to solder!:weary:

(Jerome) #539


I will look up the correct type from my aliexpress order history for you.
I was not sure either as i ordered them and just decided for them because they did “look well” on the pictures :smile:
But i was lucky and they are well formed for the sonoff solder eyes.

How to mount/build them:
To be honest, they had just arrived and i did not test that in detail yet.
The suggestion from somewhere in this topic (especially the picture) looks like soldered pogo pins that are mounted together with hot glue. This is what i am going to try too.

How to use:
I would think they could just be hold down by hand during the flashing process.
It doesn’t last that long and they will definetely be easier to hold than normal cables.

Sorry if i can’t tell you here “this is what i am doing all day long and it works fine”.
I am still in the learning curve too here. :slight_smile:

(WJ) #540

My latest batch of sonOff Basic devices came with the newest firmware 1.6. I want to share my experience to do things solderless.

The easiest way to upload a sketch solderless is with the following items:

  • CP2102 (bought the 3pcs/lot =1PCS PL2303+1PCS CP2102+1PCS CH340 USB TO TTL)
  • Dupont lines 2x female (4x included in previous lot)
  • The trick to hold it toghether on the sonoff side: from a string of pins a set of 5 (likely in your possession If you have an Arduino or Wemos)


  1. Open the case and attach it into the holes of the sonoff, for wire instructions and warnings see i.e. Tasmota instructions.

  2. Close the case again, make sure the dupont lines are through the opening and the button hole is at the proper place.

  3. Connect USB while pressing the button

  4. Select poper USB port if not yet correctly selected.


  • With the case the dupont lines makes a good connection
  • With the case the button is less fragile
  • Each new upload of a sketch needs to be preceded with step 3.
  • Use upload tool you are best familiar with
  • best for last reRTFM

Hope this was helpfull

PS In the end I even succeded to flash a SonOff with a missing button :smiley: (easiest with; start to create a backup from a working sonoff with wifi)

(Johann Obermeier) #541

If you are new to TASMOTA dont use development builds…
Use master branch, if you dont want to compile yourself, -> use the prebuild Image from
the project page. Everything is explained in the well documented Wiki.

(David Lara) #542

Hi everyone, anyone knows how to send the command to configure the timers by buttons, text boxes or selection from openhab, this to set aside hours and minutes ?.

payload = Timer1 {“Time”: “06:00”, “Arm” = “1”, etc …}

thanks for any information.

(Johann Obermeier) #543

It works as described in the wiki

(David Lara) #544

I understand how to send it by backlog through mqtt or by console, what I ask is how in openhab I can design with setpoint the sending of hours, and in another setpoint the sending of minutes to then publish it in a single topic joining the payloads, without use openhab rules.

Thanks again for your answer.

(WJ) #545

completely true, you put me on the right track again and I was able to flash my unwilling sonoffs

(Elias Hackradt) #546

@BigCol it seems like you have no Permission to access COM8. Try running as admin?
Had a similar issue on Linux, but I could simple set the access.

(Rossko57) #547

As that is not ITEAD specific, it is probably best to start a new thread. You could look for “alarm clock” examples. I don’t think you will be able to achieve this without rules.