I figured out how to edit the pubsub file however the whole thing wonāt complie for me due to the following errors. Could you please help me out here @maragelis ? Unfortunately Arduino isnāt my strong point.
Arduino: 1.8.4 (Windows 8.1), Board: āWeMos D1 R2 & mini, 80 MHz, 921600, 4M (3M SPIFFS)ā
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp: In member function āvoid WiFiManager::setupConfigPortal()ā:
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:146:71: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)ā
server->on(String(F(ā/ā)), std::bind(&WiFiManager::handleRoot, this));
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:146:71: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:147:81: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(unsigned char), WiFiManager const, bool>::type)ā
server->on(String(F(ā/wifiā)), std::bind(&WiFiManager::handleWifi, this, true));
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:147:81: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:148:83: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(unsigned char), WiFiManager const, bool>::type)ā
server->on(String(F(ā/0wifiā)), std::bind(&WiFiManager::handleWifi, this, false));
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:148:83: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:149:83: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)ā
server->on(String(F(ā/wifisaveā)), std::bind(&WiFiManager::handleWifiSave, this));
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:149:83: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:150:72: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)ā
server->on(String(F(ā/iā)), std::bind(&WiFiManager::handleInfo, this));
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:150:72: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:151:73: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)ā
server->on(String(F(ā/rā)), std::bind(&WiFiManager::handleReset, this));
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:151:73: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:153:77: error: no matching function for call to āESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::)(), WiFiManager const>::type)ā
server->on(String(F(ā/fwlinkā)), std::bind(&WiFiManager::handleRoot, this)); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler.
^
C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:153:77: note: candidates are:
In file included from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:17:0,
from C:\Users\David\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
void on(const char* uri, THandlerFunction handler);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:78:8: note: no known conversion for argument 1 from āStringā to āconst char*ā
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: candidate expects 3 arguments, 2 provided
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
^
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 4 arguments, 2 provided
exit status 1
Error compiling for board WeMos D1 R2 & mini.
This report would have more information with
āShow verbose output during compilationā
option enabled in File ā Preferences.
EDIT (AGAIN): I am getting nowhere with this. Could someone please help by either letting me know what Iām doing wrong, or compiling the code into a binary for me so I can just flash that to the wemosā¦?
EDIT: I am super happy to report that I finally have my Wemos D1 mini programmed with the awesome work of @maragelis. Now I just need to work out how to get that mqtt data into HA and acting as part of the alarm system I already have within it. Thanks you @maragelis for this and sorry for my long messages of frustration above!