Making WiFiManager compatible with MySensors 2.3.2
Its not bug but a workaround just in case if any one is searching for solution. I was successfully using WiFiManager with MySensors 2.3.1 but after upgrading from MySensors 2.3.1 to 2.3.2 i was unable to compile ESP8266 gateway sketch and had error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200" In file included from C:\Users\<username>\Development\PiHome\Arduino Related\libraries\MySensors_2_3_2/MySensors.h:235:0, from C:\Users\<username>\Development\PiHome\Arduino Related\nRF Mysensors V3.x\GatewayESP8266_v2\GatewayESP8266_v2.ino:134: C:\Users\<username>\Development\PiHome\Arduino Related\libraries\MySensors_2_3_2/core/MyGatewayTransportEthernet.cpp:52:2: error: #error ESP8266/ESP32 gateway: MY_WIFI_SSID not defined! #error ESP8266/ESP32 gateway: MY_WIFI_SSID not defined! ^ Multiple libraries were found for "SPI.h" Used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\SPI Multiple libraries were found for "EEPROM.h" Used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\EEPROM Multiple libraries were found for "Ticker.h" Used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\Ticker Multiple libraries were found for "WiFiClient.h" Used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi Not used: C:\Program Not used: C:\Users\<username>\Development\PiHome\Arduino Multiple libraries were found for "DNSServer.h" Used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\DNSServer Multiple libraries were found for "ESP8266WebServer.h" Used: C:\Users\<username>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WebServer Multiple libraries were found for "WiFiManager.h" Used: C:\Users\<username>\Development\PiHome\Arduino Multiple libraries were found for "MySensors.h" Used: C:\Users\<username>\Development\PiHome\Arduino exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module). This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. |
To fix this iissue you need to comment out MySensors code in two location in core/MyGatewayTransportEthernet.cpp may be there is better way but this is quick fix. Comment out line 49 to 55
1 2 3 4 5 6 7 |
/* #if defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32) #if !defined(MY_WIFI_SSID) #error ESP8266/ESP32 gateway: MY_WIFI_SSID not defined! #endif #endif */ |
Also…