ESP32 somehow disconnected from Thinger.io


#1

before i add to my endpoint code to my code, my ESP32 still connected to Tinger.io, but after i add endpoint to my code, my ESP32 can’t connected to thinger.io again, please help me…

Thank you


ESP32 disconnects after two minute
#2

Have you read this?

Can you share your code? or how do you expect us to help you?

Read the documentation (or search in the forum) how to enable the debug output at serial console, share your code properly (very important), and the debug output properly too.


#3

yes i have read about that problem, but i can’t get the answer for my problem
this is my code :

#define DEBUG
#include <SPI.h>
#include <ThingerESP32.h>
#include “DHT.h”

#define DHTPIN 4 //pin D2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);

#define USERNAME “klokloklo”
#define DEVICE_ID “ESP8266”
#define DEVICE_CREDENTIAL “#Xf2QJwuQ4d4

#define SSID “kloklo123”
#define SSID_PASSWORD “135jkiu”

ThingerESP32 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup()
{
dht.begin();
Serial.begin(115200);
Serial.println(F(“DHTxx Test”));

thing.add_wifi(SSID, SSID_PASSWORD);

Serial.print(“Connecting”);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.println(“Connecting to WiFi…”);
}
Serial.println();

Serial.print("Connected, IP Add: ");
Serial.println(WiFi.localIP());

thing[“dht22”] >>
{
out[“humidity”] = dht.readHumidity();
out[“celcius”] = dht.readTemperature();
out[“fahrenheit”] = dht.readTemperature(true);
};
}

void loop()
{
thing.handle();

// pson data;
// data[“temperature”] = dht.readTemperature();
// data[“humidity”] = dht.readHumidity();
// thing.call_endpoint(“ESP32HUMADITYTHEMPERATURE”, data);

}

so i just have one esp32-wroom-32 espressif, it can’t connect to the thinger.io again after I input this code :

pson data;
data[“temperature”] = dht.readTemperature();
data[“humidity”] = dht.readHumidity();
thing.call_endpoint(“ESP32HUMADITYTHEMPERATURE”, data);

that’s why I comment the code,
what should I do to connect my esp32 again to thinger.io??
please help


#4

Help me to help you, post code in the right way and post the debug too, did you read and understand my previous message?