Utilizing Email End Point


Well done @alvarolb ! It is working as it should…



hi everyone,
I got a problem here. I use NodeMCU V2,previously i try any codes (without endpoint),there’s no error. But after i added an endpoint and can sent 1-2 emails, suddenly may device disconnected/offline. i think my internet connection, but i try browse any websites, no problem. Then i use another NodeMCU, there’s no changes. The last way,i made a new device id, and it works. After i try sent email,it happened again, my device id such like blocked,unused. :sob::sob:
This my code :

#define EMAIL_ENDPOINT1 “pintu_1”

#define DOOR_PIN D1
#define WINDOW_PIN D2
#define DHTPIN D3
#define DHTTYPE DHT11
#define ALARM_PIN D4

String door;
String window;
String kit;
float temp;



void setup() {

thing[“pintu 1”] >>[](pson& out){ out = (door); };
thing[“pintu 2”] >>[](pson& out){ out = (window); };
thing[“dht11”] >> [](pson& out){ out = temp; };
thing[“dapur”] >>[](pson& out){ out = (kit); };
thing[“alarm”] <<[](pson& in){
in = (bool) digitalRead(ALARM_PIN);
digitalWrite( ALARM_PIN, in ? HIGH : LOW);

thing.add_wifi(SSID, SSID_PASSWORD);

void loop() {
int baca1 = digitalRead(DOOR_PIN);
int baca2 = digitalRead(WINDOW_PIN);

//pembacaan sensor pada Pintu
if (baca1!=HIGH){
thing.call_endpoint(EMAIL_ENDPOINT1, “door”);
door = “Pintu 1 Terbuka!!!”;
door = “Aman.”;

//pembacaan sensor pada Jendela
if (baca2!=HIGH){
window = “Pintu 2 Terbuka!!!”;
window = “Aman.”;

//pembacaan sensor DHT11
float t = dht.readTemperature(); //Membaca suhu dalam satuan Celcius

temp = t;
if (temp>40){
kit = “Dapur Kebakaran!!!”;
kit = “Aman.”;


i got an email from no-reply@thinger.io. It said

Your device Tugas_Akhir has been disabled due to excessive call fails. This often happens when your device calls your resources (endpoints or buckets) at inappropriate rate. Please, verify your device code.

my question is : which real problem??

  1. my code,cause i use String data, not Value.
  2. my internet connection, cause i use wireless internet (wifi), so it’s not stable.

thanks for reply, sorry for my bad english. :pray::pray::pray:


Is your code, not by the variable kind you are using, is the rate that the endpoint is called.

Is important to made the call just one time, by your code you are calling it at the speed that the microcontroller can when the condition “baca1!=HIGH” is present… Thats why the device become blocked

You need to limit the frequency with which you call the endpoint, I think I read it somewhere (I do not remember the specific amount of time should be waited between calls), but totally sure you are breaking it as how is the endpoint called.


so the problem is the code??i must set the limit frequency for calling the endpoint,could you remember the link you mean??i need it so much,i’m newbie here, :pray::pray::pray:

but its no connection with the widget at dashboard,right? cause i set the refresh rate for that widget by sampling for every 1 second,


You must set the frequency in code, there is no field to establish this, the link doesn’t says how to do it.

I don’t know if you understand how the microcontroler works, in the example that you posted, when the condition “baca1!=HIGH” is true, and the microcontroler can run this routine more than 10k times in one second…

You should asure by any method that it run just one time, I use a flag for this as this example:

if (baca1!=HIGH && mailFlag)
thing.call_endpoint(EMAIL_ENDPOINT1, “door”);
door = “Pintu 1 Terbuka!!!”;

And you should set the “mailFlag” again somewhere else in the code, I dont know your process and have no idea where is appropiate to do it.

Hope this helps