Using ESP8266 but cant seems to connect with Thinger.io

#define DEBUG
#include <ThingerESP8266.h>
#include <ESP8266WiFi.h>

#define USERNAME “clivano”
#define DEVICE_ID “Mynameisnobodyhihihihihi”
#define DEVICE_CREDENTIAL “AGdWc_%b!2xCcVyz”

#define LED_PIN 4

ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

const char* ssid = “IOTtest1”;
const char* ssid_password = “123456789”;
void setup(){
pinMode(LED_PIN, OUTPUT);
WiFi.begin(ssid, ssid_password);
while(WiFi.status() != WL_CONNECTED){
digitalWrite(LED_PIN, LOW);
delay(500);
}
digitalWrite(LED_PIN, HIGH);

thing.add_wifi(ssid, ssid_password);
}

void loop(){
thing.handle();
}

this is the code im using and Thinger.io still says its offline.

Hi,

First of all, please use code tags to share your code.

The debug definition is wrong it should be #define _DEBUG_

Try with that and let us know the serial console response, that is the way how the device says what is going with thinger process.

Hope this helps.

i wrote a simpler code, and used the correct #include DEBUG
[_SOCKET] Connecting to iot.thinger.io:25202
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Error while connecting!
[_SOCKET] Connecting to iot.thinger.io:25202
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Error while connecting!

it showed me these repeating error.

How do i use the code tag btw?

Hi,

To use code tags just paste the code, select it and press the “</>” button at the toolbar :wink:

Currently there is an issue with the esp8266 thinger library 2.17.0, check this post: Arduino Library 2.17.0

What I would do is to downgrade to version 2.16 meanwhile they patch and release the library, this will be soon as there is a patched version already, or get the file from the github as is published in that post, I’ve tested that version and it works without issues.

Hope this helps.

1 Like

New version already released. It should fix ESP8266 connection problems:

1 Like