Black Lives Matter - Action and Equality.
0

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.
Please be positive and constructive with your questions and comments.

No response to AdafruitIO_Feed get() request

by HullGarageDoors on Fri May 15, 2020 12:28 pm

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!

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

Re: No response to AdafruitIO_Feed get() request

by brubell on Fri May 15, 2020 5:02 pm

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?

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

Re: No response to AdafruitIO_Feed get() request

by HullGarageDoors on Fri May 15, 2020 8:44 pm

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

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

Re: No response to AdafruitIO_Feed get() request

by brubell on Mon May 18, 2020 10:11 am

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?

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

Please be positive and constructive with your questions and comments.