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.
  • R Offline
    R Offline
    ridge
    wrote on last edited by
    #85

    I will report a successful first experience with MySensors using the esp8266 WiFi Gateway and a digital switch nRF24L01+ MySensors node.
    Thank you Yveaux and hek! nRF24L01+ nodes are the only way to go for battery power!
    I look forward to learning more about the MySensors architecture.
    I am currently using openHAB as my controller.

    For the MQTT library, I will vote for the https://github.com/Imroy/pubsubclient library if you decide to create a MQTT version of the WiFi Gateway. I have this library installed on 8 esp8266 nodes operating for over two months without any problems.

    The knolleary version has had some recent updates since I installed the lmroy version, so it may work fine with Mosquitto MQTT 3.1.1 instead of MQTT 3.1 only.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vickey
      wrote on last edited by vickey
      #86

      Hi Friends

      I am having an issue with my NRF24L01+. If I change gw.begin() to anything like below,

      gw.begin(incomingMessage, 0, true, 0);

      I get an error "radio init fail"

      And I am now trying ESP-8266 12E module along with nrf24L01+ (genuine) transceiver to built wifi gateway, which I'll later use as gateway for openhab. I am having a similar issue, Here is the log I get through serial monitor.

      **Connecting to Ahmed
      ...........Connected!
      IP: 192.168.0.31
      0;0;3;0;9;radio init fail

      ctx: cont
      sp: 3ffebdf0 end: 3ffec010 offset: 01b0

      stack>>>
      3ffebfa0: 0000007f 3ffec03c 40201cac 3ffeaff0
      3ffebfb0: 40202320 00000001 00000000 40201d4f
      3ffebfc0: 1f00a8c0 00ffffff 0100a8c0 3ffec03c
      3ffebfd0: 3ffe9328 3ffead34 3ffec070 402026ef
      3ffebfe0: 3ffe98a8 1f00a8c0 00000000 00000000
      3ffebff0: 3fffdc20 00000000 3ffec034 40201d1f
      3ffec000: 00000000 00000000 3ffeaff0 40100398
      <<<stack<<<

      ets Jan 8 2013,rst cause:1, boot mode:(3,3)

      load 0x4010f000, len 1264, room 16
      tail 0
      chksum 0x42
      csum 0x42
      ~ld**

      This information runs in a loop again and again. I am using latest library from https://github.com/mysensors/Arduino/tree/master without editing the sample Esp8266Gateway sktech except user name and password. I have followed the connection instruction specified in sample sketch and sketch was successfully uploaded. I am using 101nf capacitors and 10K resistances as specified by https://www.youtube.com/watch?v=JA-0hs5rpMY.
      Everything is working fine except that error. May anyone help me out?

      YveauxY 1 Reply Last reply
      0
      • V vickey

        Hi Friends

        I am having an issue with my NRF24L01+. If I change gw.begin() to anything like below,

        gw.begin(incomingMessage, 0, true, 0);

        I get an error "radio init fail"

        And I am now trying ESP-8266 12E module along with nrf24L01+ (genuine) transceiver to built wifi gateway, which I'll later use as gateway for openhab. I am having a similar issue, Here is the log I get through serial monitor.

        **Connecting to Ahmed
        ...........Connected!
        IP: 192.168.0.31
        0;0;3;0;9;radio init fail

        ctx: cont
        sp: 3ffebdf0 end: 3ffec010 offset: 01b0

        stack>>>
        3ffebfa0: 0000007f 3ffec03c 40201cac 3ffeaff0
        3ffebfb0: 40202320 00000001 00000000 40201d4f
        3ffebfc0: 1f00a8c0 00ffffff 0100a8c0 3ffec03c
        3ffebfd0: 3ffe9328 3ffead34 3ffec070 402026ef
        3ffebfe0: 3ffe98a8 1f00a8c0 00000000 00000000
        3ffebff0: 3fffdc20 00000000 3ffec034 40201d1f
        3ffec000: 00000000 00000000 3ffeaff0 40100398
        <<<stack<<<

        ets Jan 8 2013,rst cause:1, boot mode:(3,3)

        load 0x4010f000, len 1264, room 16
        tail 0
        chksum 0x42
        csum 0x42
        ~ld**

        This information runs in a loop again and again. I am using latest library from https://github.com/mysensors/Arduino/tree/master without editing the sample Esp8266Gateway sktech except user name and password. I have followed the connection instruction specified in sample sketch and sketch was successfully uploaded. I am using 101nf capacitors and 10K resistances as specified by https://www.youtube.com/watch?v=JA-0hs5rpMY.
        Everything is working fine except that error. May anyone help me out?

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

        @vickey the resets you're experiencing are caused by the failure to init the radio. This will cause the MySensors library to enter an endless loop. This will cause the watchdog to trigger and reset the ESP.
        Please try connecting the radio exactly as stated on the MySensors build page (when using NodeMcu hardware) or connect the same way as I did (see first post in this topic).
        Double check your radio connections.

        http://yveaux.blogspot.nl

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vickey
          wrote on last edited by vickey
          #88

          I have checked all the wires and every thing is according to as par advised. I am using 2 separate 3.3 v voltage regulator to power up ESP-8266 12E and nrf24L01+ having common ground, using ESP-8266 breakout board without voltage regulator and nrf24l01+ breakout board with 3.3 v regulator powered by 5v supply.

          GPIO15 connected via 10K pulldown resistor to GND and also connected with CSN of nrf24l016, is this connection correct?

          Moreover, I am using USB to TTL adapter in place of FTDI and TX of ESP-8266 is connected with RX of TTL serial adapter and vice versa, GND of TTL serial adapter is also connected common GND. It's all the difference from your mentioned procedure.

          YveauxY 1 Reply Last reply
          0
          • V vickey

            I have checked all the wires and every thing is according to as par advised. I am using 2 separate 3.3 v voltage regulator to power up ESP-8266 12E and nrf24L01+ having common ground, using ESP-8266 breakout board without voltage regulator and nrf24l01+ breakout board with 3.3 v regulator powered by 5v supply.

            GPIO15 connected via 10K pulldown resistor to GND and also connected with CSN of nrf24l016, is this connection correct?

            Moreover, I am using USB to TTL adapter in place of FTDI and TX of ESP-8266 is connected with RX of TTL serial adapter and vice versa, GND of TTL serial adapter is also connected common GND. It's all the difference from your mentioned procedure.

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

            @vickey could the nrf24 be defective?
            Did you obtain the gateway & MySensors code from my github repository or from MySensors repository?

            http://yveaux.blogspot.nl

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vickey
              wrote on last edited by vickey
              #90

              Sorry When I investigate the wiring throughly, MOSI and MISO was interchanged. Now it has started working but error has changed

              ESP8266 MySensors Gateway
              Connecting to Ahmed
              .......Connected!
              IP: 192.168.0.31
              0;0;3;0;9;gateway started, id=0, parent=0, distance=0
              0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
              0;0;3;0;9;ver mismatch
              0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
              0;0;3;0;9;ver mismatch

              I obtained the code for gateway & MySensors from MySensors repository on github.
              what would be the problem now?

              1 Reply Last reply
              0
              • R Offline
                R Offline
                ridge
                wrote on last edited by ridge
                #91

                I would like to use this tutorial for MySensors in the openHAB program:
                http://forum.mysensors.org/topic/1194/tutorial-openhab-with-serial-gateway

                I have the ESP8266 WiFi gateway working over a telnet session in Putty.

                Is there a way to have openHAB communicate over telnet like a hardwired serial interface?

                Has anyone used this yet?
                https://github.com/openhab/openhab/pull/2832

                YveauxY 1 Reply Last reply
                0
                • R ridge

                  I would like to use this tutorial for MySensors in the openHAB program:
                  http://forum.mysensors.org/topic/1194/tutorial-openhab-with-serial-gateway

                  I have the ESP8266 WiFi gateway working over a telnet session in Putty.

                  Is there a way to have openHAB communicate over telnet like a hardwired serial interface?

                  Has anyone used this yet?
                  https://github.com/openhab/openhab/pull/2832

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

                  @ridge sorry, can't help with that. Everything's MQTT over here :-)

                  http://yveaux.blogspot.nl

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    ridge
                    wrote on last edited by
                    #93

                    Thanks! Are you using this gateway with a controller or is it a proof of concept?

                    It is fun to watch the states respond in a telnet session. I am having trouble finding any mention on how to use this with a controller.

                    YveauxY 1 Reply Last reply
                    0
                    • R ridge

                      Thanks! Are you using this gateway with a controller or is it a proof of concept?

                      It is fun to watch the states respond in a telnet session. I am having trouble finding any mention on how to use this with a controller.

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

                      @ridge its use should be no different then when using the Ethernet gateway (because it is an Ethernet gateway :-) )
                      I'm using it with OpenHab through MQTT and NodeRed through MQTT.

                      http://yveaux.blogspot.nl

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        ridge
                        wrote on last edited by
                        #95

                        Is your setup using this gateway like:

                        MySensors network <=>Gateway <=> Format conversion program <=> MQTT broker <=> openHAB

                        For some reason, I had assumed that the results of the gateway could be used directly in openHAB.

                        hekH YveauxY 2 Replies Last reply
                        0
                        • R ridge

                          Is your setup using this gateway like:

                          MySensors network <=>Gateway <=> Format conversion program <=> MQTT broker <=> openHAB

                          For some reason, I had assumed that the results of the gateway could be used directly in openHAB.

                          hekH Offline
                          hekH Offline
                          hek
                          Admin
                          wrote on last edited by
                          #96

                          @ridge

                          Tried this?
                          http://forum.mysensors.org/topic/1598/openhab-2-0-binding

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            ridge
                            wrote on last edited by
                            #97

                            Thanks hek, OpenHAB 1.7.1 is stable for me. I will probably wait for openHAB 2.0 to get closer to production status before wading in.

                            I understand serial binding.
                            I understand MQTT binding.

                            I am missing something stupid easy in understanding ethernet binding.
                            Do I include the http binding in the addons folder?

                            A serial connected device is defined in an openHAB items file like:
                            Switch HardwareButton "Bell" (Entrance) { serial="/dev/ttyS0" }

                            I just cannot find an example of what an ethernet connected device would use in place of the "serial" definition.

                            hekH 1 Reply Last reply
                            0
                            • R ridge

                              Is your setup using this gateway like:

                              MySensors network <=>Gateway <=> Format conversion program <=> MQTT broker <=> openHAB

                              For some reason, I had assumed that the results of the gateway could be used directly in openHAB.

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

                              @ridge said:

                              Is your setup using this gateway like:

                              MySensors network <=>Gateway <=> Format conversion program <=> MQTT broker <=> openHAB

                              Yes. Production gateway is currently (cabled) ethernet gateway, "Format conversion program" is this perl script and MQTT broker is Mosquitto.
                              Perl script, Mosquitto and OpenHab run on Ubuntu 12.04LTS server PC.

                              http://yveaux.blogspot.nl

                              1 Reply Last reply
                              0
                              • R ridge

                                Thanks hek, OpenHAB 1.7.1 is stable for me. I will probably wait for openHAB 2.0 to get closer to production status before wading in.

                                I understand serial binding.
                                I understand MQTT binding.

                                I am missing something stupid easy in understanding ethernet binding.
                                Do I include the http binding in the addons folder?

                                A serial connected device is defined in an openHAB items file like:
                                Switch HardwareButton "Bell" (Entrance) { serial="/dev/ttyS0" }

                                I just cannot find an example of what an ethernet connected device would use in place of the "serial" definition.

                                hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by
                                #99

                                @ridge

                                You could always use ser2net to emulate a serial port connected to the ethernet gateway from you openhab box.

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  ridge
                                  wrote on last edited by
                                  #100

                                  Thank you hek and Yveaux. I thought I had missed something obvious. For the present with openHAB 1.7.1, a small piece of the wireless sensor data super highway of the future is still under construction! In that case I will certainly study the MySensors gateway to MQTT broker examples closely.

                                  1 Reply Last reply
                                  0
                                  • P Offline
                                    P Offline
                                    Pseudomizer
                                    wrote on last edited by
                                    #101

                                    Hello guys,

                                    I am having issues with this installation. I got everything up and running but it simply doesn't connect to my WiFi Netgear router at home.

                                    I just enabled my hotspot on my cell phone and the gateway did connect successfully and started the gateway master with IP, etc assigned.

                                    When I try to connect to my home WiFi it just keeps on printing dot dot dot in the serial console.

                                    My Netgear has two networks with 2.4Ghz and 5Ghz. I tried both and none of them worked. They are configured with WPA2-PSK [AES] encryption for the passphrase and the passphrase has one special character included. The SSID is 5 characters long and the passphrase is 22 characters long which shouldn't be an issue.

                                    I don't get any error messages in the serial console and my router doesn't show anything in the logs either like the ESP gateway doesn't even try to connect. I don't know how to troubleshoot this from here.

                                    Any help would be appreciated.

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

                                      I also have both 5/2.4Ghz on my router.

                                      When ESP connects is seems to prefer 2,4 GHz / n / WPA2 if that helps.

                                      1 Reply Last reply
                                      0
                                      • P Offline
                                        P Offline
                                        Pseudomizer
                                        wrote on last edited by
                                        #103

                                        This is what I have. 2,4 GHz / n / WPA2 (no TKIP but AES instead so I can go beyond 54Mbit) and it doesn't connect. Just dots coming up.

                                        YveauxY 1 Reply Last reply
                                        0
                                        • P Pseudomizer

                                          This is what I have. 2,4 GHz / n / WPA2 (no TKIP but AES instead so I can go beyond 54Mbit) and it doesn't connect. Just dots coming up.

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

                                          @Pseudomizer Esp8266 is 2.4ghz only.
                                          You could try adding the following line just after hw_init() in the sketch:

                                          Serial.setDebugOutput(true);
                                          

                                          It will dump a lot of ESP WiFi related data, please post the output here. Maybe some will give a hint of what goes wrong.

                                          http://yveaux.blogspot.nl

                                          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.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