Capturing Response from ST Web Req Driver

Via a Rule I am triggering a local HTTP GET via the ST Web Requestor Driver.

It does not look like the response is provided back to SharpTools. I can see the action happening successfully in SmartThings:

What is confusing though I see something in SharpTools from days ago - but I can’t be sure exactly what triggered that data.

Am I missing something? I may just not fully understand how this works.

Device commands in SmartThings don’t have a concept of directly responding with a value.

Instead, when you execute a command on a device, the device might respond by (asynchronously) updating an attribute. So in the case of the Web Requestor driver, it looks like it’s updating a ‘response’ attribute with information about the response.

The note at the bottom of the attribute list in your SharpTools screenshot explains the data being from a few days ago.

:warning: Grayed out attributes do not have event subscriptions and the values may be stale or outdated

If you haven’t used that attribute in a dashboard or as a trigger in a rule, it’s not subscribed and thus the data is from the last time the device was synced over to SharpTools.

Thanks Josh. I think I get it now.

@josh, I’m still struggling with this. With the attribute ‘response’ subscribed to in SharpTools, how can I then get that attribute contents populated in a variable?

Since things are asynchronous with the Web Requestor, you could either:

  • Send the command, delay a few seconds, and then check the response to copy it into your variable
  • Setup a separate rule with the response changing as the trigger and then have the flow copy the value into your variable

I’ve taken the two rule approach that you suggested. However, something is not quite right. I have the Web Requestor response both on a dashboard and in a rule yet the response (that is updating in SmartThings) is not updating in SharpTools. It did update when I added it to a dashboard initially but it hasn’t since.

Can you send a note to support with the Device ID in question so we can take a closer look?

I tried setting up a test and the various attributes were updating as expected for me through a number of iterations. I’m wondering if something with the event subscription might have gotten out of whack since this would be something of a one-off event subscription with it being a unique custom capability. :thinking:

Just sent.

Thanks Josh.