Skip to content
  • 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. OpenHardware.io
  3. 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway

Scheduled Pinned Locked Moved OpenHardware.io
mqttsonoffhome assistanesp8266
93 Posts 25 Posters 28.0k Views 20 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.
  • Nca78N Offline
    Nca78N Offline
    Nca78
    Hardware Contributor
    wrote on last edited by
    #41

    I have few sonoff and I just installed one with this script to replace a dead 433 device. So thank you very much for the script and the tutorial.

    Reports of regular wifi connection losses are what kept me away from sonoff until now. Maybe the script could check wifi connection regularly and force a reconnect. Something like in the link below ?
    http://www.esp8266.com/viewtopic.php?f=32&t=8286

    1 Reply Last reply
    0
    • BrydenB Offline
      BrydenB Offline
      Bryden
      wrote on last edited by
      #42

      Another I have had these running posts.

      I have had 3 Sonoff relays running on 240v 50Hz for 2-3 months straight.

      2 of them in IP67 outdoor lights with Phillips LED Lamps, switch on and off several times per day, Not a single hardware issue.

      best $6 ever

      Nca78N 1 Reply Last reply
      1
      • E Offline
        E Offline
        Ed1500
        wrote on last edited by
        #43

        @betonishard ESPeasy I am not sure, but supposedly Tasmota does

        B 1 Reply Last reply
        0
        • BrydenB Bryden

          Another I have had these running posts.

          I have had 3 Sonoff relays running on 240v 50Hz for 2-3 months straight.

          2 of them in IP67 outdoor lights with Phillips LED Lamps, switch on and off several times per day, Not a single hardware issue.

          best $6 ever

          Nca78N Offline
          Nca78N Offline
          Nca78
          Hardware Contributor
          wrote on last edited by
          #44

          @Bryden said in 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway:

          Another I have had these running posts.

          I have had 3 Sonoff relays running on 240v 50Hz for 2-3 months straight.

          2 of them in IP67 outdoor lights with Phillips LED Lamps, switch on and off several times per day, Not a single hardware issue.

          best $6 ever

          Yes over one month and very reliable, but with Domoticz is not integrating very well with my old 433MHz remote controls (that I use for my remaining 433MHz module until they are replaced).
          Making me think about a small plugin board to control the sonoff through serial port, so it would make a real MySensors node for 10$ and avoid all the power supply, relay etc etc soldering and not rely on wifi.

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #45

            I remember reading non to connect any other serial device while the Sonoff is connected to mains or it would get damaged.

            E Nca78N 2 Replies Last reply
            0
            • gohanG gohan

              I remember reading non to connect any other serial device while the Sonoff is connected to mains or it would get damaged.

              E Offline
              E Offline
              Ed1500
              wrote on last edited by
              #46

              @gohan The only time you would need to connect a serial device is I guess when you are flashing the software. There is no needTheThe only time you need to connect a serial device is when you are flashing the software. There is no need to connect it to the mains grid then. Whether it would damage anything i do not know but it is unnecessary and therefore absolutely not recommended to do it. Avoid working on anything that is connected to mains, especially if there is no need to have it connected

              1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #47

                I was referring to what @Nca78 said about controlling the sonoff through serial port.

                E 1 Reply Last reply
                0
                • warmaniacW warmaniac

                  @Efflon said in 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway:

                  @warmaniac the sonoff works just like any sensor except its configured as a gateway since that is what is needed for esp8266+mysensors . Mqtt or ethernet/wifi is just a matter of taste and your setup, skip mqtt if you don't have anything else using it.

                  I want to use standalone Sonoff (one device) than I must install broker (Mosquito) on my raspberry where is Domoticz running ? And how can I add than that device or how can this setup looks like.

                  E Offline
                  E Offline
                  Ed1500
                  wrote on last edited by
                  #48

                  @warmaniac you might have solved yr problem already. Anyway, I use the github/computourist software for the SonOff. have been using it for many months. very stable

                  1 Reply Last reply
                  0
                  • gohanG gohan

                    I was referring to what @Nca78 said about controlling the sonoff through serial port.

                    E Offline
                    E Offline
                    Ed1500
                    wrote on last edited by
                    #49

                    @gohan ah ok. Sometimes I lose track of who is reacting to who. Must be old age :-)

                    1 Reply Last reply
                    0
                    • gohanG gohan

                      I remember reading non to connect any other serial device while the Sonoff is connected to mains or it would get damaged.

                      Nca78N Offline
                      Nca78N Offline
                      Nca78
                      Hardware Contributor
                      wrote on last edited by
                      #50

                      @gohan said in 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway:

                      I remember reading non to connect any other serial device while the Sonoff is connected to mains or it would get damaged.

                      I supposed that's when you connect your computer to sonoff using serial adapter ?
                      I see no reason for damage if both es8266 and atmega are connected to the same VCC/GND.

                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by
                        #51

                        I think it's because the gnd on the sonoff is shared with neutral from the mains. I have seen pictures of burned stuff but I actually never wanted to try to see if the computer gets fried or not 😁

                        Nca78N 1 Reply Last reply
                        1
                        • gohanG gohan

                          I think it's because the gnd on the sonoff is shared with neutral from the mains. I have seen pictures of burned stuff but I actually never wanted to try to see if the computer gets fried or not 😁

                          Nca78N Offline
                          Nca78N Offline
                          Nca78
                          Hardware Contributor
                          wrote on last edited by
                          #52

                          @gohan yes with it could happen, but if you just connect a standalone Arduino powered with VCC GND from esp8266 there's no reason to have a problem.

                          1 Reply Last reply
                          0
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #53

                            But why would you want to connect another arduino to the sonoff?

                            Nca78N 1 Reply Last reply
                            0
                            • E Ed1500

                              @betonishard ESPeasy I am not sure, but supposedly Tasmota does

                              B Offline
                              B Offline
                              betonishard
                              wrote on last edited by
                              #54

                              @Ed1500 Thanks for your answer. Went for espurna.. Tested tasmota, but compared to espurna it was kind of slow. Works stable for quite some time now.

                              E 1 Reply Last reply
                              0
                              • B betonishard

                                @Ed1500 Thanks for your answer. Went for espurna.. Tested tasmota, but compared to espurna it was kind of slow. Works stable for quite some time now.

                                E Offline
                                E Offline
                                Ed1500
                                wrote on last edited by
                                #55

                                @betonishard Good to know. I was thinking about trying Tasmota for regular Sonoff, but I will keep slowness in mind

                                1 Reply Last reply
                                0
                                • gohanG gohan

                                  But why would you want to connect another arduino to the sonoff?

                                  Nca78N Offline
                                  Nca78N Offline
                                  Nca78
                                  Hardware Contributor
                                  wrote on last edited by
                                  #56

                                  @gohan said in 💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway:

                                  But why would you want to connect another arduino to the sonoff?

                                  To have a real MySensors node that can be directly controlled with another node and not relying on wifi and controller.

                                  1 Reply Last reply
                                  0
                                  • gohanG Offline
                                    gohanG Offline
                                    gohan
                                    Mod
                                    wrote on last edited by
                                    #57

                                    Sorry but I am still missing the point. If you have to make a mysensors node anyway, why not make a classic relay node?

                                    Nca78N 1 Reply Last reply
                                    0
                                    • gohanG gohan

                                      Sorry but I am still missing the point. If you have to make a mysensors node anyway, why not make a classic relay node?

                                      Nca78N Offline
                                      Nca78N Offline
                                      Nca78
                                      Hardware Contributor
                                      wrote on last edited by Nca78
                                      #58

                                      @gohan because when using the sonoff I do not have to care about the power supply/safety, to find a case that is safe for electrical device and I only have a few things to solder.
                                      And sonoff is cheaper than buying separately the power supply, case, relay etc

                                      So just solder a few low voltage components on a PCB, plug in the sonoff and get a safe main powered actuator.

                                      Not 100% sure it's worth it yet, still thinking a out it ;)
                                      But main advantage is to reuse it in more complex sonoff devices with multiple relays, power measurement, in wall plugs etc etc

                                      1 Reply Last reply
                                      0
                                      • gohanG Offline
                                        gohanG Offline
                                        gohan
                                        Mod
                                        wrote on last edited by
                                        #59

                                        Once you come up with something I'll take a look to better understand what you want to do 😀
                                        I have seen how to hack some of them to add a couple of wires directly on the esp8266 chip to get an i2c bus.

                                        1 Reply Last reply
                                        0
                                        • Jonathan CaesJ Offline
                                          Jonathan CaesJ Offline
                                          Jonathan Caes
                                          wrote on last edited by
                                          #60

                                          How can I create a new device in Vera for a gateway? Can't seem to get that working :/

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


                                          15

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular