ESP8266 WiFi gateway port for MySensors
-
Hi
Excellent build and exactly what I have been looking for. I just got my ESP-12 this week and I am about to build this. I just have one question, what is the "Inclusion mode" for? I tried to figure it out by look at the sketch and it's not quite clear.
Thank you for everything you have done to get this to where it's at.
Mike
@Mike-Cayouette I copied the implementation from the Ethernet gateway.
I thought it was meant as a function to allow clients to join the network within a certain timeframe after pressing the button.
When looking at the code I'm not sure it does anything at all...
Maybe @hek can shed some light on the issue? -
It doesn't do much on the gateway side. As @Yveaux says it allows you to have a physical button in the gateway to enable inclusion mode. After some (configurable) time it disables inclusion mode. The enabled/disabled status is sent to controller side. But no filtering of presentation messages occurs on the gateway.
So it is really up to the controller to respect the inclusion mode status (whether or not to create new devices).
-
@Mike-Cayouette I copied the implementation from the Ethernet gateway.
I thought it was meant as a function to allow clients to join the network within a certain timeframe after pressing the button.
When looking at the code I'm not sure it does anything at all...
Maybe @hek can shed some light on the issue?Hi @Yveaux ,
I finally received my NodeMCU (but from http://doit.am/) did you had to flash any firmware (like the NodeMCU one) in order to be able to use it from Arduino IDE or it is just flash the .ino and it's ready to go?
Regards
-
Hi @Yveaux ,
I finally received my NodeMCU (but from http://doit.am/) did you had to flash any firmware (like the NodeMCU one) in order to be able to use it from Arduino IDE or it is just flash the .ino and it's ready to go?
Regards
-
Thank you for the quick response @Yveaux & @hek
I started working on the gateway today but I seem to be having a problem. I already had IDE version 1.6.5 installed with the board manager enabled. I've been creating some sensors on some ESP-01 for a few weeks without a problem. I replaced the MySensors folder I had in my library folder with the most recent one. My old sketches still compile but when I try to compile the ESP8266Gateway sketch I get the following error.
Esp8266Gateway.cpp.o: In function `incomingMessage(MyMessage const&)': Esp8266Gateway.cpp:(.text+0x74): undefined reference to `vsnprintf_P' Esp8266Gateway.cpp.o: In function `output(char const*, ...)': Esp8266Gateway.cpp:(.text+0xb6): undefined reference to `vsnprintf_P' MySensors/MyHwESP8266.cpp.o: In function `hw_writeConfig(int, unsigned char)': MyHwESP8266.cpp:(.text+0x138): undefined reference to `snprintf_P' MySensors/MyHwESP8266.cpp.o: In function `MyHwESP8266::MyHwESP8266()': MyHwESP8266.cpp:(.text+0x16f): undefined reference to `snprintf_P' MySensors/MyHwESP8266.cpp.o: In function `MyHwESP8266::debugPrint(bool, char const*, ...)': MyHwESP8266.cpp:(.text+0x19a): undefined reference to `vsnprintf_P' MyHwESP8266.cpp:(.text+0x1b3): undefined reference to `vsnprintf_P' collect2: error: ld returned 1 exit status Error compiling.All I changed in the ESP8266Gateway example sketch was the SSID and Password.
Regards,
Mike
-
Thank you for the quick response @Yveaux & @hek
I started working on the gateway today but I seem to be having a problem. I already had IDE version 1.6.5 installed with the board manager enabled. I've been creating some sensors on some ESP-01 for a few weeks without a problem. I replaced the MySensors folder I had in my library folder with the most recent one. My old sketches still compile but when I try to compile the ESP8266Gateway sketch I get the following error.
Esp8266Gateway.cpp.o: In function `incomingMessage(MyMessage const&)': Esp8266Gateway.cpp:(.text+0x74): undefined reference to `vsnprintf_P' Esp8266Gateway.cpp.o: In function `output(char const*, ...)': Esp8266Gateway.cpp:(.text+0xb6): undefined reference to `vsnprintf_P' MySensors/MyHwESP8266.cpp.o: In function `hw_writeConfig(int, unsigned char)': MyHwESP8266.cpp:(.text+0x138): undefined reference to `snprintf_P' MySensors/MyHwESP8266.cpp.o: In function `MyHwESP8266::MyHwESP8266()': MyHwESP8266.cpp:(.text+0x16f): undefined reference to `snprintf_P' MySensors/MyHwESP8266.cpp.o: In function `MyHwESP8266::debugPrint(bool, char const*, ...)': MyHwESP8266.cpp:(.text+0x19a): undefined reference to `vsnprintf_P' MyHwESP8266.cpp:(.text+0x1b3): undefined reference to `vsnprintf_P' collect2: error: ld returned 1 exit status Error compiling.All I changed in the ESP8266Gateway example sketch was the SSID and Password.
Regards,
Mike
@Mike-Cayouette said:
undefined reference to `vsnprintf_P'
Can you check the boardmanager which version of ESP Arduino you have installed?
Mine's like this:I use the 'stable' version, located at http://arduino.esp8266.com/stable/package_esp8266com_index.json
Maybe your installation is inclomplete; you could try removing & reinstalling Arduino for ESP.
-
@Yveaux said:
Can you check the boardmanager which version of ESP Arduino you have installed?
That was the problem, I was running an older version, I upgraded it and now it show's the same as your version.
Thanks again,
Mike
-
Just wanted to say thank you! It works great after hooking it up on my breadboard, now I can finally include MySensors in my sensor network 8-)
-
Just wanted to say thank you! It works great after hooking it up on my breadboard, now I can finally include MySensors in my sensor network 8-)
-
Great work. Just starting out with mysensors and looking forward to implementing this. Waiting for my hardware to arrive :)
-
I'm having problems compiling this - I must be missing something but can't figured out what.
Error:
Esp8266Gateway.ino:77:25: fatal error: ESP8266WiFi.h: No such file or directory
I've downloaded the mysensor library and unzipped it.
My sketchbook location is: C:\Users\xxxxx\Documents\Arduino
Under C:\Users\xxxxx\Documents\Arduino\libraries\MySensors\examples\Esp8266Gateway
AdsThe esp8266gateway.ino file is present.
Update: Pffft....try selecting the generic ESP8266 module :)
-
Built Mine :smiley: works great the only problem I had was uploading the code from a Mac OSX Mavericks so I opened a Win7 VM I keep for these type of problems and all is good. Thanks! @Yveaux :clap:
My Gateway has shrunk...

@DrJeff said:
Built Mine
Great to hear you got things running!
@hek is also on Mac and he managed to download directly. Maybe you can discuss your issues with him so we can update the install instructions if something special is required for Mac.My Gateway has shrunk...!
Sure did, and it's wireless now :laughing:
-
I managed to upload on mac, but had to fiddle around before I got it working.
Added this text after my experience.
"This NodeMCU board normally can be flashed automatically and shouldn't need bootload/reset buttons to be pressed. If you see error, try changing baudrate from from 9600 to 57600. Still problems? Hold flash and press reset. Start upload in IDE while keeping flash-button pressed until upload starts." -
I followed the steps above, and I'm even able to upload sketches, however I only get this in serial monitor:
load 0x4010f000, len 1264, room 16Bad module maybe?
EDIT: After choosing the right board (v.1.0) and applying the fix above from @fleinze, it seems it is working now...
-
Hi,
I'm having problems running ESP8266 gateway. When I reset my nodes or trying send command from controller to node (dimmer, realy etc.) my gateway reset itself. I try using different ESP-s (I'm using ESP-12), power supplys and radio modules.
On serial monitor I get this error:
