Sonoff - Firmware and other DIY | [smartHome]
Firmware survey
What firmware are you using?
Espurna [ 41 ] ** [3,91%]
Sonoff-tasmota [ 232 ] ** [22,12%]
WiFi-ioT [ 88 ] ** [8,39%]
Sonoff wifi switch [ 47 ] ** [4,48%]
Espeasy [ 128 ] ** [12,2%]
1M [ 107 ] ** [10,2%]
Other firmware from the Internet [ 30 ] ** [2,86%]
Homemade firmware [ 45 ] ** [4,29%]
Native firmware [ 335 ] ** [31,94%]
Total votes: 1049
 



Rep: (45)
Sonoff - Firmware and other DIY

Discussion Sonoff with native firmware |

  • In the subject are allForum Rules | Section Rules;
  • Useful topics to note:Forum FAQ | How to clean the image under the spoiler;
  • Instead of saying “Thank you!” UsePicture. If you have less than 15 posts - click on the button.Pictureunder the message where you were helped, and write thanks;
  • In the absence of the curator, the moderator fills the topic header. Use the buttonPictureon the message, which, in your opinion, you need to add to the header to contact the moderator.

Device description
Sonoff is a Wi-Fi-enabled ITEAD smart home device based on ESP8266 or ESP8285 chips. The interest in Sonoff is that an ESP module, a power supply unit, a relay or sensors fit in a tiny and rather pretty box. And most importantly, it can be reprogrammed quite easily and implemented in your smart home ecosystem.
List of Sonoff devices.

FAQ
1) Can I reflash the device to a third-party firmware?
Yes, almost every Sonoff device already has third-party firmware. See the section "Third-party firmware".
2) If you "roll" a third-party firmware, will it be possible to use this device with eWeLink?
No, support for eWeLink and Sonoff clouds disappears. But support for the MQTT protocol appears, which makes it possible to use the device in its home eco-system “smart home”, since it is easier to control your “smart home” than the Chinese “cloud”.
3) Is it possible to write the firmware itself?
Yes, all (?) Sonoff devices are based on ESP8266 or ESP8285 chips. How to create firmware for these modules on the Internet a lot of articles and lessons.
4) What you need to reflash the Sonoff device?
Usually it is enough to have a USB to TTL UART interface converter.like this. Often it is necessary to solder a comb-type connector to the Sonoff board in order to connect a USB-TTL UART converter. Please note that there isthe ability to flash the Sonoff device without a soldering iron and converterif the firmware version is less than 1.6 or more than 2.0 and even has personal experience of the forum users (see the section Useful below).
5) Can Sonoff devices work in frosty weather or at high humidity?
Yes, the use of Sonoff devices in the conditions of frost and humidity is practiced. For outdoor use it is recommended to place the device in a sealed enclosure. For conditions with high humidity and condensation, it is recommended to cover the board with an electronic varnish to avoid short circuits (example).

Useful
How to backup any Itead Sonoff firmware Attention: It is recommended to make a backup of the factory (native) firmware, since in 99% of cases you will not be able to recover your native firmware from someone else's backup. The firmware is tied to a unique device ID.
How to manage Sonoff devices on a local network without a cloud(external link, ENG)
1M Smartphone: Manage devices without a Chinese server
How to flash Sonoff devices without a soldering iron and UARTs (another instructionon ESPurna website) +personal experience from brujerizmo + instruction from ilya-fedin + instruction from jmyrik28 + review from xxcombat. Note: The method works only for firmware with a version less than 1.6 and versions greater than 2.0.0 (in other versions, verification of the certificate was added, which cannot be bypassed). HereThere is a tablet with proven devices and versions.
How to make Itead Si7021 sensor earn on third-party firmware
Short review-comparison of Tasmota and ESPEasy firmware (from romeg)
If ESP8266 is not flashing, try flashing like ESP8285.
Tip: Before changing the firmware, it is better to flash the device with the so-called "zero" firmware, in order to wipe the settings and other "tails" from the previous one.
We connect the PZEM-004T power monitor to Sonoff
Making leakage protection (option from Vanosss). Part 1andPart 2
If the device on ESPEasy started to hang, then try to make it factory reset through the menu
6 secrets of Sonoff (external link to the article and video in English)
If there are large packet losses on third-party firmware, try testing the operation of the MQTT protocol
We connect the motion sensor HC-SR501 + A small amendment to the instructions.
The temperature and humidity sensor Si7021 is already supported on the Tasmota firmware "out of the box".
Experience flashing the device to support Apple HomeKit.
Some new Sonoff devices may not work after flashing due to the use of a PUYA memory chip. + still infa + still.
Current instructions on how to connect the RF bridge on the Tasmota firmware with Domoticz
How to display data from Sonoff to the site narodmon.ru
Device management with Tasmoto firmware via TasmoAdmin service

Sonoff devices
Sonoff Basic / RF
A set of instructions from adik777: Flash Sonoff Basic, Sonoff TH, Sonoff T1, Sonoff RF Bridge on ESPEasy, Tasmota, ESPurna firmware via FlashESP8266
Own alternative server for Sonoff
How to enter into the firmware mode Sonoff RF
How to make the relay work as a physical button (switch) (option from zver5)
How to connect a physical switch (option from Prohozij)(link to the "Sonoff / eWeLink" branch)
Control Sonoff Basic without flashing through Siri Apple HomeKit
How to make sure that the output of Sonoff Basic was not 220V, but the closure of contacts(link to the "Sonoff / eWeLink" branch)
How to flash Sonoff Basic TH V1.1 (memory PN25F08B) - instruction from Varkuta
Connecting Sonoff Basic / Sonoff 4Ch Pro R2 to the Vera smart home controller
Connecting the temperature / humidity sensor DHT22 to Sonoff Basic (from Varkuta)
Connecting I2C peripherals via RX-TX pins (on ESPEasy)
How to connect Si7021 shawl to Sonoff Basic
How Sonoff Basic is powered from 5V(link to the "Sonoff / eWeLink" branch)

External links:
Sonoff TH: Adding RF (ENG)
Sonoff Basic: Making the lamp from IKEA smart (+ setting in MajorDoMo) - VIDEO.
Sonoff Basic: Gate Control (ENG) + review in Russian
Sonoff Basic: DS18B20 Temperature Sensor Connection.
Sonoff Basic: Connecting Temperature and Humidity Sensor DHT22
Sonoff Basic: Boiler Control via Intermediate Relay and Domoticz
How to make the Sonoff Basic physical button work in ESPEasy (ENG) firmware
Alteration of Sonoff Basic to manage loads up to 35 Volts (ENG)
Break the Itead Sonoff TH Switch(the link to the mysku website is deleted automatically; copy the link to the article manually:https: // mysku.ru / blog / aliexpress / 40475.html)
Sonoff Basic: Firmware via Raspberry Pi
Sonoff Basic: How to add an IR transmitter
Visual programming for Sonoff Basic with Blockly
Sonoff Basic. Alternative firmware. More possibilities!

Sonoff RF R2 Power
Sonoff Basic R3 / RF3 / Mini
Sonoff TH10 / TH16
Sonoff CH4
Sonoff ch4 pro
Sonoff dual
Sonoff pow
Sonoff sv
Sonoff Touch / T1
Sonoff s20
Optional non-latching switch parallel to a button on the Sonoff S20 device(link to the "Sonoff / eWeLink" branch)

External links:
Change the firmware in Sonoff S20 (video, ENG)
Refinement of the Sonoff S20 outlet for automatic reboot of the router(the link to the mysku website is deleted automatically; copy the link to the article manually:https: // mysku.ru / blog / china-stores / 57097.html)

Sonoff s31
External links:
How to flash Sonoff S31

Sonoff slampher
Sonoff LED / BN-SZ01
Sonoff s26
Sonoff b1
Sonoff RF Bridge 433
Sonoff sc

Third-party firmware
Third-party management systems
MQTT brokers
1) Mosquitto (multiplatform)
2) CloudMQTT (cloudy)


There is no curator in the subject. For questions about filling the caps, please contact the section moderators via the buttonPictureunder the messages to which you want to add links.
If there is a user in the subject who wants to become a Curator and the correspondingRequirements for candidates, he can apply in the topicI want to be curator(after having studied the topic header and all materials for curators).


Post has been editedVooDooN2 - 12.09.19, 12:43
Reason for editing: Sonoff B1 R2. How to start in firmware mode



Rep: (565)
* skywriter
Well, sew on tasmot, for example. But there will still be no instant power on, the chip needs some time to boot. I have, as you put it, a "cold start" for about a second



Rep: (10)
* Shadof2,
And can it be flashed through the web interface or you need to remove it via a PC?



Rep: (565)
* skywriter
Undesirable. Flash must be cleaned completely so as not to drag “tails”



Rep: (0)
And how can I stimulate Tasmota mqtt from the command line?

Suppose I registered a topic in the web-interface for mqtt: home / kitchen / Relay

Signed like this:
mosquitto_sub -d -t "home / kitchen / Relay / +"


and I’m getting a lot of all kinds of commands

home / kitchen / Relay / STATE
home / kitchen / Relay / POWER
home / kitchen / Relay / UPTIME
etc.

Now I want to send an mqtt command to enable the relay.
Writing:
mosquitto_pub -t "home / kitchen / Relay / POWER" -m ON


on the subscriber side, I get "ON", but the relay itself does not respond.



Rep: (875)
* PavloFischer,
Perhaps you need to specify gpio directly, for example, like this: home / kitchen / GPIO / 14
Gpio your substitute.



Rep: (24)
Good afternoon ! 2 pcs of Sonoff RF R2 Power came, I hoped to use them as on / off on the motion sensor from xiaomi, I thought until they reach China or mihome finally it fully implements the third party for their ewlink or screw it to their domotics ..
But unfortunately, mihome does not synchronize them .., I don’t know how to solder com / com ports .. but there are no normal instructions for launching the Sonoff-Domoticz plugin ..
I put plugin.py in the created sonoff folder in the etc / domoticz / plugins directory - I load it - in hardware, nothing about choosing the sonoff device appears .. didn’t even reach the server installation (or should this be done first?)
My domoticz on xiaomi router works ... how can I put a simple-sonoff-server there?
Does anyone even have such a bunch - or am I wasting time))?



Rep: (0)
tribal2008 @ 03/11/19, 9:48 p.m.*
Perhaps you need to specify gpio directly, for example, like this: home / kitchen / GPIO / 14
Gpio your substitute.

No, it does not work.

Found ongithub / Sonoff-Tasmota / wiki / Home-Assistant
This feature is not compatible with the default Tasmota topic prefix / topic / COMMAND, e.g. cmnd / sonoff / POWER
The topic will automatically be changed to topic / prefix / COMMAND, e.g. sonoff / cmnd / POWER
If you want to use a custom fulltopic, it MUST end with% prefix% / or it will be overwritten with topic / prefix / COMMAND.
This is an example of an allowed fulltopic: tasmota /% topic% /% prefix% /.


Understood.
Indeed, you need to change the topic mask.
So, in the topic field I registered:home / bathroom / Relay
and full topic then:% topic% /% prefix%

And then it works:
mosquitto_pub -t "home / bathroom / Relay / cmnd / POWER" -m "ON"

mosquitto_pub -t "home / bathroom / Relay / cmnd / POWER" -m "OFF"


Post has been editedPavloFischer - 12.03.19, 00:27



Rep: (0)
PavloFischer @ 03/10/19, 08:04*
Guys, help: after flashing, sonoff has spontaneous on / off.
Who faced?
Sonoff T1 and Sonoff S26

Maybe someone somewhere has links?


Sonoff T1 stopped turning on spontaneously when I inserted the module back into my original box.
There are 8 pins, i.e. not only food, but also something else.
I wonder what?



Rep: (100)
iPakhan @ 03/12/19, 00:10*
Does anyone even have such a bunch - or am I wasting time))

The topic of Domotics has repeatedly discussed what is best to do on raspberries. otherwise you’ll have to deal with a bunch of obscure problems, and kommuniti mainly in raspberries and little to tell in your zoo



Rep: (12)
Help identify the problem.
There are two node mcu boards on the ch340 chip. The conditions are the same for both boards. I sew zero firmware, everything is ok. Then I sew the necessary firmware on both boards. On one node mcu, the firmware works as it should, on the other it does not even raise the access point. I'm flashing the problem board with esp easy firmware, everything works. What is the problem?



Rep: (0)
Hello everyone, the question has ripened. Street lighting done on sonoff 4ch pro, 4 spotlights. Yesterday, the first relay and, accordingly, the first searchlight began to turn on itself, turned off the power, changed the password in the program, poked where it could, it turns on periodically, namely relay1. What can it be and how can it be treated?



Rep: (12)
* artem 2015 ,
I will answer myself. In general, the flasher changed and everything is ok.



Rep: (34)
* artem 2015 what was what became? I'm about the flasher.



Rep: (12)
* Digit_ALL , There was a nodemcu firmware programmer, the xs version, has already been deleted.
Now flash download tools v3.6.5



Rep: (1)
Yaasml @ 03/13/19, 9:37 p.m.*
Hello everyone, the question has ripened. Street lighting done on sonoff 4ch pro, 4 spotlights. Yesterday, the first relay and, accordingly, the first searchlight began to turn on itself, turned off the power, changed the password in the program, poked where it could, it turns on periodically, namely relay1. What can it be and how can it be treated?


Is the remote connected? It turned on so by someone else’s remote control. But one or two. The remote has changed.



Rep: (0)
Nope, there is no remote control. All hands will not reach to buy.
The button works, checked during the day. I'll try another lantern on this R1 to hang. Chekhorda some kind.
An hour ago, I disconnected the load from it, now I look, it is again turned on. ((



Rep: (0)
Tasmota at Sonoff Basic worked flawlessly for several days.
And now the module is regularly stupid. Disable-enable - works for a while. 6-7 hours ... and then stops responding.
What can be?
Can I somehow save the logs?

Post has been editedPavloFischer - 16.03.19, 00:35



Rep: (0)
I updated the sonoff RF bridge 433 to tasmota.
and how to connect the sensors to the bridge? (e.g. motion and door sensors)



Rep: (58)
* prankst3r,
And what does it mean to connect?OptionstillOptionconnections
Is there any smart home server?



Rep: (4)
Do not flash Sonoff TH16 ver 2.1
The behavior is very strange, when power is supplied from either UART or 220, the relay is immediately activated and the red LED is on.
I have already tried two different UARTs, the result is the same. I serve naturally 3.3v
A week ago I flashed TH16 from the same batch - there were no problems. Any thoughts what could be?

UPD: it became even more interesting - that at 220, that with the UART relay in general goes crazy, pops, blinks with a diode ... it feels like there is no contact stupidly somewhere

Post has been editedSl1ng3R - 16.03.19, 13:43


Full version    

Help     rules

Now: 09/16/19, 00:01