Variable extensions, GET, PUT and POST in one HTTP binding?

:smiley: quote=“rlkoshak, post:2, topic:150353”]
The unicorn case isn’t going to happen without rules. But using a String Item that triggers a rule, you can implement all of the rest in the rule no problem using the sendHttpPutRequest Action.
[/quote]

Wow, nice idea! :+1:So it’s just one general rule and this is triggered by the string Item being updated
 theoretically even another item for a return value, if any required, would be possible.

It’ll take some time, but as soon as I have something like this working, I’ll share it at this place! :slight_smile:

UPDATE

Weeeell
 that went way better than expected. I just wanted to gite it a quick try. It’s working.:smiley:

val HomePilotIP = "192.168.1.5";
val timeout = 3000;
var sceneName = HomePilot_Scene_Trigger.state.toString;
var searchString = "$.scenes[?(@.name==\"" + sceneName + "\")].sid";
var JsonSceneMap = sendHttpGetRequest("http://" + HomePilotIP + "/v4/scenes", timeout);
var SID = transform("JSONPATH", searchString, JsonSceneMap);
var url = "http://" + HomePilotIP + "/scenes/" + SID + "/actions";
var cmd = "{\"request_type\":\"EXECUTESCENE\", \"trigger_event\":\"TRIGGER_SCENE_MANUALLY_EVT\"}"
var result = sendHttpPostRequest(url, "application/json", cmd, timeout);

With this in a rule which triggers on any update on HomePilot_Scene_Trigger, a String item, it actually triggers the scene by its written clear name in the HomePilot. Very, very cool. Thanks a lot!!!