💬 Building a WiFi Gateway using ESP8266
-
...and how to connect Arduino & MySensors & ESP8266-01 (like this one: https://www.aliexpress.com/item/2015-New-version-1PCS-ESP8266-serial-WIFI-model-ESP-01-Authenticity-Guaranteed-Internet-of-things/32574207918.html?spm=a2g0s.9042311.0.0.ytiQMF ) with ESP 01 Serial Adapter - like this one (https://www.aliexpress.com/item/ESP8266-Serial-WiFi-Wireless-ESP-01-Adapter-Module-3-3V-5V-Compatible-For-Arduino/32740695540.html?spm=a2g0s.9042311.0.0.lSVdmZ), when i should use Tx and Rx signals only?
-
...and how to connect Arduino & MySensors & ESP8266-01 (like this one: https://www.aliexpress.com/item/2015-New-version-1PCS-ESP8266-serial-WIFI-model-ESP-01-Authenticity-Guaranteed-Internet-of-things/32574207918.html?spm=a2g0s.9042311.0.0.ytiQMF ) with ESP 01 Serial Adapter - like this one (https://www.aliexpress.com/item/ESP8266-Serial-WiFi-Wireless-ESP-01-Adapter-Module-3-3V-5V-Compatible-For-Arduino/32740695540.html?spm=a2g0s.9042311.0.0.lSVdmZ), when i should use Tx and Rx signals only?
Welcome to the Mensors community @blackY !
If you're new to building MySensor nodes, I recommend that you stick with the recommended build examples.
It is probably possible to use the modules you link to, but it will require knowledge far beyond building the existing examples.
-
yes, I know...but if you are still staying by given examples, you don't develop yourself ;)
-
@zboblamont ROTFL...
I'm kidding. This does not solve the problem. Isn't nice or exploring too. -
I just want to bypass inbuilt wifi connection method in GatewayESP8266 and use my own code of SmartConfig to create WiFi connection. I'm not able to achieve this. is there any way to do this?
Ive tried changing library (MyGatewayTransportEthernet) code, but it throws TSM exception. I've tested SmartConfig separately and it works fine with my Android App. -
Sorry but can someone explain the differance between "Server" and "Client" modes. I got my ESP8266 working with my Vera but then I install a RPi 3 I'm using for MQTT. Do I need 2 gateways, one for the Vera and another for MQTT? Even though I'm moving away from the Vera it's still usfull. Thanks for the help.
-
Sorry about the typing. I also have a question about radio pins. The ESP8266 sketch shows different pins for the radio then "Connecting the Radio". I don't see the pins defined in the sketch so where do I go to change them?
@rwoerz thanks for reporting the difference between the wiring instructions. I have created https://github.com/mysensors/MySensors/issues/1096 to update the sketches.
As long as you use the default pins, there is no need to change them. If you want to change them, see https://www.mysensors.org/apidocs/group__RadioSettingGrpPub.html
-
HI there, i have been using this code a while, but had to made some changes in my wifi connection info (because it seems that my Domotica controller couldnt command the gateway), but after a failed flash, i have managed to flash it again correctly, but it doesnt seem to connect to the gateway anymore, how can i check this? it wouldnt respond on a ping and i see no wifi connection in de serial log?
-
seems to work again indeed, had to flash something empty first.
-
Hi,
I built a ESP8266 gateway using a wemos D1 mini and RFM95. I'd like to debug some communications with sensors with being attached to serial port of a computer, so I tried to connect via telnet.
I can connect as telnet, but I don't see many details.. First, text in telnet is not aligned on the left, and second, it only lists some raw values instead of displaying same kind of verbose debug info like in the serial monitor.
Is there a way to display same verbose text than in serial monitor ?Thanks,
ricorico94 -
Hi,
I answer to myself as it may help some other beginners like me.-
there's a way to get the debug info via telnet session to the ESP8266 gateway: look fro MyNetDebug library in this forum.
https://forum.mysensors.org/topic/7044/debug-messages-over-wi-fi -
be careful if you reuse sketches from 2.2.0 with 2.3.0 library release : now instead of
#define MY_ESP8266_SSID "MySSID"
#define MY_ESP8266_PASSWORD "MyVerySecretPassword"
you should use:
#define MY_WIFI_SSID "MySSID"
#define MY_WIFI_PASSWORD "MyVerySecretPassword"br,
-
-
I get the following errors when trying to Verify/Compile. I am trying to use the example sketch without any edits. Any ideas on what to do to fix this problem?
Under additional Board Mangers I have the following.
https://raw.githubusercontent.com/mysensors/ArduinoBoards/master/package_mysensors.org_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json
I have MySensors version 2.3.0 installed and have trying using previous versions.Errors:
In file included from E:*\MySketchesNew\libraries\MySensors/MySensors.h:420:0,
from E:*\MySketchesNew\GatewayESP8266\GatewayESP8266.ino:118:
E:***\MySketchesNew\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:57:53:
error: declaration of C function 'void ets_update_cpu_frequency(int)'
conflicts with extern "C" void ets_update_cpu_frequency(int freqmhz);
In file included from C:\Users*\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/pgmspace.h:10:0,
from C:\Users*\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Arduino.h:256,
from C:\Users*\AppData\Local\Temp\arduino_build_755180\sketch\GatewayESP8266.ino.cpp:1:
C:\Users*\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:218:6:
error: previous declaration 'void ets_update_cpu_frequency(uint32_t)' here void ets_update_cpu_frequency(uint32_t ticks_per_us);exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).Thank you for the assistance.
-
I get the following errors when trying to Verify/Compile. I am trying to use the example sketch without any edits. Any ideas on what to do to fix this problem?
Under additional Board Mangers I have the following.
https://raw.githubusercontent.com/mysensors/ArduinoBoards/master/package_mysensors.org_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json
I have MySensors version 2.3.0 installed and have trying using previous versions.Errors:
In file included from E:*\MySketchesNew\libraries\MySensors/MySensors.h:420:0,
from E:*\MySketchesNew\GatewayESP8266\GatewayESP8266.ino:118:
E:***\MySketchesNew\libraries\MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp:57:53:
error: declaration of C function 'void ets_update_cpu_frequency(int)'
conflicts with extern "C" void ets_update_cpu_frequency(int freqmhz);
In file included from C:\Users*\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/pgmspace.h:10:0,
from C:\Users*\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/Arduino.h:256,
from C:\Users*\AppData\Local\Temp\arduino_build_755180\sketch\GatewayESP8266.ino.cpp:1:
C:\Users*\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:218:6:
error: previous declaration 'void ets_update_cpu_frequency(uint32_t)' here void ets_update_cpu_frequency(uint32_t ticks_per_us);exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).Thank you for the assistance.
Hi @andre65, welcome to the MySensors forum!
These threads might be of interest:
https://forum.mysensors.org/topic/9826/esp8266-to-act-as-a-gateway-between-two-pcs-to-transfer-the-data
https://forum.mysensors.org/post/92175
https://forum.mysensors.org/post/93564
https://forum.mysensors.org/post/93113
https://forum.mysensors.org/post/90990
https://forum.mysensors.org/post/92610 -
I have some strange issues with my ESP8266 Wifi gateway and NRF24L01 connection.
All goes well for a day or so or sometimes 3, but than the WiFi communication stops, rebooting my WiFi access point solves the problem.
It shouldn't be a DHCP issue, because that is handled through the firewall, so it must be something else. Problem is i cannot see what goes wrong, because i don't have a log anywhere on the device?
What could be the best steps to solve or find the issue ? -
I have some strange issues with my ESP8266 Wifi gateway and NRF24L01 connection.
All goes well for a day or so or sometimes 3, but than the WiFi communication stops, rebooting my WiFi access point solves the problem.
It shouldn't be a DHCP issue, because that is handled through the firewall, so it must be something else. Problem is i cannot see what goes wrong, because i don't have a log anywhere on the device?
What could be the best steps to solve or find the issue ?@richard-van-der-plas to get a log, activate MY_DEBUG in teh sketch and connect the esp8266 to a computer or a log device like sundberg84's logger.
-
I have some strange issues with my ESP8266 Wifi gateway and NRF24L01 connection.
All goes well for a day or so or sometimes 3, but than the WiFi communication stops, rebooting my WiFi access point solves the problem.
It shouldn't be a DHCP issue, because that is handled through the firewall, so it must be something else. Problem is i cannot see what goes wrong, because i don't have a log anywhere on the device?
What could be the best steps to solve or find the issue ?@richard-van-der-plas I recognise the problem you describe. Resetting the router seems related, but the effect of the restart is that the ESP loses its Wifi connection, making it crash and restart. Then it works again, so I think it is because it was reset.
You could try to program the ESP with an empty bin file to make sure it will be emptied completely, and than reprogram the ESP with your sketch.