Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Looking for detailed description for hacking a sonoff

Looking for detailed description for hacking a sonoff

Scheduled Pinned Locked Moved Hardware
45 Posts 12 Posters 49.3k Views 15 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • alexsh1A Offline
    alexsh1A Offline
    alexsh1
    wrote on last edited by
    #11

    A better photo for your understanding.
    I know some people upgraded the chip, but the board got really messy. I do not think I can stick my fan into it - too many plastic components which will start melting.

    0_1476782548742_image.jpeg

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #12

      I mean skip the NRF2401.. just run it as a standalone gw/node.

      alexsh1A 1 Reply Last reply
      0
      • hekH hek

        I mean skip the NRF2401.. just run it as a standalone gw/node.

        alexsh1A Offline
        alexsh1A Offline
        alexsh1
        wrote on last edited by
        #13

        @hek in this case it is doable. Not sure if 1mb Is enough though

        peterscargillP 1 Reply Last reply
        0
        • FotoFieberF Offline
          FotoFieberF Offline
          FotoFieber
          Hardware Contributor
          wrote on last edited by
          #14

          I hacked a sonoff dual:
          https://itead.freshdesk.com/support/discussions/topics/11000006870

          It should be easy to upload a wifi gateway sketch. I made an MQTT integration.

          1 Reply Last reply
          0
          • Mark SwiftM Offline
            Mark SwiftM Offline
            Mark Swift
            wrote on last edited by Mark Swift
            #15

            Thanks for the great replies.

            I'm not currently using MQTT, I'm running the Ethernet gateway via a W5100. Can I use the ESP boards, i.e this or the nodemcu without the need for an NRF24?

            alexsh1A 1 Reply Last reply
            0
            • Mark SwiftM Mark Swift

              Thanks for the great replies.

              I'm not currently using MQTT, I'm running the Ethernet gateway via a W5100. Can I use the ESP boards, i.e this or the nodemcu without the need for an NRF24?

              alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by
              #16

              @Mark-Swift how would you intend to use Sonoff with MySensors? Do you have the ESP GW?

              I am using several Sonoffs with Domoticz via a JSON script. https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

              1 Reply Last reply
              0
              • peterscargillP Offline
                peterscargillP Offline
                peterscargill
                wrote on last edited by
                #17

                So - I agree re: Sonoffs - we've written our own software at the tech blog and though not quite step by step it is easy enough to use and ROMS are available to save you having to get into compiling code. We use Node-Red and MQTT as the base of everything - so you have a number of ESP sensors and relay controllers etc all talking to a Raspberry Pi - or something much cheaper like an Orange Pi Zero running Armbian for example - and basically you're sending simple MQTT messages around the house - nothing has to go outside unless of course you want remote control at a distance. Modifying Sonoffs is easy - I'm sitting in front of some now updating them with our software - just in the process of figuring our which port is used for the second relay in the DUAL product.

                1 Reply Last reply
                0
                • alexsh1A alexsh1

                  @hek in this case it is doable. Not sure if 1mb Is enough though

                  peterscargillP Offline
                  peterscargillP Offline
                  peterscargill
                  wrote on last edited by
                  #18

                  @alexsh1 Replace the FLASH in the Sonoff - easier in the latest models as they've put the FLASH chip on the back (Sonoff TH16 etc) - on the originals it was jammed in next to the programming button and a pain to replace.

                  alexsh1A 1 Reply Last reply
                  0
                  • peterscargillP peterscargill

                    @alexsh1 Replace the FLASH in the Sonoff - easier in the latest models as they've put the FLASH chip on the back (Sonoff TH16 etc) - on the originals it was jammed in next to the programming button and a pain to replace.

                    alexsh1A Offline
                    alexsh1A Offline
                    alexsh1
                    wrote on last edited by
                    #19

                    @peterscargill Peter, I am stuck with the previous model (WiFi + 433) and changing FLASH is literally impossible even with a small tip. Using a hot fan is not an option as it would melt down all plastic including the button.

                    1 Reply Last reply
                    0
                    • EfflonE Offline
                      EfflonE Offline
                      Efflon
                      wrote on last edited by
                      #20

                      Here is a working example of using Sonoff with MySensors and the mqtt gateway.
                      No need to replace any flash etc...

                      alexsh1A 1 Reply Last reply
                      0
                      • EfflonE Efflon

                        Here is a working example of using Sonoff with MySensors and the mqtt gateway.
                        No need to replace any flash etc...

                        alexsh1A Offline
                        alexsh1A Offline
                        alexsh1
                        wrote on last edited by
                        #21

                        @Efflon we were talking about a different software whereby more flash was required
                        Besides 1mb flash is not much in the esp8566 world

                        1 Reply Last reply
                        0
                        • dbemowskD Offline
                          dbemowskD Offline
                          dbemowsk
                          wrote on last edited by
                          #22

                          So I have been debating on getting some of these sonoffs. I am assuming the WiFi gateway in the build section of the site is what I would need to build? Is there a better option for using these with my Vera Plus?

                          Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                          Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                          alexsh1A 1 Reply Last reply
                          0
                          • dbemowskD dbemowsk

                            So I have been debating on getting some of these sonoffs. I am assuming the WiFi gateway in the build section of the site is what I would need to build? Is there a better option for using these with my Vera Plus?

                            alexsh1A Offline
                            alexsh1A Offline
                            alexsh1
                            wrote on last edited by
                            #23

                            @dbemowsk no, the wifi gateway above is to connect nrf24l01+ via wifi. For Sonoff I just reflashed it with easyesp and it works via my normal router with Domoticz. You can have the MQTT setup with Sonoff - thats what @peterscargill did

                            dbemowskD 1 Reply Last reply
                            0
                            • alexsh1A alexsh1

                              @dbemowsk no, the wifi gateway above is to connect nrf24l01+ via wifi. For Sonoff I just reflashed it with easyesp and it works via my normal router with Domoticz. You can have the MQTT setup with Sonoff - thats what @peterscargill did

                              dbemowskD Offline
                              dbemowskD Offline
                              dbemowsk
                              wrote on last edited by dbemowsk
                              #24

                              @alexsh1 said in Looking for detailed description for hacking a sonoff:

                              For Sonoff I just reflashed it with easyesp and it works via my normal router with Domoticz. You can have the MQTT setup with Sonoff - thats what @peterscargill did

                              Will it work with Vera? I purchased one of these recently from WalMart which also runs on an esp8266 module. I wonder if I can run run the easyesp firmware on that one also?
                              alt text

                              Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                              Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                              alexsh1A 1 Reply Last reply
                              0
                              • dbemowskD dbemowsk

                                @alexsh1 said in Looking for detailed description for hacking a sonoff:

                                For Sonoff I just reflashed it with easyesp and it works via my normal router with Domoticz. You can have the MQTT setup with Sonoff - thats what @peterscargill did

                                Will it work with Vera? I purchased one of these recently from WalMart which also runs on an esp8266 module. I wonder if I can run run the easyesp firmware on that one also?
                                alt text

                                alexsh1A Offline
                                alexsh1A Offline
                                alexsh1
                                wrote on last edited by
                                #25

                                @dbemowsk Unfortunately, I am not familiar with Vera. Can you send http or json commands from Vera? If yes, it will work. On RPi this is easy to implement.

                                Generally speaking you can flash many devices with easyesp if you find how to connect FTDI. I have ESP-01 and ESP-12 running easyesp. Again I am not familiar with the device you posted (the most important question is does it have FTDI or can you identify it by soldering corresponding pins?) and suggest to ask the same question on the easyesp forum.

                                1 Reply Last reply
                                0
                                • dbemowskD Offline
                                  dbemowskD Offline
                                  dbemowsk
                                  wrote on last edited by
                                  #26

                                  @alexsh1 I think all the information I need to flash it is in this post that I found on Hackaday. It is a bit different than the sonoffs in that it does not have an unpopulated header port for programming, so you have to solder directly to the module to get it programmed, but what the heck, I'll give it a shot.

                                  As far a s controlling it from Domoticz, I am assuming that you just created a dummy switch that you used URLs for the on and off commands, correct? I will look into how to do that from Vera. Before I got my Vera (a month ago) I was using Domoticz.

                                  Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                                  Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                                  alexsh1A 1 Reply Last reply
                                  0
                                  • dbemowskD dbemowsk

                                    @alexsh1 I think all the information I need to flash it is in this post that I found on Hackaday. It is a bit different than the sonoffs in that it does not have an unpopulated header port for programming, so you have to solder directly to the module to get it programmed, but what the heck, I'll give it a shot.

                                    As far a s controlling it from Domoticz, I am assuming that you just created a dummy switch that you used URLs for the on and off commands, correct? I will look into how to do that from Vera. Before I got my Vera (a month ago) I was using Domoticz.

                                    alexsh1A Offline
                                    alexsh1A Offline
                                    alexsh1
                                    wrote on last edited by
                                    #27

                                    @dbemowsk yes, with Domoticz it is very straight forward, but you have to setup the Sonoff as well.
                                    Check this out- http://www.letscontrolit.com/wiki/index.php/Tutorial_Domoticz_Switch

                                    dbemowskD 1 Reply Last reply
                                    0
                                    • alexsh1A alexsh1

                                      @dbemowsk yes, with Domoticz it is very straight forward, but you have to setup the Sonoff as well.
                                      Check this out- http://www.letscontrolit.com/wiki/index.php/Tutorial_Domoticz_Switch

                                      dbemowskD Offline
                                      dbemowskD Offline
                                      dbemowsk
                                      wrote on last edited by
                                      #28

                                      @alexsh1 Excellent information. I may try flashing the module that I have today and see if I can get it to work.

                                      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                                      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                                      1 Reply Last reply
                                      0
                                      • Mark SwiftM Offline
                                        Mark SwiftM Offline
                                        Mark Swift
                                        wrote on last edited by
                                        #29

                                        I have a standard ethernet gateway (NRF) and my controller is the home automation system 'Homey'. I presume I cannot connect these directly to my controller?

                                        alexsh1A 1 Reply Last reply
                                        0
                                        • Mark SwiftM Mark Swift

                                          I have a standard ethernet gateway (NRF) and my controller is the home automation system 'Homey'. I presume I cannot connect these directly to my controller?

                                          alexsh1A Offline
                                          alexsh1A Offline
                                          alexsh1
                                          wrote on last edited by alexsh1
                                          #30

                                          @Mark-Swift the problem with home automation in general is a verity of controllers ;) I'm not familiar with Homey, but if it can handle MQTT, Sonoff will work with it.

                                          A quick google found this:

                                          https://forum.athom.com/discussion/858/published-mosquitto-mqtt-client-app

                                          you are participating in this thread ;)

                                          PS I have a standard Ethernet GW too. My controller Domoticz can handle JSON/http requests which makes it easy to handle devices like Sonoff connected to my home wifi and not requiring any further GW. Obviously, the setup can be more complicated with MQTT GW and Sonoff MQTT firmware

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          21

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular