0

Can we interrogate Adafruit.io for the latest data?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can we interrogate Adafruit.io for the latest data?

by IoTAll on Sat Aug 17, 2019 4:53 am

Hi!

I am wondering if it is possible to interrogate the Adafruit.io server on the lastest value received on a specific feed from for instance a M0 feather with Atwinc WiFi chip I am using.

Can be temperature feed received from another device, or an on/off button position status selected by the user, etc...

Is this possible?
Thank you!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: Can we interrogate Adafruit.io for the latest data?

by brubell on Mon Aug 19, 2019 10:25 am

You sure can!

If you're using the Adafruit IO HTTP API, you can use the Get Feed Data endpoint to query a feed for information such as latest value, or when it was created:
https://io.adafruit.com/api/docs/#get-feed-data

If you're using the Adafruit IO MQTT API it gets trickier. You'll need to use the */get topic (https://io.adafruit.com/api/docs/mqtt.h ... -get-topic) to retrieve the most recent value on the feed.

- brent r

brubell
 
Posts: 496
Joined: Fri Jul 17, 2015 10:33 pm

Re: Can we interrogate Adafruit.io for the latest data?

by IoTAll on Mon Aug 19, 2019 1:47 pm

Thanks a lot for the help!
This works great!!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Please be positive and constructive with your questions and comments.