ThingerWebConfig with THINGER_SERVER

On an esp8266, I tried the wifi auto-connect using ThingerWebConfig to connect to my server by defining its IP address as THINGER_SERVER. My esp8266 joins the wifi network and gets an IP address, however the state of my device, created in my, is shown as Diconnected “red” . Below is the used code for your reference.

#define THINGER_SERVER ""  
#include <DNSServer.h>
#include <WiFiManager.h> 
#include <ThingerWebConfig.h>
#include "Adafruit_MCP23017.h"

Adafruit_MCP23017 mcp0;
uint8 pin;
ThingerWebConfig thing;
void setup() {
    for ( pin = 0; pin  < 16; pin ++)
        mcp0 .pinMode(pin, OUTPUT);
 pinMode(pin, OUTPUT);
    thing["RELAY"] << [](pson & in) {
    if (in.is_empty()) in = (bool) mcp0.digitalRead(pin);
    else mcp0.digitalWrite(pin, in ? HIGH : LOW);  
void loop() {

The code is working fine (my device shows Connected “green”) when I used ThingerESP8266 (with hard-coded SSID, password,USERNAME, DEVICE_ID, DEVICE_CREDENTIAL) instead of ThingerWebConfig.
Any advice or help is appreciated.
Thank you very much.

Hello @Sam_Carli,

Try to connect a serial port and obtain the connection traze by adding cpp #define _DEBUG in the first code line, with that information we will be able to help you better.

However I have a web config code with some additional parameters that works well, if we can’t solve your I will share with you.


Thank you very much for your support. In the debug trace I can see the following:
BSSL:_connectSSL: start connection
BSSL:Connection will fail, no authentication method is setup
:wr 218 0
:wrc 218 218 0
:ack 218
:rn 536
:rch 536, 536
:rd 5, 1072, 0
:rdi 536, 5
:rch 1072, 536
:rch 1608, 123
:rd 81, 1731, 5
:rdi 531, 81
:rd 5, 1731, 86
:rdi 450, 5
:rd 1631, 1731, 91
:rdi 445, 445
:c 445, 536, 1731
:rdi 536, 536
:c 536, 536, 1195
:rdi 536, 536
:c 536, 536, 659
:rdi 123, 114
BSSL:_wait_for_handshake: failed
BSSL:Couldn’t connect. Error = ‘Certificate is expired or not yet valid.’

May be some certification issue??

Hello @Sam_Carli,

Let me suggest starting again from the ThingerWebConfig example:

// Requires WifiManager from Library Manager or
#include <ThingerWebConfig.h>

ThingerWebConfig thing;

void setup() {

  // digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
  thing["led"] << digitalPin(LED_BUILTIN);

  // resource output example (i.e. reading a sensor value)
  thing["millis"] >> outputValue(millis());

    Steps for getting the ESP8266 WebConfig working:
    1. Connect to Thinger-Device WiFi with your computer or phone, using as WiFi password
    2. Wait for the configuration window, or navigate to if it does not appear
    3. Configure the wifi where the ESP8266 will be connected, and your device credentials
    4. Your device should be now connected to the platform.
    More details at

void loop() {

Try just with this example and then build your code over it.


Thank you so much! I will try this code over the weekend.
Best regards