React/ThingHTTP adding 1 minute every hour

João Machado on 25 Feb 2021
Latest activity Reply by João Machado on 26 Feb 2021

Hi guys,

I'm using Thingspeak to log data for my small weather station project. The data then gets sent to an Airtable using React and ThingHTTP. When I check the exported CSV from Thingspeak I can see the data being logged at regular intervals — every 5 minutes, 3 seconds in. However, something happens with React/ThingHTTP, because the Airtable log doesn't match. Every hour or so, the entry will have an added minute (13:01, 17:01, etc). Why does this happen? React is programmed to use ThingHTTP whenever Field1 is different from 0.

Vinod
Vinod on 25 Feb 2021

Think of thingHTTPs that are triggered by React to be a queue of work. ThingSpeak has worker processes that pull tasks off the FIFO work queue and execute it. Occasionally, if there is a lot of work to be done and all the workers are busy, the work queue will back up and the task is executed when a worker becomes available. This may introduce some delay which explains what you are seeing.

João Machado
João Machado on 25 Feb 2021

Thank you for your answer! Is there a way to use thingHTTP to pass the original timestamp of the record? The documentation provides %%datetime%% but that only sends the timestamp of the instance when the data is actually sent. I would like to be able to access the created_at property and send that.

Vinod
Vinod on 25 Feb 2021 (Edited on 25 Feb 2021)

Rather than use thingHTTP, can your device send it to ThingSpeak and directly to Airtable? The timestamp on your device will be a more accurate measure of when the measurement was made and you have built a system with redundancies if either service goes down.

João Machado
João Machado on 26 Feb 2021

I will consider it, but I actually moved from that system because the ThingSpeak library seemed more reliable over time. I can run the device for weeks without ever getting an error. Do you know if the created_at property can be passed using thingHTTP? Thank you.