Rule Machine: HTTP GET request with parameters?

Is there a way to make a GET request with parameters using RM? Looks like the capability exists on the hub but I'm not finding an app that utilizes it. I'd like to be able to make a GET request with parameters to an internal node.js app running on my Pi to perform some actions.

Any GET / HTTP request can add parameters at the end of the url using the ?name=value combo. If follow the standard format of any HTTP(S) GET request.

ex:

http://username:password@hostname/somepath?name=value&2ndname=2ndvalue

Would authorize the user with password, call the hostname and request the somepath route and pass in the parameters name and name2 with values of value and 2nd value respectively

2 Likes

Perfect, that will work. Thanks for explaining.

For example, I use the following:

http://x.x.x.x:8080/snapshot?ot=2&oid=2

To send a command to my local iSpy server (on the local network at x.x.x.x).

This causes camera (ot=2) number 2 (oid=2) to take a still snapshot. This is triggered by a motion sensor that is part of the HE system. In this case it's an old generation 1 ST (zigbee) motion sensor.

2 Likes

Thanks, I got it working this morning :slight_smile:

1 Like

I use a GET request to say things through my sonos speakers using my Node Server. Do I need to select speakers when I set this in RM? Also, if I just select RM to "Speak this Message" and I select all the speakers that I want it to speak to, how do I set the volume?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.