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.8k 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
    #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
                      • P Offline
                        P Offline
                        Pseudomizer
                        wrote on last edited by
                        #105

                        Thanks a lot for this. This helped me troubleshoot the problem and I am surprised why it didn't connect. It couldn't find my SSID name because in the router it is all UPPER case but when I write it on any other machine Windows, Linux, etc to connect to, I always write it lower case with the exception of the first character.

                        In this case I modified the sketch to have the SSID name all in UPPER case and voila it connected.

                        Thanks again for the help here. Much appreciated.

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

                          I was very happy when it connected but now it is resetting itself constantly with this error message:

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

                          Any ideas why?

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

                            I missed one line of error code above:

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

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

                              I tried my Home Wifi and my Cell Hotspot. The crashes occur on both wifi networks. :-(

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

                                @Pseudomizer , Is the esp8266 on a breadboard or is it part of a commercial product like HUZZAH or nodemcu ? I ask because the esp devices can reset themselves from a brownout condition during the WiFi transmit if the power supply circuit is not up to handling the momentary 'high current draw' requirements of the radio. From reading www.esp8266.com, breadboard circuits have caused many hours of troubleshooting enjoyment with the esp8266 parts.

                                I replace the battery packs on these with 2 Amp cell phone charger power supplies. I have 8 under power 24/7 for months with no problems. They are available from multiple vendors.
                                http://www.aliexpress.com/item/Free-shipping-ESP8266-ESP-12-serial-WIFI-Industrial-stable-version-A-full-test-board-Full-IO/32260095422.html?spm=2114.01020208.3.49.0YGvDs&ws_ab_test=201556_7,201527_4_3_2_1_4_71_72_73_74_75,0_0

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

                                  I followed the instructions exactly as shown here and I purchased that exact equipment.

                                  http://www.mysensors.org/build/esp8266_gateway

                                  nodemcu.jpg

                                  I even powered the NRF24L01+ from a different power source just to make sure that power fluctuation is not the issue but it didn't make any difference.

                                  I even tried transfer rates 115k, 57k and 9600 Baud but none of that made any difference either.

                                  I also downloaded the flash eeprom ino program to clear all the data but again, no difference.

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

                                    I even reflashed the ESP8266 with those instructions and then loaded the mysensors ino but still the same outcome. :-(

                                    http://benlo.com/esp8266/esp8266QuickStart.html

                                    YveauxY 1 Reply Last reply
                                    0
                                    • P Pseudomizer

                                      I even reflashed the ESP8266 with those instructions and then loaded the mysensors ino but still the same outcome. :-(

                                      http://benlo.com/esp8266/esp8266QuickStart.html

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

                                      @Pseudomizer did you make any changes to the gateway sketch out the MySensors library/config?
                                      Could you post the output of the gateway just before the crash occurs (it might give an indication of where this crash occurs)

                                      http://yveaux.blogspot.nl

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

                                        The only changes to the sketch are the SSID, the pass and the debug line

                                        Serial.setDebugOutput(true);

                                        as instructed. No other changes were made.

                                        Here the the debug output....you will see multiple resets in a row based on the internal watchdog timer.

                                        ESP8266 MySensors Gateway
                                        Connecting to MYWIFI
                                        scandone
                                        f 0, scandone
                                        .add 0
                                        aid 1
                                        pm open phy_2,type:2 0 0
                                        cnt

                                        connected with MYWIFI, channel 6
                                        dhcp client start...
                                        ......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
                                        .Connected!
                                        IP: 192.168.1.222

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

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

                                        ESP8266 MySensors Gateway
                                        Connecting to MYWIFI
                                        scandone
                                        f 0, scandone
                                        .add 0
                                        aid 1
                                        pm open phy_2,type:2 0 0
                                        cnt

                                        connected with MYWIFI, channel 6
                                        dhcp client start...
                                        .......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
                                        .Connected!
                                        IP: 192.168.1.222

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

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

                                        ESP8266 MySensors Gateway
                                        Connecting to MYWIFI
                                        scandone
                                        f 0, scandone
                                        .add 0
                                        aid 1
                                        pm open phy_2,type:2 0 0
                                        cnt

                                        connected with MYWIFI, channel 6
                                        dhcp client start...
                                        ......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
                                        .Connected!
                                        IP: 192.168.1.222

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

                                          Triple-check your radio wiring.

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


                                          20

                                          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