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. Development
  3. ESP8266 WiFi gateway port for MySensors

ESP8266 WiFi gateway port for MySensors

Scheduled Pinned Locked Moved Development
328 Posts 56 Posters 309.6k Views 39 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.
  • F Offline
    F Offline
    Fabien
    wrote on last edited by
    #29

    Ok I will test it in few days.
    Do you think is it possible to have an ESP gateway with RF24 and RF69 ? ESP have more memroy (ESP12E)

    YveauxY 1 Reply Last reply
    0
    • F Fabien

      Ok I will test it in few days.
      Do you think is it possible to have an ESP gateway with RF24 and RF69 ? ESP have more memroy (ESP12E)

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #30

      @Fabien connecting two radios should work, although MySensors does not natively support it.

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gonzalonal
        wrote on last edited by
        #31

        Hi, let me ask a silly question just to confirm if I understand how this would work.

        This gateway would receive Nodes data throght NRF or RF69 and then send it to controller via wifi? The way back would be, receiving controller commands/data via wifi and get to the nodes through NRF or RF69.

        Is this right?

        Thanks!

        YveauxY 1 Reply Last reply
        0
        • G gonzalonal

          Hi, let me ask a silly question just to confirm if I understand how this would work.

          This gateway would receive Nodes data throght NRF or RF69 and then send it to controller via wifi? The way back would be, receiving controller commands/data via wifi and get to the nodes through NRF or RF69.

          Is this right?

          Thanks!

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #32

          @gonzalonal said:

          Hi, let me ask a silly question just to confirm if I understand how this would work.

          This gateway would receive Nodes data throght NRF or RF69 and then send it to controller via wifi? The way back would be, receiving controller commands/data via wifi and get to the nodes through NRF or RF69.

          Is this right?

          Thanks!

          Correct!

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Fabien
            wrote on last edited by
            #33

            Doesn't work here with stage version of ESP8266-Arduino (can't install stable version, I have checksum error). I use this module http://www.electrodragon.com/product/nodemcu-lua-amica-r2-esp8266-wifi-board/
            Can't load at 9600 bauds (how can you change uplaod baud rate ?)
            Crash on init and reboot :

            ESP8266 MySensors Gateway
            Connecting to Livebox-577E
            ...Connected!
            IP: 192.168.1.23
            
            Exception (3):
            epc1=0x40206955 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40244cd2 depc=0x00000000
            
            ctx: cont 
            sp: 3ffea540 end: 3ffea780 offset: 01a0
            
            >>>stack>>>
            3ffea6e0:  a8e1fcff 000000a8 3ffe9294 40206b7c  
            3ffea6f0:  00000001 3ffe9290 3ffe9294 402036d0  
            3ffea700:  00000000 00000000 3ffe91fc 40204910  
            3ffea710:  0000007f 3ffea7ac 40201cac 3ffe9760  
            3ffea720:  40202320 00000001 00000000 40201d4f  
            3ffea730:  1701a8c0 00ffffff 0101a8c0 3ffea7ac  
            3ffea740:  3ffe873d 3ffe9474 3ffe972c 4020266f  
            3ffea750:  3ffe8c08 1701a8c0 00000000 00000000  
            3ffea760:  3fffdc20 00000000 3ffea7a4 40201d1f  
            3ffea770:  00000000 00000000 3ffe9760 40100374  
            <<<stack<<<
            
             ets Jan  8 2013,rst cause:2, boot mode:(3,6)
            
            load 0x4010f000, len 1264, room 16 
            tail 0
            chksum 0x42
            csum 0x42
            ~ld
            
            YveauxY 2 Replies Last reply
            0
            • F Fabien

              Doesn't work here with stage version of ESP8266-Arduino (can't install stable version, I have checksum error). I use this module http://www.electrodragon.com/product/nodemcu-lua-amica-r2-esp8266-wifi-board/
              Can't load at 9600 bauds (how can you change uplaod baud rate ?)
              Crash on init and reboot :

              ESP8266 MySensors Gateway
              Connecting to Livebox-577E
              ...Connected!
              IP: 192.168.1.23
              
              Exception (3):
              epc1=0x40206955 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40244cd2 depc=0x00000000
              
              ctx: cont 
              sp: 3ffea540 end: 3ffea780 offset: 01a0
              
              >>>stack>>>
              3ffea6e0:  a8e1fcff 000000a8 3ffe9294 40206b7c  
              3ffea6f0:  00000001 3ffe9290 3ffe9294 402036d0  
              3ffea700:  00000000 00000000 3ffe91fc 40204910  
              3ffea710:  0000007f 3ffea7ac 40201cac 3ffe9760  
              3ffea720:  40202320 00000001 00000000 40201d4f  
              3ffea730:  1701a8c0 00ffffff 0101a8c0 3ffea7ac  
              3ffea740:  3ffe873d 3ffe9474 3ffe972c 4020266f  
              3ffea750:  3ffe8c08 1701a8c0 00000000 00000000  
              3ffea760:  3fffdc20 00000000 3ffea7a4 40201d1f  
              3ffea770:  00000000 00000000 3ffe9760 40100374  
              <<<stack<<<
              
               ets Jan  8 2013,rst cause:2, boot mode:(3,6)
              
              load 0x4010f000, len 1264, room 16 
              tail 0
              chksum 0x42
              csum 0x42
              ~ld
              
              YveauxY Offline
              YveauxY Offline
              Yveaux
              Mod
              wrote on last edited by
              #34

              @Fabien said:

              Doesn't work here with stage version of ESP8266-Arduino (can't install stable version, I have checksum error).

              What do you mean by stage version and checksum error exactly?
              Tonight @hek merged the gateway code for ESP to master 1.5. Could you try with that version?

              I use this module http://www.electrodragon.com/product/nodemcu-lua-amica-r2-esp8266-wifi-board/

              Seems identical to the one I ordered. Until I receive it I cannot replay your exact case. I did test & develop using separate ESP12 module, while your board has ESP12E, I guess. Can you confirm this?

              Can't load at 9600 bauds (how can you change uplaod baud rate ?)

              Don't bother about the download speed. I only suggest to start at low speed as it seems to download more reliably. Did download finish without errors?

              Crash on init and reboot :

              ESP8266 MySensors Gateway
              Connecting to Livebox-577E
              ...Connected!
              IP: 192.168.1.23
              
              Exception (3):
              epc1=0x40206955 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40244cd2 depc=0x00000000
              
              ctx: cont 
              sp: 3ffea540 end: 3ffea780 offset: 01a0
              
              >>>stack>>>
              3ffea6e0:  a8e1fcff 000000a8 3ffe9294 40206b7c  
              3ffea6f0:  00000001 3ffe9290 3ffe9294 402036d0  
              3ffea700:  00000000 00000000 3ffe91fc 40204910  
              3ffea710:  0000007f 3ffea7ac 40201cac 3ffe9760  
              3ffea720:  40202320 00000001 00000000 40201d4f  
              3ffea730:  1701a8c0 00ffffff 0101a8c0 3ffea7ac  
              3ffea740:  3ffe873d 3ffe9474 3ffe972c 4020266f  
              3ffea750:  3ffe8c08 1701a8c0 00000000 00000000  
              3ffea760:  3fffdc20 00000000 3ffea7a4 40201d1f  
              3ffea770:  00000000 00000000 3ffe9760 40100374  
              <<<stack<<<
              
               ets Jan  8 2013,rst cause:2, boot mode:(3,6)
              
              load 0x4010f000, len 1264, room 16 
              tail 0
              chksum 0x42
              csum 0x42
              ~ld
              

              Apparently you did connect to WiFi correctly and got an IP address.
              Debugging this module is hard; I add serial print statements at strategic places to drill down to the cause of such access violations.
              It would really help if you can get some more info on where it crashes by adding these print statements.
              Otherwise you'll probably have to wait until we get to a common hardware setup.

              http://yveaux.blogspot.nl

              1 Reply Last reply
              0
              • F Fabien

                Doesn't work here with stage version of ESP8266-Arduino (can't install stable version, I have checksum error). I use this module http://www.electrodragon.com/product/nodemcu-lua-amica-r2-esp8266-wifi-board/
                Can't load at 9600 bauds (how can you change uplaod baud rate ?)
                Crash on init and reboot :

                ESP8266 MySensors Gateway
                Connecting to Livebox-577E
                ...Connected!
                IP: 192.168.1.23
                
                Exception (3):
                epc1=0x40206955 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40244cd2 depc=0x00000000
                
                ctx: cont 
                sp: 3ffea540 end: 3ffea780 offset: 01a0
                
                >>>stack>>>
                3ffea6e0:  a8e1fcff 000000a8 3ffe9294 40206b7c  
                3ffea6f0:  00000001 3ffe9290 3ffe9294 402036d0  
                3ffea700:  00000000 00000000 3ffe91fc 40204910  
                3ffea710:  0000007f 3ffea7ac 40201cac 3ffe9760  
                3ffea720:  40202320 00000001 00000000 40201d4f  
                3ffea730:  1701a8c0 00ffffff 0101a8c0 3ffea7ac  
                3ffea740:  3ffe873d 3ffe9474 3ffe972c 4020266f  
                3ffea750:  3ffe8c08 1701a8c0 00000000 00000000  
                3ffea760:  3fffdc20 00000000 3ffea7a4 40201d1f  
                3ffea770:  00000000 00000000 3ffe9760 40100374  
                <<<stack<<<
                
                 ets Jan  8 2013,rst cause:2, boot mode:(3,6)
                
                load 0x4010f000, len 1264, room 16 
                tail 0
                chksum 0x42
                csum 0x42
                ~ld
                
                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #35

                @Fabien My bad, mea culpa :facepunch:
                Have been so busy getting the stuff to compile for all different platforms that this bug sneaked in... That's why you should always verify if your code still works, after building it ;-)

                Anyway, see this pull request for the fix.
                Once it is merged to master, could you please try again?

                I'm also experiencing some random disconnects, so expect a new update soon...

                http://yveaux.blogspot.nl

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

                  Opps :blush:

                  Started Jenkins build of the PR.

                  YveauxY 1 Reply Last reply
                  0
                  • hekH hek

                    Opps :blush:

                    Started Jenkins build of the PR.

                    YveauxY Offline
                    YveauxY Offline
                    Yveaux
                    Mod
                    wrote on last edited by
                    #37

                    @hek You probably got so accustomed to building it :tired_face:

                    http://yveaux.blogspot.nl

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

                      The build server must earn its cost :)

                      1 Reply Last reply
                      0
                      • YveauxY Offline
                        YveauxY Offline
                        Yveaux
                        Mod
                        wrote on last edited by
                        #39

                        I prepared a new pull request which deals with some occasional watchdog timeouts (causing a reset) when clients connect or disconnect.
                        It also allows multiple clients to connect simultaneously to the ESP gateway.
                        Please update to this version once it's integrated in master.

                        http://yveaux.blogspot.nl

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          Fabien
                          wrote on last edited by
                          #40

                          With pull #186, it works better ...
                          Connection ok, can see messages form sensors on the serial line.
                          Connecting with MYSController, got "Gateway startup complete." on the serial link but nothing on MYSController. Pinging works ...
                          Perhaps somme problems with ESP and Livebox ... I have this problem before with some sketch and I must made an AP on my Odroid ... I will try later.

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

                            MySensors/Arduino#186 Merged

                            1 Reply Last reply
                            0
                            • DrJeffD Offline
                              DrJeffD Offline
                              DrJeff
                              wrote on last edited by DrJeff
                              #42

                              Can this be built with esp8266-03? I got a couple of those sitting here waiting to get used? It looks like I can swap Pin 4 for Pin 16 (or 18 in this picture) Is there something I'm missing?

                              upload-84b2ef8e-b204-4e47-88a7-ddcd10405227

                              YveauxY 1 Reply Last reply
                              0
                              • DrJeffD DrJeff

                                Can this be built with esp8266-03? I got a couple of those sitting here waiting to get used? It looks like I can swap Pin 4 for Pin 16 (or 18 in this picture) Is there something I'm missing?

                                upload-84b2ef8e-b204-4e47-88a7-ddcd10405227

                                YveauxY Offline
                                YveauxY Offline
                                Yveaux
                                Mod
                                wrote on last edited by Yveaux
                                #43

                                @DrJeff GPIO16 is a strange IO pin on some modules as it might be triggering the nReset line. Should work for this ESP-03 though.
                                Make sure to use the latest MySensors library and please post your experiences here so we can bundle them.

                                http://yveaux.blogspot.nl

                                1 Reply Last reply
                                0
                                • YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #44

                                  NodeMcu boards are in!
                                  Fast shipment & very well packed:

                                  2015-09-05 13.26.54.jpg
                                  2015-09-05 13.27.51.jpg

                                  I can upload at 921600 baud (!) without manual reset/bootload from Arduino IDE and LED blink sketch is working.
                                  Next is connecting nRF24 and see if ESP gateway is running without problems.

                                  I'll keep you informed!

                                  http://yveaux.blogspot.nl

                                  1 Reply Last reply
                                  0
                                  • YveauxY Offline
                                    YveauxY Offline
                                    Yveaux
                                    Mod
                                    wrote on last edited by Yveaux
                                    #45

                                    Works like a charm!

                                    This is the NodeMcu board used (Called NodeMcu Devkit v1.0 by the NodeMcu Team. Schematics and layout can be found here)

                                    Radio connection (using MySensors default coloring scheme. IRQ is unused and can be left unconnected):
                                    nrfTop.png
                                    NODEMCU_DEVKIT_V1.0_PINMAP.png
                                    2015-09-05 14.49.01.jpg

                                    The standard ESP8266 Gateway sketch can be used without modification (except for SSID & password).

                                    • Install CP2102 drivers from here.
                                    • Connect NodeMCU board.
                                    • Load the Esp8266Gateway.ino sketch (See Compiling the gateway in the top post)
                                    • Download the sketch. This NodeMcu board can be flashed automaticlly and doesn't need botload/reset buttons to be pressed.
                                    • Open the serial console and watch the board connecting to yout WiFi network.
                                    • Note the IP address assigned to it.
                                    • Now any application capable of communicating with the regular MySensors Ethernet gateway should be able to communicate with the ESP Gateway.
                                    • Enjoy!

                                    Optional step: If you want to use the onboard red LED (GPIO16) to blink when radio activity/error takes place, then change the following:

                                    MyConfig.h

                                    #define WITH_LEDS_BLINKING
                                    

                                    Esp8266Gateway.ino

                                    #ifdef WITH_LEDS_BLINKING
                                    #define RADIO_ERROR_LED_PIN 16  // Error led pin
                                    #define RADIO_RX_LED_PIN    16  // Receive led pin
                                    #define RADIO_TX_LED_PIN    16  // the PCB, on board LED
                                    #endif
                                    

                                    http://yveaux.blogspot.nl

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

                                      Thanks @Yveaux,

                                      I'll probably copy (most) of the previous post to the main site.

                                      YveauxY 1 Reply Last reply
                                      0
                                      • hekH hek

                                        Thanks @Yveaux,

                                        I'll probably copy (most) of the previous post to the main site.

                                        YveauxY Offline
                                        YveauxY Offline
                                        Yveaux
                                        Mod
                                        wrote on last edited by
                                        #47

                                        @hek said:

                                        I'll probably copy (most) of the previous post to the main site.

                                        Yeah, no probs. I already thought you would.
                                        Maybe you should 'MySensor' the devkit pinout a little to have it fit in.

                                        http://yveaux.blogspot.nl

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          Mike Cayouette
                                          wrote on last edited by
                                          #48

                                          Hi

                                          Excellent build and exactly what I have been looking for. I just got my ESP-12 this week and I am about to build this. I just have one question, what is the "Inclusion mode" for? I tried to figure it out by look at the sketch and it's not quite clear.

                                          Thank you for everything you have done to get this to where it's at.

                                          Mike

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


                                          11

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