Chain physicalgraph.device.HubAction calls?

Hey folks,

New user here. Quick question for you… is it possible to have two physicalgraph.device.HubAction calls?

Here is what I see:
I do have command that I run, that spawns physicalgraph.device.HubAction with GET request -> reaches parse (as expected) -> based on the output from the previous command (headers and body) I do want to run another physicalgraph.device.HubAction GET. That runs fine, although I don’t get any data back, even when two queries looks exactly the same.

In other words:
I hit the button in my device -> physicalgraph.device.HubAction is called (GET req) -> parse reached, output parsed -> spawned another command based on the output -> physicalgraph.device.HubAction … not reaching parse() anymore with updated output - even if the second query is the same as the first one. Everything in one call.

Is that expected? [ cc: @pstuart ]

I believe there is a minimum wait time between requests. Try the second request after a runIn() command for like 60 seconds.

Any reason why you can’t do both queries at the same time? Seems odd to need to query same device that quickly.

1 Like

Ok… that would explain a lot. I was working on a www digest authentication and to get the token you need to have two calls in a row. Code is fully published and available in that thread: Samsung SmartCam: SNH-P6410BN, SNH-E6440BN and SNH-1011ND (+WWW Digest auth) (tested and working)

Thanks!