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.
  • M Mickey

    I have up and running a mqtt gateway with esp8266 that is connected to ordinary serial gateway (with the arduino) I based it on 2 projects-
    ESPHTTPD and tuanpmt mqtt for esp and all is working fine and deliver the serial gateway messages to cloud based mqtt broker and I also have the benefit of configuring everything by webpages (mqtt params ,wifi params)and use all benefits of http server like serving pictures(favicon)and jquery for all web based configuration like this,and now after I see this project I like to remove the arduino and connect the esp directly to nrf but the native sdk is c and I use eclipse.
    Is it possible to pull all the relative mysensors code from this work (I see it's mainly in c++) and add it to the code in native esp mqtt (which is mainly in c)?

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

    @Mickey I'm afraid it's not that simple... MySensors is purely written in C++, and although this code could be rewritten in C it is a lot of work and requires decent C/C++/MySensors knowledge.
    Did you consider doing it the other way around and port your work to fit in this MySensors gateway?
    Could be a lot less work (depending on how much code you wrote yourself) as C code compiles (almost) without problems in the Arduino IDE.

    http://yveaux.blogspot.nl

    M 1 Reply Last reply
    0
    • YveauxY Yveaux

      @Mickey I'm afraid it's not that simple... MySensors is purely written in C++, and although this code could be rewritten in C it is a lot of work and requires decent C/C++/MySensors knowledge.
      Did you consider doing it the other way around and port your work to fit in this MySensors gateway?
      Could be a lot less work (depending on how much code you wrote yourself) as C code compiles (almost) without problems in the Arduino IDE.

      M Offline
      M Offline
      Mickey
      wrote on last edited by Mickey
      #15

      @Yveaux said:

      @Mickey I'm afraid it's not that simple... MySensors is purely written in C++, and although this code could be rewritten in C it is a lot of work and requires decent C/C++/MySensors knowledge.
      Did you consider doing it the other way around and port your work to fit in this MySensors gateway?
      Could be a lot less work (depending on how much code you wrote yourself) as C code compiles (almost) without problems in the Arduino IDE.

      those esp projects I mention are very extensive to just port them.(mainly the httpd) but I once saw a guy here that made the mysensors code work on the native sdk ide but only wanted to sell the binaries and wouldn't share his code.

      YveauxY 1 Reply Last reply
      0
      • Andy PepA Offline
        Andy PepA Offline
        Andy Pep
        wrote on last edited by
        #16

        i have a few esp8266mod demo bords a node mcu 9.5 a few esp-01, when i get home i will throw a gateway together :) and test all you like ..i do not mind doing alpha or beta testing if needed ..great work btw ...

        also has anyone used this beta .. looks very cool aswell :) http://www.esp8266.com/viewtopic.php?f=29&t=4540

        kind regards
        andy

        YveauxY 1 Reply Last reply
        0
        • M Mickey

          @Yveaux said:

          @Mickey I'm afraid it's not that simple... MySensors is purely written in C++, and although this code could be rewritten in C it is a lot of work and requires decent C/C++/MySensors knowledge.
          Did you consider doing it the other way around and port your work to fit in this MySensors gateway?
          Could be a lot less work (depending on how much code you wrote yourself) as C code compiles (almost) without problems in the Arduino IDE.

          those esp projects I mention are very extensive to just port them.(mainly the httpd) but I once saw a guy here that made the mysensors code work on the native sdk ide but only wanted to sell the binaries and wouldn't share his code.

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

          @Mickey Maybe I don't really understand you application then... The web based configuration link points to a post about runnning gitlab, a local github. I dont get ít, sorry.
          Running a webserver next to the gateway code shouldn't be a problem. The ESP has a lot of spare flash and the Arduino port supports a complete filesystem to read/write to it (see http://arduino.esp8266.com/versions/1.6.5-1044-g170995a/doc/reference.html, section "File system object (SPIFFS)")
          What's to configure apart from SSID & password? This is just a gateway. Once online you can connect to it and stream all data to/from it using any client supporting the Ethernet gateway.

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • Andy PepA Andy Pep

            i have a few esp8266mod demo bords a node mcu 9.5 a few esp-01, when i get home i will throw a gateway together :) and test all you like ..i do not mind doing alpha or beta testing if needed ..great work btw ...

            also has anyone used this beta .. looks very cool aswell :) http://www.esp8266.com/viewtopic.php?f=29&t=4540

            kind regards
            andy

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

            @Andy-Pep said:

            i have a few esp8266mod demo bords a node mcu 9.5 a few esp-01, when i get home i will throw a gateway together :) and test all you like ..i do not mind doing alpha or beta testing if needed ..great work btw ...

            Thanks! Please join me in testing this code!

            also has anyone used this beta .. looks very cool aswell :) http://www.esp8266.com/viewtopic.php?f=29&t=4540

            Nice, but as I stressed in my previous post this seems like overkill for a gateway to me.
            Of course we can cram a lot of extra code and functionality in the ESP. It has a lot of power and someone might even build a whole home automation suite directly in it (anybody? ;-) )
            Let's get this gateway usable, stable and tested. From there you can use it as a base for other applications.

            http://yveaux.blogspot.nl

            1 Reply Last reply
            1
            • Andy PepA Offline
              Andy PepA Offline
              Andy Pep
              wrote on last edited by
              #19

              ok i have used a esp8266mod dev board for my test hooked it up flashed the sketch and domoticz is seeing it ok and relaying my sensor data .. not a painfull process at all :) ..
              will update tomorrow to see if it fails or goes fubar ..but so far so good :P)

              YveauxY 1 Reply Last reply
              0
              • Andy PepA Andy Pep

                ok i have used a esp8266mod dev board for my test hooked it up flashed the sketch and domoticz is seeing it ok and relaying my sensor data .. not a painfull process at all :) ..
                will update tomorrow to see if it fails or goes fubar ..but so far so good :P)

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

                @Andy-Pep Awesome! Good to hear its running without any troubles so far! :+1:
                Maybe I frightened people by writing a too elaborate description how to set things up :dizzy_face:

                http://yveaux.blogspot.nl

                DrJeffD 1 Reply Last reply
                1
                • Andy PepA Offline
                  Andy PepA Offline
                  Andy Pep
                  wrote on last edited by
                  #21

                  to me it was very easy to hook up and get working ..well done Yveaux you have given my collection of esp's a new life :) when my phone recharges ill take a pic and upload it ..i like the way it reboots when connection is lost .. handy feature :)

                  well done kudos to you :)

                  YveauxY 2 Replies Last reply
                  0
                  • YveauxY Yveaux

                    @Andy-Pep Awesome! Good to hear its running without any troubles so far! :+1:
                    Maybe I frightened people by writing a too elaborate description how to set things up :dizzy_face:

                    DrJeffD Offline
                    DrJeffD Offline
                    DrJeff
                    wrote on last edited by
                    #22

                    @Yveaux No you did not scare me away but I'm in loss of time to do this. I look forward to setting my esp gateway up in a week or so. :)

                    YveauxY 1 Reply Last reply
                    0
                    • Andy PepA Andy Pep

                      to me it was very easy to hook up and get working ..well done Yveaux you have given my collection of esp's a new life :) when my phone recharges ill take a pic and upload it ..i like the way it reboots when connection is lost .. handy feature :)

                      well done kudos to you :)

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

                      @Andy-Pep said:

                      i like the way it reboots when connection is lost .. handy feature

                      I wasn't aware of that. Most errors result in watchdog timeouts or access violations and cause a reboot. The Ethernet client has to be robust against this.
                      We need extensive testing to catch these kinds of errors and assure they are handled in a defined way.

                      http://yveaux.blogspot.nl

                      1 Reply Last reply
                      0
                      • DrJeffD DrJeff

                        @Yveaux No you did not scare me away but I'm in loss of time to do this. I look forward to setting my esp gateway up in a week or so. :)

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

                        @DrJeff said:

                        @Yveaux No you did not scare me away

                        A, damn ! Maybe next project then? :facepunch:

                        The problem lies mainly in the vast amount of ESP variants and how to wire them to be able to download and to connect the radio.

                        http://yveaux.blogspot.nl

                        DrJeffD 1 Reply Last reply
                        0
                        • Andy PepA Offline
                          Andy PepA Offline
                          Andy Pep
                          wrote on last edited by
                          #25

                          ok.

                          ill put a serial interface on to it and keep it running for debug data ..ill post up the next 3 hours of data later on this evening ..

                          1 Reply Last reply
                          0
                          • YveauxY Yveaux

                            @DrJeff said:

                            @Yveaux No you did not scare me away

                            A, damn ! Maybe next project then? :facepunch:

                            The problem lies mainly in the vast amount of ESP variants and how to wire them to be able to download and to connect the radio.

                            DrJeffD Offline
                            DrJeffD Offline
                            DrJeff
                            wrote on last edited by DrJeff
                            #26

                            @Yveaux said:

                            @DrJeff said:

                            @Yveaux No you did not scare me away

                            A, damn ! Maybe next project then? :facepunch:

                            The problem lies mainly in the vast amount of ESP variants and how to wire them to be able to download and to connect the radio.

                            Sorry it was supposed to be "No you didn't scare", me auto correct!
                            I'm going to build this for sure!
                            :)

                            1 Reply Last reply
                            0
                            • Andy PepA Andy Pep

                              to me it was very easy to hook up and get working ..well done Yveaux you have given my collection of esp's a new life :) when my phone recharges ill take a pic and upload it ..i like the way it reboots when connection is lost .. handy feature :)

                              well done kudos to you :)

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

                              @Andy-Pep said:

                              i like the way it reboots when connection is lost

                              I cannot replay this situation:

                              • Tried disabling my WiFI network on the router. Gateway keeps running and restores connection correctly when WiFI is enabled again. No reboot observed.
                              • Tried disconnecting telnet session. No reboot.

                              What did you do to cause a reboot?

                              http://yveaux.blogspot.nl

                              1 Reply Last reply
                              0
                              • O Offline
                                O Offline
                                olof
                                wrote on last edited by
                                #28

                                Yes great work is right. thank you

                                1 Reply Last reply
                                0
                                • 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
                                          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