No response to AdafruitIO_Feed get() request

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
HullGarageDoors
 
Posts: 2
Joined: Wed Feb 12, 2020 3:45 pm

No response to AdafruitIO_Feed get() request

Post by HullGarageDoors »

I'm having an issue where I'm not always getting a response to a .get() from a AdafruitIO_Feed type. If I push the value by setting it in a dashboard, I am receiving it in the handler function. But if I try to ask for the value from the server by doing a .get() I don't always get a response.. is there a way I can tell if the server is getting my .get() request? Thanks!

User avatar
brubell
Learn User Page
 
Posts: 2017
Joined: Fri Jul 17, 2015 10:33 pm

Re: No response to AdafruitIO_Feed get() request

Post by brubell »

is there a way I can tell if the server is getting my .get() request?
Using the /get/ topic should publish to the feed connected to the get topic. You should see the feed obtain a new message with the last value that was published to that feed on the monitor page (io.adafruit.com/monitor)

From the API Docs (https://io.adafruit.com/api/docs/mqtt.h ... -get-topic)
For example, let's imagine we have a device that subscribes to a counter feed: uname/f/counter. If we want to get the latest value, the /get topic we should publish to is uname/f/counter/get. After connecting to IO, subscribing to uname/f/counter, and publishing to uname/f/counter/get, we will immediately receive a message on our uname/f/counter subscription with the last value that was published to counter.
Are you subscribed to the feed you're attempting to /get? Could you post your code below?

User avatar
HullGarageDoors
 
Posts: 2
Joined: Wed Feb 12, 2020 3:45 pm

Re: No response to AdafruitIO_Feed get() request

Post by HullGarageDoors »

Thanks for the reply.. I think I figured out the issue. When I have back-to-back get() or save() calls, it seems to have issues. But if I do one at a time with a delay it works. I know there's a limit with the free account of 30 data points per minute.. but I'm still only doing a total of 6 calls per minute. But if I do one get() every 20 seconds it works, but if I do 2 get() 's it responds kind of randomly.. failing to respond maybe 2/3 of the time. Is there a limit per second also?

Thanks!
Thor

User avatar
brubell
Learn User Page
 
Posts: 2017
Joined: Fri Jul 17, 2015 10:33 pm

Re: No response to AdafruitIO_Feed get() request

Post by brubell »

HullGarageDoors wrote:Thanks for the reply.. I think I figured out the issue. When I have back-to-back get() or save() calls, it seems to have issues. But if I do one at a time with a delay it works. I know there's a limit with the free account of 30 data points per minute.. but I'm still only doing a total of 6 calls per minute. But if I do one get() every 20 seconds it works, but if I do 2 get() 's it responds kind of randomly.. failing to respond maybe 2/3 of the time. Is there a limit per second also?

Thanks!
Thor
There's no limit per second, both get() and save() are API actions and both actions count towards the IO Free (data/minute) rate limit you mentioned. Could you post your code so I can take a look at it?

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”