Closed multijohn closed 4 years ago
I'm having difficulties building the binary , is it possible to provide one ? I'm interested for the Bht model!
Thank u!
Yes the time updates after power cycle as long as it gets a connection to the internet.
I am on vacation at the moment so I can't build a binary. Are you trying to compile with Visual Studio Code and PlatformIO?
Thank you for your response , Yes with plafmormIO i'm trying , i have installed the required libraries , but fails if i remember on Webserver build ! I can't remember now exactly the errors!
Ok. If you can send me the errors I can have a look. Also send the version of PlatformIO and libraries that you are using.
Here is terminal output,
platformio 3.0.1 platformio-core 4.1.0
------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp01_1m.html
PLATFORM: Espressif 8266 2.3.2 > Espressif Generic ESP8266 ESP-01 1M
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES: toolchain-xtensa 2.40802.191122 (4.8.2), framework-arduinoespressif8266 2.20603.191216 (2.6.3), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20800.0 (2.8.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for PubSubClient library in registry
Found: https://platformio.org/lib/show/89/PubSubClient
LibraryManager: Installing id=89
Using cache: C:\Users\John\.platformio\.cache\60\bcf94560201e022015c1c79750fa0460
PubSubClient @ 2.7 has been successfully installed!
Found 33 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <PubSubClient> 2.7
|-- <WifiManager> 0.15.0
| |-- <DNSServer> 1.1.1
| | |-- <ESP8266WiFi> 1.0
| |-- <ESP8266WebServer> 1.0
| | |-- <ESP8266WiFi> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <ArduinoJson> 6.14.1
|-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPUpdateServer> 1.0
| |-- <ESP8266WebServer> 1.0
| | |-- <ESP8266WiFi> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <ArduinoOTA> 1.0
| |-- <ESP8266WiFi> 1.0
| |-- <ESP8266mDNS> 1.2
| | |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
| |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio\build\BHT002\src\Webserver.cpp.o
Compiling .pio\build\BHT002\src\main.cpp.o
In file included from src\Webserver.cpp:3:0:
C:\Users\John\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:241:80: error: conflicting declaration 'using ESP8266WebServer = '
using ESP8266WebServer = esp8266webserver::ESP8266WebServerTemplate<WiFiServer>;
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: 'class ESP8266WebServer' has a previous declaration as 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
In file included from src\Webserver.cpp:4:0:
C:\Users\John\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266HTTPUpdateServer\src/ESP8266HTTPUpdateServer.h:55:101: error: conflicting declaration 'using ESP8266HTTPUpdateServer = '
using ESP8266HTTPUpdateServer = esp8266httpupdateserver::ESP8266HTTPUpdateServerTemplate<WiFiServer>;
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:27:8: error: 'class ESP8266HTTPUpdateServer' has a previous declaration as 'class ESP8266HTTPUpdateServer'
class ESP8266HTTPUpdateServer* httpUpdater = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::init(ThermostatState*, String)':
src\Webserver.cpp:19:34: error: invalid use of incomplete type 'class ESP8266WebServer'
server = new ESP8266WebServer(80);
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:20:44: error: invalid use of incomplete type 'class ESP8266HTTPUpdateServer'
httpUpdater = new ESP8266HTTPUpdateServer();
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:27:8: error: forward declaration of 'class ESP8266HTTPUpdateServer'
class ESP8266HTTPUpdateServer* httpUpdater = nullptr;
^
src\Webserver.cpp:22:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->on("/", HTTP_GET,std::bind(&Webserver::handleRoot, this));
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:23:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->on("/console", HTTP_GET,std::bind(&Webserver::handleConsole, this));
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:24:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->on("/console", HTTP_POST,std::bind(&Webserver::handleConsole, this));
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:25:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->on("/restart", HTTP_GET, std::bind(&Webserver::handleRestart, this));
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:26:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->onNotFound(std::bind(&Webserver::handleRoot, this));
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:27:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->begin();
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:29:13: error: invalid use of incomplete type 'class ESP8266HTTPUpdateServer'
httpUpdater->setup(server);
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:27:8: error: forward declaration of 'class ESP8266HTTPUpdateServer'
class ESP8266HTTPUpdateServer* httpUpdater = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::handleRoot()':
src\Webserver.cpp:45:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->send(200, "text/html", msg);
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::handleNotFound()':
src\Webserver.cpp:51:9: error: invalid use of incomplete type 'class ESP8266WebServer'
server->send(404, "text/plain", "Not Found.");
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::handleConsole()':
src\Webserver.cpp:56:12: error: invalid use of incomplete type 'class ESP8266WebServer'
if (server->hasArg("cmd"))
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:58:22: error: invalid use of incomplete type 'class ESP8266WebServer'
String cmd = server->arg("cmd");
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp:118:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->send(200, "text/html", msg);
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::start()':
src\Webserver.cpp:129:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->begin();
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::stop()':
src\Webserver.cpp:134:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->stop();
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
src\Webserver.cpp: In member function 'void Webserver::process()':
src\Webserver.cpp:140:8: error: invalid use of incomplete type 'class ESP8266WebServer'
server->handleClient();
^
In file included from src\Webserver.cpp:1:0:
src\Webserver.h:25:8: error: forward declaration of 'class ESP8266WebServer'
class ESP8266WebServer* server = nullptr;
^
*** [.pio\build\BHT002\src\Webserver.cpp.o] Error 1
In file included from src\main.cpp:26:0:
src\Webserver.h:25:8: error: using typedef-name 'using ESP8266WebServer = class esp8266webserver::ESP8266WebServerTemplate<WiFiServer>' after 'class'
class ESP8266WebServer* server = nullptr;
^
In file included from C:\Users\John\.platformio\lib\WifiManager_ID567/WiFiManager.h:17:0,
from src\main.cpp:8:
C:\Users\John\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:241:80: note: 'using ESP8266WebServer = class esp8266webserver::ESP8266WebServerTemplate<WiFiServer>' has a previous declaration here
using ESP8266WebServer = esp8266webserver::ESP8266WebServerTemplate<WiFiServer>;
^
*** [.pio\build\BHT002\src\main.cpp.o] Error 1
=================================================== [FAILED] Took 13.22 seconds ===================================================
Environment Status Duration
------------- -------- ------------
c17gh3 IGNORED
BHT002 FAILED 00:00:13.220
============================================== 1 failed, 0 succeeded in 00:00:13.220 ==============================================
The terminal process terminated with exit code: 1```
Hello bikemike. I didn't success of compile the project. What versions of libraries do you use for project compile?
This pull https://github.com/bikemike/MikesThermostat/pull/5 will correct this issue
Thanks @jaghatei . It looks like a more recent version of the ESP8266 Arduino core changed how some classes were defined which broke my forward declarations.
Hi, I would like to ask if time on thermostat being updated after power recovery, and if reports reley status on mqtt!
Thank u!