openhab-core
openhab-core copied to clipboard
[rest] Allow invoking ThingActions via API
Closes #926
May I ask for guidance for the correct endpoint? Originally I thought that /things/{thingUid}/action would be a good idea but it turned out that having two classes providing endpoints under /things results in strange effects (like 404s even if the bundle is loaded). It is not possible to integrate this resource in the resource that provides /things without adding a dependency to the automation bundle.
Test fails unrelated.
May I ask for guidance for the correct endpoint?
I see your issue with the /things endpoint and don't have a solution for it.
If I see it correctly, you've now chosen a /actions/<thingUID>/<actionUID> path. I'd say that is a sensible choice, given the situation.
May I ask for guidance for the correct endpoint?
I see your issue with the /things endpoint and don't have a solution for it.
If I see it correctly, you've now chosen a /actions/<thingUID>/<actionUID> path. I'd say that is a sensible choice, given the situation.
@kaikreuzer - browsing through some old PR's I found this one. 🙂 With your latest comment, does it mean this PR is actually in a condition where it could be reviewed and potentially merged?
Thanks for the ping @jlaur, seems this got lost from my radar.
This pull request has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/openhab-4-0-wishlist/142388/292
I am currently looking at the actions of a DMX bridge.
What does the tag and reference do?
[
{
"actionUid": "dmx.sendFade",
"label": "immediately fade channels",
"description": "Immediately performs fade on selected DMX channels.",
"inputs": [
{
"name": "channels",
"type": "java.lang.String",
"label": "",
"description": "",
"required": false,
"tags": [],
"reference": "",
"defaultValue": ""
},
{
"name": "fade",
"type": "java.lang.String",
"label": "",
"description": "",
"required": false,
"tags": [],
"reference": "",
"defaultValue": ""
},
{
"name": "resumeAfter",
"type": "java.lang.Boolean",
"label": "",
"description": "",
"required": false,
"tags": [],
"reference": "",
"defaultValue": ""
}
],
"outputs": []
}
]
This pull request has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/philips-hue-clip-2-api-v2-discussion-thread/142111/121
@J-N-K : Since you create the PR:
What does the tag and reference do?
@J-N-K (or anyone else)
What does the tag and reference do in the response?
{
"name": "resumeAfter",
"type": "java.lang.Boolean",
"label": "",
"description": "",
"required": false,
"tags": [],
"reference": "",
"defaultValue": ""
}
@spacemanspiff2007 I have no idea. TBH I don't even know how you an assign tags to actions. The "reference" seems to be related to the (up to now) not implemented chaining of modules for passing output to other modules or getting input from other modules.
Thank you for your quick response. I'll ignore these fields for the HABApp users then.