Siri Shortcuts asks webcore for info


#1

1) Give a description of the problem
I am using Siri Shortcuts to send a GET request to webcore in order to trigger a piston to run. However I’d like to be able to query webcore for some information about a smart device such as the current SHM (smart home monitor) status like disarmed, armed, etc. then have Siri tell me the answer.

2) What is the expected behaviour?
When Siri does the GET request to webcore, it will receive a JSON with information. Then based on what it got it will read a different answer

3) What is happening/not happening?
When i make my GET request I get a json with two answers. Followed by a Notification with its security state.

{“result”:“OK”,“timestamp”:1577040894610}

However I’d like skip the notification and instead let webcore deliver the info as part of the GET request like this:

{“result”:“OK”,“timestamp”:1577040894610, “SHM status”: “disarmed”}

But I’m open to other ways to getting info out of webcore

**4) Post a Green Snapshot of the piston


#2

This response:
{“result”:“OK”,“timestamp”:1577040894610}
happens at the instant the piston is triggered.

It does not wait until after the piston has processed, so that data can not be changed.


What I often do is send a web request (to wherever) from inside the piston…


#3

I guess I could create a piston that observes the SHM status and then makes a request to some other 3rd party resource and stores the result there (let setting a variable). Then my shortcut would ping the 3rd party source (for the value of that variable)

I have no idea what kind of third party resource that would be. Would you know?


#4

The easiest way is to not use Siri as the voicebox…
:
Your shortcut can execute a piston, and then the piston can do whatever, and announce the status directly to any speaker in your house.