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. Bug Reports
  3. ESP8266 WiFi gateway issue

ESP8266 WiFi gateway issue

Scheduled Pinned Locked Moved Bug Reports
49 Posts 6 Posters 19.9k Views 3 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.
  • DwaltD Offline
    DwaltD Offline
    Dwalt
    wrote on last edited by
    #3

    Why does MsgID#32 provide Heater_sw as the subtype? Something strange going on with the data flowing through the esp...

    Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

    YveauxY 1 Reply Last reply
    0
    • DwaltD Dwalt

      Why does MsgID#32 provide Heater_sw as the subtype? Something strange going on with the data flowing through the esp...

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

      @Dwalt said:

      Why does MsgID#32 provide Heater_sw as the subtype? Something strange going on with the data flowing through the esp...

      MsgID#32 is from the serial gateway, as I understand it...

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • YveauxY Yveaux

        @snow Could be a 8 (ATMega32) vs. 32 bit (ESP8266) issue.

        1032       = 0x0000 0408
        1107297279 = 0x4200 03FF
        

        The lower 16 bits are more or less equal.
        Could you post the serial output of the ESP8266 gateway for such a set of LIGHT_LEVELs and a screenshot of MYSController as you did before ?

        snowS Offline
        snowS Offline
        snow
        wrote on last edited by
        #5

        @Yveaux I have made another test on two gateways at the same time. Here is the results.
        Serial gateway (Arduino NANO)
        serial_gateway.jpg

        ESP8266 gateway (ESP-07)
        esp_gateway.jpg

        Console output from ESP gateway

        ESP8266 MySensors Gateway
        Connecting to 00000000
        ...................Connected!
        IP: 192.168.0.30
        0;0;3;0;9;gateway started, id=0, parent=0, distance=0
        Client 0 connected
        0;0;3;0;14;Gateway startup complete.
        0;0;3;0;9;read: 1-1-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5
        1;255;0;0;17;1.5
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
        1;255;3;0;6;0
        Client 0: 1;255;3;0;6;M
        0;0;3;0;9;send: 0-0-1-1 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=11,pt=0,l=22,sg=0:Lux/Temp/Humidity
        1;255;3;0;11;Lux/Temp/Humidity +Bat
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
        1;255;3;0;12;1.0
        0;0;3;0;9;read: 1-1-0 s=0,c=0,t=16,pt=0,l=0,sg=0:
        1;0;0;0;16;
        0;0;3;0;9;read: 1-1-0 s=1,c=0,t=7,pt=0,l=0,sg=0:
        1;1;0;0;7;
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:101
        1;255;3;0;0;101
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:46
        1;0;1;0;23;46
        0;0;3;0;9;read: 1-1-0 s=2,c=1,t=0,pt=7,l=5,sg=0:23.0
        1;2;1;0;0;23.0
        0;0;3;0;9;read: 1-1-0 s=1,c=1,t=1,pt=7,l=5,sg=0:33.0
        1;1;1;0;1;33.0
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
        1;255;3;0;0;93
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296452
        1;0;1;0;23;1107296452
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296619
        1;0;1;0;23;1107296619
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296632
        1;0;1;0;23;1107296632
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296315
        1;0;1;0;23;1107296315
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:92
        1;255;3;0;0;92
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
        1;255;3;0;0;93
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:92
        1;255;3;0;0;92
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
        1;255;3;0;0;93
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296724
        1;0;1;0;23;1107296724
        0;0;3;0;9;read: 1-1-0 s=255,c=2,t=0,pt=1,l=1,sg=0:92
        1;255;2;0;0;92
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296536
        1;0;1;0;23;1107296536
        0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
        1;255;3;0;0;93
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=22,pt=3,l=2,sg=0:1107296631
        1;0;1;0;22;1107296631
        0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296622
        1;0;1;0;23;1107296622
        

        I suspect a problem with the length or definition of variables, but I'm not a good programmer. ;)

        1107296631 - 383 = 0x4200000
        1107296622 - 366 = 0x4200000
        
        YveauxY 1 Reply Last reply
        0
        • DwaltD Offline
          DwaltD Offline
          Dwalt
          wrote on last edited by
          #6

          Msg54 again shows subtype 22, which is for V_HVAC_SPEED. It occurred on both the serial gateway example (top of thread) and the ESP. It seems to mess up the message at the node level. Perhaps not a problem with the gateway.

          Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

          1 Reply Last reply
          0
          • snowS snow

            @Yveaux I have made another test on two gateways at the same time. Here is the results.
            Serial gateway (Arduino NANO)
            serial_gateway.jpg

            ESP8266 gateway (ESP-07)
            esp_gateway.jpg

            Console output from ESP gateway

            ESP8266 MySensors Gateway
            Connecting to 00000000
            ...................Connected!
            IP: 192.168.0.30
            0;0;3;0;9;gateway started, id=0, parent=0, distance=0
            Client 0 connected
            0;0;3;0;14;Gateway startup complete.
            0;0;3;0;9;read: 1-1-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5
            1;255;0;0;17;1.5
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
            1;255;3;0;6;0
            Client 0: 1;255;3;0;6;M
            0;0;3;0;9;send: 0-0-1-1 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=11,pt=0,l=22,sg=0:Lux/Temp/Humidity
            1;255;3;0;11;Lux/Temp/Humidity +Bat
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
            1;255;3;0;12;1.0
            0;0;3;0;9;read: 1-1-0 s=0,c=0,t=16,pt=0,l=0,sg=0:
            1;0;0;0;16;
            0;0;3;0;9;read: 1-1-0 s=1,c=0,t=7,pt=0,l=0,sg=0:
            1;1;0;0;7;
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:101
            1;255;3;0;0;101
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:46
            1;0;1;0;23;46
            0;0;3;0;9;read: 1-1-0 s=2,c=1,t=0,pt=7,l=5,sg=0:23.0
            1;2;1;0;0;23.0
            0;0;3;0;9;read: 1-1-0 s=1,c=1,t=1,pt=7,l=5,sg=0:33.0
            1;1;1;0;1;33.0
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
            1;255;3;0;0;93
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296452
            1;0;1;0;23;1107296452
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296619
            1;0;1;0;23;1107296619
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296632
            1;0;1;0;23;1107296632
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296315
            1;0;1;0;23;1107296315
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:92
            1;255;3;0;0;92
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
            1;255;3;0;0;93
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:92
            1;255;3;0;0;92
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
            1;255;3;0;0;93
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296724
            1;0;1;0;23;1107296724
            0;0;3;0;9;read: 1-1-0 s=255,c=2,t=0,pt=1,l=1,sg=0:92
            1;255;2;0;0;92
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296536
            1;0;1;0;23;1107296536
            0;0;3;0;9;read: 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:93
            1;255;3;0;0;93
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=22,pt=3,l=2,sg=0:1107296631
            1;0;1;0;22;1107296631
            0;0;3;0;9;read: 1-1-0 s=0,c=1,t=23,pt=3,l=2,sg=0:1107296622
            1;0;1;0;23;1107296622
            

            I suspect a problem with the length or definition of variables, but I'm not a good programmer. ;)

            1107296631 - 383 = 0x4200000
            1107296622 - 366 = 0x4200000
            
            YveauxY Offline
            YveauxY Offline
            Yveaux
            Mod
            wrote on last edited by
            #7

            @snow said:

            I suspect a problem with the length or definition of variables,

            Agree. Possibly a variable somewhere that has a different size on ESP.
            Hopefully tonight I can have a better look.

            http://yveaux.blogspot.nl

            YveauxY 1 Reply Last reply
            0
            • YveauxY Yveaux

              @snow said:

              I suspect a problem with the length or definition of variables,

              Agree. Possibly a variable somewhere that has a different size on ESP.
              Hopefully tonight I can have a better look.

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

              @Yveaux said:

              Possibly a variable somewhere that has a different size on ESP

              Pretty sure I found the cause: the messages exchanged between sensor and gateway contain int types.
              These have a size of 2 bytes on Arduino and 4 bytes on ESP.
              An int sent from the Arduino is sent as 2 bytes, but the ESP expects 4. The upper 2 will be filled with garbage.

              Still a hypothesis which has to be verified & fixed.
              To be continued!

              http://yveaux.blogspot.nl

              1 Reply Last reply
              0
              • snowS snow

                Hi,
                I have one battery powered node build on Arduino Mini Pro 3.3V with combined 2 sensors DHT11 and BH1750. The node is working OK and give me correct values from sensors on Arduino serial console.

                The output from this node connected to Serial gateway is also OK.
                serial_gateway.jpg

                And this is the output from the same node connected to ESP8266 gateway. As You can see, only the first output of LIGHT_LEVEL is correct.
                esp8266_gateway.jpg

                Could anyone check this?

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

                @snow Please try the code in the development branch , where hek did an excellent job to standardize on datatypes being exchanged between nodes.
                This will probably solve your issue.

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • snowS Offline
                  snowS Offline
                  snow
                  wrote on last edited by
                  #10

                  The development version is working OK :satisfied:
                  Thanks guys for your hard work.

                  YveauxY 1 Reply Last reply
                  0
                  • snowS snow

                    The development version is working OK :satisfied:
                    Thanks guys for your hard work.

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

                    @snow great to hear!
                    Glad I could help (and my hunch was correct :-) )

                    http://yveaux.blogspot.nl

                    1 Reply Last reply
                    0
                    • HoffanH Offline
                      HoffanH Offline
                      Hoffan
                      wrote on last edited by
                      #12

                      @snow

                      Did you use the Development version of the ESP8266 Wifi gatewavy or for the sensor

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

                        @Hoffan
                        You should probably use it on both sides to be sure to get the same size on the data types.

                        1 Reply Last reply
                        0
                        • HoffanH Offline
                          HoffanH Offline
                          Hoffan
                          wrote on last edited by Hoffan
                          #14

                          All the sensors that i have include before i upgrade the ESP8266 Wifi GW is now working

                          But its not working to include more, Nothing happens in Veran when i press start
                          but the gateway say this

                          0;0;3;0;9Client 0: 0;0;3;0;5;1t version

                          every time i press start

                          hekH 1 Reply Last reply
                          0
                          • HoffanH Hoffan

                            @snow

                            Did you use the Development version of the ESP8266 Wifi gatewavy or for the sensor

                            snowS Offline
                            snowS Offline
                            snow
                            wrote on last edited by snow
                            #15

                            @Hoffan said:

                            Did you use the Development version of the ESP8266 Wifi gatewavy or for the sensor

                            At the moment I only changed the gateway. It's already solved my problem with incorrect values.

                            HoffanH 1 Reply Last reply
                            0
                            • snowS snow

                              @Hoffan said:

                              Did you use the Development version of the ESP8266 Wifi gatewavy or for the sensor

                              At the moment I only changed the gateway. It's already solved my problem with incorrect values.

                              HoffanH Offline
                              HoffanH Offline
                              Hoffan
                              wrote on last edited by
                              #16

                              @snow

                              But is your include button working now?
                              Or maybe you don't use Vera as a controller

                              snowS 1 Reply Last reply
                              0
                              • HoffanH Hoffan

                                All the sensors that i have include before i upgrade the ESP8266 Wifi GW is now working

                                But its not working to include more, Nothing happens in Veran when i press start
                                but the gateway say this

                                0;0;3;0;9Client 0: 0;0;3;0;5;1t version

                                every time i press start

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

                                @Hoffan

                                The print looks a bit weird. I'll have to do some tests.

                                HoffanH 1 Reply Last reply
                                0
                                • HoffanH Hoffan

                                  @snow

                                  But is your include button working now?
                                  Or maybe you don't use Vera as a controller

                                  snowS Offline
                                  snowS Offline
                                  snow
                                  wrote on last edited by
                                  #18

                                  @Hoffan No. I'm using DomoticZ

                                  1 Reply Last reply
                                  0
                                  • hekH hek

                                    @Hoffan

                                    The print looks a bit weird. I'll have to do some tests.

                                    HoffanH Offline
                                    HoffanH Offline
                                    Hoffan
                                    wrote on last edited by
                                    #19

                                    @hek

                                    That sounds good, Just ask if you want me to test something..

                                    1 Reply Last reply
                                    0
                                    • HoffanH Offline
                                      HoffanH Offline
                                      Hoffan
                                      wrote on last edited by
                                      #20

                                      @hek

                                      Any News here ?

                                      1 Reply Last reply
                                      0
                                      • snowS Offline
                                        snowS Offline
                                        snow
                                        wrote on last edited by
                                        #21

                                        Having another problem with a ESP8266 running as the gateway. Sensor build on Arduino Mini Pro loaded with example sketch DimmableLightWithRotaryEncoderButton.ino. Sensor and gateway firmware compiled from latest development branch v1.6 library.
                                        The controller is a domoticz.

                                        This is a output on the gateway console when I turn rotary encoder on the sensor.

                                        0;0;3;0;14;Gateway startup complete.
                                        0;0;3;0;2;1.6.0-beta
                                        3;1;1;0;3;0
                                        3;1;1;0;3;8
                                        3;1;1;0;3;12
                                        3;1;1;0;3;16
                                        3;1;1;0;3;24
                                        3;1;1;0;3;30
                                        3;1;1;0;3;36
                                        3;1;1;0;3;44
                                        3;1;1;0;3;58
                                        3;1;1;0;3;76
                                        3;1;1;0;3;96
                                        3;1;1;0;3;100
                                        

                                        This is the output from gateway console when I move dimmer slider on the Domoticz

                                        3;1;1;1;3;87t Version
                                        3;1;1;1;3;80t Version
                                        3;1;1;1;3;53t Version
                                        3;1;1;1;3;47t Version
                                        3;1;1;1;3;33t Version
                                        3;1;1;1;3;20t Version
                                        3;1;1;1;3;13t Version
                                        3;1;1;1;3;73t Version
                                        

                                        The problem is that the ESP8266 gateway append unnecessary characters t Version at the end of each line.
                                        Also when dimmer slider is on the position 6%, gateway output is 3;1;1;1;3;73t Version Correct value should be 7 not 73

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

                                          @snow

                                          Could you perhaps enable "#define MY_DEBUG" in the gateway sketch?

                                          Would alos be interesting to see the result when you add

                                          Serial.println(inputString);

                                          Here:
                                          https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MyProtocolMySensors.cpp#L36

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


                                          12

                                          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