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.9k 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.
  • B bp_968

    I have the exact hardware in this setup but can't even get to the point where the hardware is a problem! I'm having compile errors during verify that make no sense and that I can't seem to find in the forums using search:

    In file included from Esp8266Gateway.ino:69:0:
    C:\Users\xxxxx\Documents\Arduino\libraries\SPI/SPI.h:982:8: error: 'SPIClass' does not name a type
    extern SPIClass SPI;

    Any suggestions? I'm running windows 10 and Arduino 1.6.5 with the most current esp8266 board files through board manager.

    Apparently me and anything arduino related are like oil and water, yet I keep buying the stuff.

    B Offline
    B Offline
    bp_968
    wrote on last edited by
    #210

    @bp_968 said:

    I have the exact hardware in this setup but can't even get to the point where the hardware is a problem! I'm having compile errors during verify that make no sense and that I can't seem to find in the forums using search:

    In file included from Esp8266Gateway.ino:69:0:
    C:\Users\xxxxx\Documents\Arduino\libraries\SPI/SPI.h:982:8: error: 'SPIClass' does not name a type
    extern SPIClass SPI;

    Any suggestions? I'm running windows 10 and Arduino 1.6.5 with the most current esp8266 board files through board manager.

    Apparently me and anything arduino related are like oil and water, yet I keep buying the stuff.

    I tried this on my laptop and it worked fine (the compile verify did anyway) so I'll be reinstalling the IDE and trying again and hopefully that resolves my issues!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tjay4x4
      wrote on last edited by
      #211

      Yesterday I have successfully installed the ESP8266 module and it works fine, but the Vera3 show something strange now.
      ESP.jpg
      Has anyone experienced this?

      YveauxY 1 Reply Last reply
      0
      • T tjay4x4

        Yesterday I have successfully installed the ESP8266 module and it works fine, but the Vera3 show something strange now.
        ESP.jpg
        Has anyone experienced this?

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

        @tjay4x4 Seems like to be an issue again when going from 8-bit to 32-bit architecture.
        Can you connect the ESP to your PC and capture the serial output when connecting to your lights and controlling them?

        http://yveaux.blogspot.nl

        T 1 Reply Last reply
        0
        • YveauxY Yveaux

          @tjay4x4 Seems like to be an issue again when going from 8-bit to 32-bit architecture.
          Can you connect the ESP to your PC and capture the serial output when connecting to your lights and controlling them?

          T Offline
          T Offline
          tjay4x4
          wrote on last edited by tjay4x4
          #213

          @Yveaux Thank you for reply. Here is the serial monitor.When I put 100% light it shows Ok. But 70% and others, shows some digitals. But all working fine! :)
          Insert Code Here

          .................Connected!
          
          0;0;3;0;9;gateway started, id=0, parent=0, distance=0
          0;0;3;0;9;read: 1-8-0 s=0,c=1,t=0,pt=7,l=5,sg=0:33.1
          1;0;1;0;0;33.1
          0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.2
          1;1;1;0;0;44.2
          0;0;3;0;9;read: 1-8-0 s=2,c=1,t=0,pt=7,l=5,sg=0:32.2
          1;2;1;0;0;32.2
          0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.3
          1;1;1;0;0;44.3
          Client 0 connected
          0;0;3;0;14;Gateway startup complete.
          Client 0 disconnected
          0;0;3;0;9;read: 9-8-0 s=4,c=1,t=0,pt=7,l=5,sg=0:27.0
          9;4;1;0;0;27.0
          0;0;3;0;9;read: 9-8-0 s=3,c=1,t=1,pt=7,l=5,sg=0:21.0
          9;3;1;0;1;21.0
          Client 0 connected
          0;0;3;0;14;Gateway startup complete.
          Client 0: 0;0;3;0;2;Get Version
          
          0;0;3;0;2;1.5.1
          Client 0: 11;0;1;1;3;1090519100
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=10,sg=0,st=ok:1090519100
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=10,sg=0:1090519100
          11;0;1;1;3;1090519100
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:805306369
          11;0;1;0;2;805306369
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:805306428
          11;0;1;0;3;805306428
          Client 0: 11;0;1;1;3;0
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=1,sg=0,st=ok:0
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=1,sg=0:0
          11;0;1;1;3;0
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:805306368
          11;0;1;0;2;805306368
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:805306368
          11;0;1;0;3;805306368
          Client 0: 11;0;1;1;3;100
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=3,sg=0,st=ok:100
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=3,sg=0:100
          11;0;1;1;3;100
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
          11;0;1;0;2;1
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:100
          11;0;1;0;3;100
          Client 0: 11;0;1;1;3;80
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:80
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:80
          11;0;1;1;3;80
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
          11;0;1;0;2;1
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:80
          11;0;1;0;3;80
          0;0;3;0;9;read: 1-8-0 s=2,c=1,t=0,pt=7,l=5,sg=0:32.3
          1;2;1;0;0;32.3
          Client 0: 11;0;1;1;3;70
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:70
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:70
          11;0;1;1;3;70
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1107296257
          11;0;1;0;2;1107296257
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:1107296326
          11;0;1;0;3;1107296326
          Client 0: 11;0;1;1;3;1107296326
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=10,sg=0,st=ok:1107296326
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=10,sg=0:1107296326
          11;0;1;1;3;1107296326
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:922746881
          11;0;1;0;2;922746881
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:922746950
          11;0;1;0;3;922746950
          0;0;3;0;9;read: 9-8-0 s=3,c=1,t=1,pt=7,l=5,sg=0:20.0
          9;3;1;0;1;20.0
          Client 0: 11;0;1;1;3;922746950
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=9,sg=0,st=ok:922746950
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=9,sg=0:922746950
          11;0;1;1;3;922746950
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:922746881
          11;0;1;0;2;922746881
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:922746950
          11;0;1;0;3;922746950
          Client 0: 11;0;1;1;3;922746950
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=9,sg=0,st=ok:922746950
          Client 0: 11;0;1;1;3;0
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=1,sg=0,st=ok:0
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=1,sg=0:0
          11;0;1;1;3;0
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:922746880
          11;0;1;0;2;922746880
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:922746880
          11;0;1;0;3;922746880
          Client 0: 11;0;1;1;3;100
          
          0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=3,sg=0,st=ok:100
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=3,sg=0:100
          11;0;1;1;3;100
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
          11;0;1;0;2;1
          0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:100
          11;0;1;0;3;100
          1 Reply Last reply
          0
          • YveauxY Offline
            YveauxY Offline
            Yveaux
            Mod
            wrote on last edited by
            #214

            @tjay4x4 which version of MySensors are you running?

            http://yveaux.blogspot.nl

            T 2 Replies Last reply
            0
            • YveauxY Yveaux

              @tjay4x4 which version of MySensors are you running?

              T Offline
              T Offline
              tjay4x4
              wrote on last edited by
              #215

              @Yveaux I use https://github.com/mysensors/Arduino/archive/master.zip
              Just reupload library
              Some additionl information.
              100%-90%-80%70%-60%-50%- OK 40%-bug :)
              10%-20%-30%-40% -OK 50%-bug

              ESP8266 MySensors Gateway
              Connecting to 1111
              ................Connected!
              IP: 192.168.1.44
              0;0;3;0;9;gateway started, id=0, parent=0, distance=0
              0;0;3;0;9;read: 9-8-0 s=3,c=1,t=1,pt=7,l=5,sg=0:20.0
              9;3;1;0;1;20.0
              0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.5
              1;1;1;0;0;44.5
              Client 0 connected
              0;0;3;0;14;Gateway startup complete.
              Client 0: 0;0;3;0;2;Get Version
              
              0;0;3;0;2;1.5.1
              Client 0: 11;0;1;1;3;0
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=1,sg=0,st=ok:0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=1,sg=0:0
              11;0;1;1;3;0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:536870912
              11;0;1;0;2;536870912
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:536870912
              11;0;1;0;3;536870912
              Client 0: 11;0;1;1;3;100
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=3,sg=0,st=ok:100
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=3,sg=0:100
              11;0;1;1;3;100
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:100
              11;0;1;0;3;100
              Client 0: 11;0;1;1;3;80
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:80
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:80
              11;0;1;1;3;80
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:80
              11;0;1;0;3;80
              Client 0: 11;0;1;1;3;70
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:70
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:70
              11;0;1;1;3;70
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:70
              11;0;1;0;3;70
              Client 0: 11;0;1;1;3;60
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:60
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:60
              11;0;1;1;3;60
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:60
              11;0;1;0;3;60
              0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.6
              1;1;1;0;0;44.6
              Client 0: 11;0;1;1;3;50
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:50
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:50
              11;0;1;1;3;50
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1107296257
              11;0;1;0;2;1107296257
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:1107296306
              11;0;1;0;3;1107296306
              0;0;3;0;9;read: 7-5-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.7
              7;0;1;0;0;30.7
              0;0;3;0;9;read: 3-2-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.2
              3;0;1;0;0;30.2
              0;0;3;0;9;read: 7-5-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.6
              7;0;1;0;0;30.6
              0;0;3;0;9;read: 3-2-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.1
              3;0;1;0;0;30.1
              0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.5
              1;1;1;0;0;44.5
              Client 0: 11;0;1;1;3;0
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=1,sg=0,st=ok:0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=1,sg=0:0
              11;0;1;1;3;0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1107296256
              11;0;1;0;2;1107296256
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:1107296256
              11;0;1;0;3;1107296256
              Client 0: 11;0;1;1;3;100
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=3,sg=0,st=ok:100
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=3,sg=0:100
              11;0;1;1;3;100
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:100
              11;0;1;0;3;100
              Client 0: 11;0;1;1;3;0
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=1,sg=0,st=ok:0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=1,sg=0:0
              11;0;1;1;3;0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:0
              11;0;1;0;2;0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:0
              11;0;1;0;3;0
              Client 0: 11;0;1;1;3;10
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:10
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:10
              11;0;1;1;3;10
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:10
              11;0;1;0;3;10
              Client 0: 11;0;1;1;3;20
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:20
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:20
              11;0;1;1;3;20
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:20
              11;0;1;0;3;20
              Client 0: 11;0;1;1;3;30
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:30
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:30
              11;0;1;1;3;30
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:30
              11;0;1;0;3;30
              0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.6
              1;1;1;0;0;44.6
              Client 0: 11;0;1;1;3;40
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=2,sg=0,st=ok:40
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=2,sg=0:40
              11;0;1;1;3;40
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1107296257
              11;0;1;0;2;1107296257
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:1107296296
              11;0;1;0;3;1107296296
              Client 0: 11;0;1;1;3;100
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=3,sg=0,st=ok:100
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=3,sg=0:100
              11;0;1;1;3;100
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:1
              11;0;1;0;2;1
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:100
              11;0;1;0;3;100
              Client 0: 11;0;1;1;3;0
              
              0;0;3;0;9;send: 0-0-11-11 s=0,c=1,t=3,pt=0,l=1,sg=0,st=ok:0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=0,l=1,sg=0:0
              11;0;1;1;3;0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=2,pt=2,l=2,sg=0:0
              11;0;1;0;2;0
              0;0;3;0;9;read: 11-11-0 s=0,c=1,t=3,pt=2,l=2,sg=0:0
              11;0;1;0;3;0
              0;0;3;0;9;read: 7-5-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.7
              7;0;1;0;0;30.7
              0;0;3;0;9;read: 1-8-0 s=1,c=1,t=0,pt=7,l=5,sg=0:44.5
              1;1;1;0;0;44.5
              0;0;3;0;9;read: 9-8-0 s=3,c=1,t=1,pt=7,l=5,sg=0:21.0
              9;3;1;0;1;21.0
              0;0;3;0;9;read: 3-2-0 s=0,c=1,t=0,pt=7,l=5,sg=0:30.2
              3;0;1;0;0;30.2
              0;0;3;0;9;read: 1-8-0 s=0,c=1,t=0,pt=7,l=5,sg=0:33.4
              1;0;1;0;0;33.4
              0;0;3;0;9;read: 9-8-0 s=3,c=1,t=1,pt=7,l=5,sg=0:20.0
              9;3;1;0;1;20.0
              
              
              1 Reply Last reply
              0
              • YveauxY Yveaux

                @tjay4x4 which version of MySensors are you running?

                T Offline
                T Offline
                tjay4x4
                wrote on last edited by
                #216

                @Yveaux Now everything working! I reinstall all "Arduino-master" to Arduino 1.6 folder and now ALL Ok. Sorry for disturb. Thank you!!!

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

                  @tjay4x4 try development version of MySensors. This thread discussions a similar issue:
                  http://forum.mysensors.org/topic/2118/esp8266-wifi-gateway-issue/2

                  http://yveaux.blogspot.nl

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

                    @tjay4x4 Just crossed my reply! Great it's working now!

                    http://yveaux.blogspot.nl

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      robosensor
                      wrote on last edited by robosensor
                      #219

                      Yesterday I switched gateway hardware from serial gateway based on arduino pro mini 3.3V and nrf24l01+ (connected directly to uart port of my mikrotik router) to esp8266 nodemcu and nrf24l01+ (exactly as at this page: http://www.mysensors.org/build/esp8266_gateway, using GatewayESP8266 sketch from 1.6 branch, revision https://github.com/mysensors/Arduino/tree/1035f84a431a8f591d31100c3e73e99a8245e345).

                      I have 4 nodes with ~27 sensors total, half of sensors sending data every 10 seconds, another sensors send data only if environment changed.

                      After switching to esp8266 my gateway started loosing packets (messages) from my sensor nodes:
                      mysensors_esp8266.png
                      Left side of graphs is esp8266, right side is old pro mini serial gateway, sensors sending data every 10 seconds. Distance between gateways is about 5-10 centimeters. Both nrf24l01+ boards oriented in the same direction.

                      nrf24l01+ board isn't changed at all (I'm using old board from pro mini serial gateway).

                      Also, I have tried different nrf24l01+ boards (different PCBs and different chip revisions, but seems like all of them are fake china chips). I have tried soldering 220 uF electrolytic and 0.1 uF ceramic capacitors directly to nrf24l01+ power pins. But nothing changed. Esp8266 gateway is losing messages.

                      Switching back to pro mini serial gateway is completely solves issue (as shown in graph above).

                      What else can I try to fix this? Could it be interference between wifi chip and nrf24? Or, maybe, this is software problem? Maybe non-interrupt driven polling of nrf24l01 causes loosing messages coming too often?

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

                        @robosensor

                        Interesting graph... But I have no immediate answer to you.

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          robosensor
                          wrote on last edited by robosensor
                          #221

                          @hek graphs are drawn by Zabbix. My own Perl script connects directly to gateway, reads sensor data and sends this data directly to Zabbix.

                          Also, I have tried to write raw data from gateway directly to file and execute "tail -f logfile.txt | grep sensor-specific-id". With old pro mini gateway data from sensor comes every 10 seconds. From esp8266 gateway sensor data comes very irregular.

                          Also, every send() call in all my nodes followed by wait(25) call to reduce possible power issues and interference issues.

                          UPDATE: I have recompiled esp8266-gateway sketch with debugging enabled, but I get the same results with loosing messages then I connecting directly to uart port of esp8266 uart-usb converter.

                          1 Reply Last reply
                          0
                          • R robosensor

                            Yesterday I switched gateway hardware from serial gateway based on arduino pro mini 3.3V and nrf24l01+ (connected directly to uart port of my mikrotik router) to esp8266 nodemcu and nrf24l01+ (exactly as at this page: http://www.mysensors.org/build/esp8266_gateway, using GatewayESP8266 sketch from 1.6 branch, revision https://github.com/mysensors/Arduino/tree/1035f84a431a8f591d31100c3e73e99a8245e345).

                            I have 4 nodes with ~27 sensors total, half of sensors sending data every 10 seconds, another sensors send data only if environment changed.

                            After switching to esp8266 my gateway started loosing packets (messages) from my sensor nodes:
                            mysensors_esp8266.png
                            Left side of graphs is esp8266, right side is old pro mini serial gateway, sensors sending data every 10 seconds. Distance between gateways is about 5-10 centimeters. Both nrf24l01+ boards oriented in the same direction.

                            nrf24l01+ board isn't changed at all (I'm using old board from pro mini serial gateway).

                            Also, I have tried different nrf24l01+ boards (different PCBs and different chip revisions, but seems like all of them are fake china chips). I have tried soldering 220 uF electrolytic and 0.1 uF ceramic capacitors directly to nrf24l01+ power pins. But nothing changed. Esp8266 gateway is losing messages.

                            Switching back to pro mini serial gateway is completely solves issue (as shown in graph above).

                            What else can I try to fix this? Could it be interference between wifi chip and nrf24? Or, maybe, this is software problem? Maybe non-interrupt driven polling of nrf24l01 causes loosing messages coming too often?

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

                            @robosensor What strikes me is the fact that most of the time not all sensor values seem to disappear at the same time. A failing WiFi connection would be the most likely cause when all dis/reappear at the same time (like at 13:44 and 13:22).
                            However, most of the time at least one sensor seems to report its values correctly. IMO This rules out the radio.
                            Is there anything interesting in the serial logs?

                            http://yveaux.blogspot.nl

                            1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              robosensor
                              wrote on last edited by
                              #223

                              @Yveaux thank you for your reply. It is not failing wifi connection, as the same problem exists then I using serial connection to esp8266 (via on-board usb-uart converter on nodemcu board).

                              Nothing interesting in the serial logs (with debug mode enabled), just random absence of sensor data. Seems like I should connect sensor node to collect debug logs from node side.

                              Also speed is changed - much faster CPU (80 MHz vs 8 MHz) and much faster connection (wifi vs uart 9600 bps). Maybe this affects.

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                robosensor
                                wrote on last edited by
                                #224

                                Seems like problem with loosing messages is gateway firmware related.

                                Then I connect two controllers (my own perl script and MYSController 0.1.2.282) to esp8266 gateway (#define MY_GATEWAY_MAX_CLIENTS 2), both controllers receiving exactly the same data from gateway, but messages lost even more.

                                mysensors_esp8266_two_controllers.png

                                1 on graphs = one controller connected
                                2 on graphs = two controllers connected.

                                I'm not familiar with esp8266 network programming, but could it be that firmware looses incoming packets from nrf24l01+ due to blocking call to wifi-related network functions? Seems like during sending data to wifi network firmware does not have time to pick up all incoming packets from nrf24l01+ chip.

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  robosensor
                                  wrote on last edited by
                                  #225

                                  I think I found problem. As I said before, seems like WiFi's clients[i].write() call blocks thread for a very long time.

                                  I added logging of write() time:

                                  		// Send message to connected clients
                                  		#if defined(MY_GATEWAY_ESP8266)
                                  			unsigned long start_time = hwMillis();
                                  			for (uint8_t i = 0; i < ARRAY_SIZE(clients); i++)
                                  			{
                                  				if (clients[i] && clients[i].connected())
                                  				{
                                  					clients[i].write((uint8_t*)_ethernetMsg, strlen(_ethernetMsg));
                                  				}
                                  			}
                                  			debug(PSTR("WiFi transaction time: %u ms\n"), hwMillis() - start_time);
                                  		#else
                                  			_ethernetServer.write(_ethernetMsg);
                                  		#endif
                                  

                                  And got following results:
                                  For Perl script from FreeBSD server in another country (ping to server is about 55 milliseconds):

                                  0;0;3;0;9;WiFi transaction time: 141 ms
                                  0;0;3;0;9;read: 2-2-0 s=1,c=1,t=23,pt=2,l=2,sg=0:98
                                  0;0;3;0;9;WiFi transaction time: 141 ms
                                  0;0;3;0;9;read: 2-2-0 s=6,c=1,t=43,pt=3,l=2,sg=0:2
                                  0;0;3;0;9;WiFi transaction time: 140 ms
                                  0;0;3;0;9;read: 1-1-0 s=105,c=1,t=0,pt=7,l=5,sg=0:27.5000
                                  0;0;3;0;9;WiFi transaction time: 136 ms
                                  0;0;3;0;9;read: 1-1-0 s=106,c=1,t=0,pt=7,l=5,sg=0:52.8750
                                  0;0;3;0;9;WiFi transaction time: 140 ms
                                  0;0;3;0;9;read: 1-1-0 s=107,c=1,t=0,pt=7,l=5,sg=0:45.9375
                                  0;0;3;0;9;WiFi transaction time: 142 ms
                                  0;0;3;0;9;read: 1-1-0 s=108,c=1,t=0,pt=7,l=5,sg=0:34.4375
                                  0;0;3;0;9;WiFi transaction time: 137 ms
                                  0;0;3;0;9;read: 1-1-0 s=1,c=1,t=16,pt=0,l=1,sg=0:0
                                  0;0;3;0;9;WiFi transaction time: 143 ms
                                  

                                  Connection from LAN (windows telnet client):

                                  0;0;3;0;9;read: 3-3-0 s=1,c=1,t=23,pt=2,l=2,sg=0:61
                                  0;0;3;0;9;WiFi transaction time: 209 ms
                                  0;0;3;0;9;read: 4-4-0 s=1,c=1,t=24,pt=2,l=2,sg=0:152
                                  0;0;3;0;9;WiFi transaction time: 201 ms
                                  0;0;3;0;9;read: 4-4-0 s=2,c=1,t=24,pt=2,l=2,sg=0:43
                                  0;0;3;0;9;WiFi transaction time: 212 ms
                                  0;0;3;0;9;read: 4-4-0 s=3,c=1,t=24,pt=2,l=2,sg=0:129
                                  0;0;3;0;9;WiFi transaction time: 209 ms
                                  0;0;3;0;9;read: 4-4-0 s=4,c=1,t=24,pt=2,l=2,sg=0:147
                                  0;0;3;0;9;WiFi transaction time: 208 ms
                                  0;0;3;0;9;read: 2-2-0 s=102,c=1,t=0,pt=7,l=5,sg=0:4.2500
                                  0;0;3;0;9;WiFi transaction time: 221 ms
                                  0;0;3;0;9;read: 2-2-0 s=103,c=1,t=0,pt=7,l=5,sg=0:27.4375
                                  0;0;3;0;9;WiFi transaction time: 208 ms
                                  0;0;3;0;9;read: 2-2-0 s=104,c=1,t=0,pt=7,l=5,sg=0:23.3750
                                  0;0;3;0;9;WiFi transaction time: 210 ms
                                  0;0;3;0;9;read: 2-2-0 s=3,c=1,t=1,pt=7,l=5,sg=0:99.9
                                  0;0;3;0;9;WiFi transaction time: 208 ms
                                  

                                  Seems like many packets coming to NRF24L01+ in this time interval (140-200 milliseconds) and this causes NRF buffer overflow and packet loss.

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

                                    Damn, 200 msec is a pretty long time.

                                    YveauxY 1 Reply Last reply
                                    0
                                    • hekH hek

                                      Damn, 200 msec is a pretty long time.

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

                                      @hek Yeah, but is this significantly longer than for a wired connection?
                                      Only real solution would be to switch to interrupt based message handling for the MySensors network (hopefully the ESP stack can handle this...)
                                      @robosensor Are these long delays (only) caused by the fact that this is a long distance connection?
                                      How is your mileage for a server on e.g. the same lan?

                                      http://yveaux.blogspot.nl

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

                                        Exactly same problem here with RFM69W Radio. With 2 clients, i loose more packets. Both controller and ESP are on the same LAN. No probelm with Serial Gateway on Jeelink v3.

                                        1 Reply Last reply
                                        0
                                        • R Offline
                                          R Offline
                                          robosensor
                                          wrote on last edited by robosensor
                                          #229

                                          @Yveaux seems like delays caused by low-level network/tcp code or settings of receiving side (maybe something as TCP ACK packet delays or Nagle algorithm or something like this).

                                          ESP8266 connected directly to Mikrotik RB2011 router.

                                          Then I connect from external server (ping to server is about 55 milliseconds, FreeBSD 9.3, Perl), delays about 140 milliseconds.
                                          Then I connect from windows-based computer, connected directly to router, delays about 200 milliseconds (both windows telnet and PuTTy).
                                          For 2 parallel above connections delays about 350 milliseconds.

                                          Then I connect from router's internal telnet client, delays about 1-2 milliseconds
                                          Then I connect from android-based phone (phone connected to router via wifi, using ConnectBot software), delays vary from 3-5 milliseconds (mostly) to 100-150 milliseconds (less frequently).

                                          Seems like interrupts for nrf24 is the only solution. Seems like esp8266 gateway with such delays is completely unusable with high packet rates. With ~150 milliseconds delays no more than 6 messages/second packet rate allowed.

                                          Just to reference: I'm using Arduino 1.6.5 with esp8266 libraries version 2.0.0 installed.

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


                                          18

                                          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