Ensure my traffic has arrived

Hi everybody,

I want to use thinger.io to monitor my electic vehicle. Main focus is to have a look at the charging state and how full the battery is SOC.

All of this is working great so far. A esp32 is pulling the data from the car and uploads it to thinger.io.

I also want to call an email endpoint if my charging stops and here is where I have to ask if it is possible to be sure that this call is sent. As the ESP32 goes to sleep, after not recieving any data from the car, I had the case that the device is off before it could send the data out.

Sure, I could work with very long timers and hope that mail is sent, but is there a reliable way to call and enpoint or at least do a thing.handle?

Does a thing.handle “delay” the code coming after it, until it has finished or will a esp.reboot directly kick in and prevent the thing.handle to sent data?

thank you very much and continue your work! thinger is great!

The first mistake I made when I started working with thinger.io, is that I thought I should “throttle” how often thing.handle() is called. But no, it should be in the main loop, and there should not be any big delays there. Otherwise the server will be confused if your device is actually online or not, and stuff will not work very well.

So, as far as I know, in your case, if you call thing.call_endpoint() and soon after that thing.handle() is called, then the server will send out your mail, even if your device goes offline after giving that instruction.

Hi, this feature will be included in the next release. In fact, newer Arduino libraries published in Github includes this functionality, but the server is not updated yet. But expect optional confirmation for bucket writes, or endpoint calls.