Arduino Forum

Topics => Home Automation and Networked Objects => Topic started by: wadevcamp on Jul 11, 2018, 03:30 am

Title: how to know if a thingspeak write occurred without error
Post by: wadevcamp on Jul 11, 2018, 03:30 am
I just started using ThingSpeak and the API library found on GIthub.  The library has functions to determine if READs occurred without error, but I don't see one that returns the success/failure of a WRITE.

Advice??
Title: Re: how to know if a thingspeak write occurred without error
Post by: PaulS on Jul 11, 2018, 11:23 am
Quote
I just started using ThingSpeak and the API library found on GIthub.
Github is a huge place. Since you have already tracked down some mysterious library, post a link to it. Waving your arms in some vague direction is useless.
Title: Re: how to know if a thingspeak write occurred without error
Post by: rw950431 on Jul 11, 2018, 01:19 pm
Not sure about your particular library but the HTTP request to add a value returns a 200 status code and a positive integer in the payload when it successfully completes.  The integer returned is the sequence number of the point just written so successive writes return 1,2,3,4 etc.