ESP8266 WiFi gateway port for MySensors
-
-
Hi all,
First, I have to say this is awsome what @Yveaux did, thank you!Sorry if this question takes you back in time. I don't know what channel and id to use for the nodes,I tried channel 97 and id from 1-5 but it is not working..
are you using mesh lib?@Yht said:
I don't know what channel and id to use for the nodes
Just leave the default channel untouched for both sensors and gateway. It should be fine.
The gateway will automatically be assigned ID 0, the nodes can have any fixed ID.
Dynamic ID assignment requires some extra software, as the gateway does not support it. -
I'm also seeing my ESP8266 gateway crash when the controller requests its version.
I had not seen this thread so I started a new topic here: http://forum.mysensors.org/topic/2493/esp8266-wifi-gateway-crashes-and-reboots-when-controller-connects
-
hi,
maybe you have already seen it...but you can get cheap and smaller nodemcu. crazy price! I have ordered some, and waiting for them...
http://fr.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/32529101036.html?spm=2114.06010108.3.1.04LsjX&ws_ab_test=searchweb201556_2_79_78_77_80,searchweb201644_0,searchweb201560_9 -
hi,
maybe you have already seen it...but you can get cheap and smaller nodemcu. crazy price! I have ordered some, and waiting for them...
http://fr.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/32529101036.html?spm=2114.06010108.3.1.04LsjX&ws_ab_test=searchweb201556_2_79_78_77_80,searchweb201644_0,searchweb201560_9 -
Just wanted to chime in and say thank you for this gateway script @Yveaux
I originally had an ethernet gateway for the longest time. But when I changed over to an OnHub router, it stopped working because it doesn't like to handle static IP, and the current branch sketch is too large to enable DHCP. This worked wonderfully with the OnHub out of the box (ver 7390.62.2) and shows up with a hostname of ESP_DA7D8B.
Thanks again!
-
Hi,
When testing the ESP8266MQTTClient (downloaded latest version of the library today) and compiled with the NodeMCU 1.0 ...... option I get an odd result. The message at startup is (please disregard the "Radio init fail" - the radio was not yet connected. I just wanted to check the WiFi ):2dO,4`lLMØl 8ðÿ0;0;3;0;9;Starting gateway (RNNGE-, 1.6.0-beta)
0;0;3;0;9;Radio init failed. Check wiring.
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
pm open phy_2,type:2 0 0
cntconnected with XXXyyy, channel 1
dhcp client start...
ip:192.168.1.167,mask:255.255.255.0,gw:192.168.1.1I can see from the router that the connection to 192.168.1.167 is successful but the oddity is that I have set the gateway to use a static address and also connect to a SSID which is not XXXyyy. The defines are:
// Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
#define MY_IP_ADDRESS 192,168,1,22
// If using static ip you need to define Gateway and Subnet address as well
#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
#define MY_IP_SUBNET_ADDRESS 255,255,255,0So the ESP8266 uses dhcp when it should have a static address and connects to a SSID which is not given but may have been previously used at earlier tests.
I have looked at the code and tried a few changes to defines but none resulted in the override of dhcp.
Anyone have a clue? -
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 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.
@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!
-
Yesterday I have successfully installed the ESP8266 module and it works fine, but the Vera3 show something strange now.

Has anyone experienced this? -
@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?@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 -
@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%-bugESP8266 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 -
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:

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