New Error identified when using ClientListener + ThingerWebConfig + framework-arduinoespressif8266 3.30002.0 (3.0.2) + <thinger.io> 2.20.0+sha.6b17ee0 + WifiManager 2.0.3-alpha+sha.9af7253 :
[_SOCKET] Connecting to iot.thinger.io:25202...
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Error while connecting!
The error does not occur if you use ClientListener + ThingerWebConfig + espressif8266@2.6.2(Arduino-Framework 2.7.4) + thinger.io@2.16.0 + WifiManager 2.0.3-alpha+sha.9af7253
I’ve just posted a code that works with the ESP32, the wifimanager code works with both ESP32, ESP8266, if I were you would give it a try with the ESP8266, changing just the thinger’s library by the 8266 versions,
But the products we develop are based on the code above ( Esp8266 +ThingerWebConfig + WiFiManager + ClientListener). Without this fix in the library, we will have to use the Arduino-Thinger 2.16 version with Esp8266/Arduino 2.7.4 .
Let’s wait for @alvarolb to analyze the problem and propose a solution. Only after the correction will we be able to use the new library features (OTA…) on our devices.
My friend the code I shared is OTA ready, I just realized that I made it in Arduino IDE and not VSCode lol, but it allows you to set the SSID WiFiPassword, User, Device and Credential in the wifi setup, so you can develop your end user devices, I just did not used the ClientListener, but I’m almost sure it will work.
Is there any specific reason why to define the credentials in the setup loop? I am not sure, but I dont know if the definitions keeps available out of the setup loop (I would believe they doesn’t), so when in the main loop when it calls the thinger function and tries to login, the definitions are destroyed basically, I would recommend you to keep the definitions globally declared.
Hello, @ega
Thanks for the sugestion.
Our products are for commercial purposes and were developed based on the “Arduino-Library” of Thinger.io. For this reason, it would be important for us to analyze and fix the identified “bug”.
I found your proposal for ESP32 + WiFiManager very interesting.
Thanks for the collaboration.
But let’s wait for the analysis and correction of the “bug” in Thinger.io’s “Arduino-Library” library.
We use this to hide the parameter fields (USERNAME, DEVICE_ID, DEVICE_CREDENTIAL) on the WiFiManager web site. With this, the end user has no way to change this data.
We then retrieve the data (USERNAME, DEVICE_ID, DEVICE_CREDENTIAL) stored in JSON.
This structure/strategy works very well for our device and business purpose.
Everything works fine using: ClientListener + ThingerWebConfig + espressif8266@2.6.2(Arduino-Framework 2.7.4 ) + thinger.io@2.16.0 + WifiManager 2.0.3-alpha+sha.9af7253
But it has an error when using: ClientListener + ThingerWebConfig + framework-arduinoespressif8266 3.30002.0 (3.0.2 ) + <thinger.io> 2.20.0+sha.6b17ee0 + WifiManager 2.0.3-alpha+sha.9af7253:
It certainly seems like a bug, I tried the SmartConfig (I think this one fits better to your needs) and the WebConfig without success the connection with TLS enabled, and neither could update via OTA updater.