huge progress today.
@stevemann thanks for the hint. I downloaded the folder from here. Were you able to compile the actual code, or were you referring to the libraries?
I was able to get the whole project to compile. I flashed it as is first, and it landed back on the QR code screen which is where it was getting stuck before.
I confirmed that I still cannot log into it.
I then added all my information in lines 5-65 of the ino file, from wifi to mqtt, etc.
It compiled fine.
Now the screen gets stuck on
I am not able to see it in my router, so not connected to my Wi-Fi.
But I also confirm that it still resets, like before. Every few minutes, I see the screen turn off then on, but remains stuck on the HASP Initializing window.
@luma I am not familiar with the rest of the code yet, so not sure where to go next.
EDIT: adding the area I modified:
Also turned on detailed logging during compilation, and this is the only âwarning/errorâ I have, the rest is standard compilation logs:
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void nextionParseJson(const String&)':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:1609:39: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
1609 | DynamicJsonDocument nextionCommands(mqttMaxPacketSize + 1024);
| ^~~~~~~~~~~~~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:53,
from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:45:
C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/compatibility.hpp:125:58: note: declared here
125 | class ARDUINOJSON_DEPRECATED("use JsonDocument instead") DynamicJsonDocument
| ^~~~~~~~~~~~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:1614:193: warning: 'size_t ArduinoJson::V703PB2::JsonDocument::memoryUsage() const' is deprecated: always returns zero [-Wdeprecated-declarations]
1614 | String jsonErrorDescription = String(F("Failed to parse incoming JSON command with error:")) + String(jsonError.c_str()) + String(F(" memoryUsage: ")) + String(nextionCommands.memoryUsage()) + String(F(" capacity: ")) + String(nextionCommands.capacity());
| ^
In file included from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:33,
from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:45:
C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:338:10: note: declared here
338 | size_t memoryUsage() const {
| ^~~~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void espWifiConfigCallback(WiFiManager*)':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2151:41: warning: unused parameter 'myWiFiManager' [-Wunused-parameter]
2151 | void espWifiConfigCallback(WiFiManager *myWiFiManager)
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void configRead()':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2288:7: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
2288 | if (SPIFFS.begin())
| ^~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:32:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
| ^~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2290:9: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
2290 | if (SPIFFS.exists("/config.json"))
| ^~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:32:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
| ^~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2294:25: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
2294 | File configFile = SPIFFS.open("/config.json", "r");
| ^~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:32:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
| ^~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2297:45: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
2297 | DynamicJsonDocument jsonConfigValues(1536);
| ^
In file included from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:53,
from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:45:
C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/compatibility.hpp:125:58: note: declared here
125 | class ARDUINOJSON_DEPRECATED("use JsonDocument instead") DynamicJsonDocument
| ^~~~~~~~~~~~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void configSave()':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2471:39: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
2471 | DynamicJsonDocument jsonConfigValues(2048);
| ^
In file included from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:53,
from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:45:
C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/compatibility.hpp:125:58: note: declared here
125 | class ARDUINOJSON_DEPRECATED("use JsonDocument instead") DynamicJsonDocument
| ^~~~~~~~~~~~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2513:21: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
2513 | File configFile = SPIFFS.open("/config.json", "w");
| ^~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:32:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
| ^~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void configClearSaved()':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:2537:3: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
2537 | SPIFFS.format();
| ^~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:32:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
| ^~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'bool updateCheck()':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:3599:33: warning: 'DynamicJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
3599 | DynamicJsonDocument updateJson(2048);
| ^
In file included from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:53,
from C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:45:
C:\Users\Hassa\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/compatibility.hpp:125:58: note: declared here
125 | class ARDUINOJSON_DEPRECATED("use JsonDocument instead") DynamicJsonDocument
| ^~~~~~~~~~~~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void beepHandle()':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:3709:98: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
3709 | else if ((beepState == false) && (millis() - beepPrevMillis >= beepOffTime) && ((beepCounter >= 0)))
| ~~~~~~~~~~~~^~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void telnetHandleClient()':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:3732:47: warning: 'WiFiClient WiFiServer::available(uint8_t*)' is deprecated: Renamed to accept(). [-Wdeprecated-declarations]
3732 | telnetClient = telnetServer.available(); // ready for new client
| ^
In file included from C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/ESP8266WiFi.h:40,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:35:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/WiFiServer.h:85:14: note: declared here
85 | WiFiClient available(uint8_t* status = NULL) __attribute__((deprecated("Renamed to accept().")));
| ^~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:3737:32: warning: 'WiFiClient WiFiServer::available(uint8_t*)' is deprecated: Renamed to accept(). [-Wdeprecated-declarations]
3737 | telnetServer.available().stop(); // have client, block new connections
| ^
In file included from C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/ESP8266WiFi.h:40,
from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:35:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WiFi\src/WiFiServer.h:85:14: note: declared here
85 | WiFiClient available(uint8_t* status = NULL) __attribute__((deprecated("Renamed to accept().")));
| ^~~~~~~~~
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino: In function 'void debugPrintFile(const String&)':
C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:3832:20: warning: 'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
3832 | File debugFile = SPIFFS.open(fileName, "r");
| ^~~~~~
In file included from C:\Users\Hassa\Documents\Arduino\HASwitchPlate\HASwitchPlate.ino:32:
C:\Users\Hassa\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS __attribute__((deprecated("SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.")));
| ^~~~~~