Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rest] Allow invoking ThingActions via API #2810

Merged
merged 3 commits into from
Jan 1, 2023

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Feb 28, 2022

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.

@J-N-K J-N-K requested a review from a team as a code owner February 28, 2022 15:17
@J-N-K
Copy link
Member Author

J-N-K commented Feb 28, 2022

Test fails unrelated.

@wborn wborn added enhancement An enhancement or new feature of the Core REST/SSE labels Mar 5, 2022
J-N-K added 3 commits March 11, 2022 15:38
Signed-off-by: Jan N. Klug <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
@J-N-K J-N-K force-pushed the feature-restthingactions branch from 3fd28a4 to 9bd706a Compare March 11, 2022 14:38
@kaikreuzer
Copy link
Member

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.

@jlaur
Copy link
Contributor

jlaur commented Jan 1, 2023

@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?

@kaikreuzer
Copy link
Member

Thanks for the ping @jlaur, seems this got lost from my radar.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and sorry for having it hanging for so long...

@openhab-bot
Copy link
Collaborator

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

@spacemanspiff2007
Copy link
Contributor

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": []
  }
]

@openhab-bot
Copy link
Collaborator

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

@spacemanspiff2007
Copy link
Contributor

@J-N-K : Since you create the PR:
What does the tag and reference do?

@spacemanspiff2007
Copy link
Contributor

@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": ""
      }

@J-N-K
Copy link
Member Author

J-N-K commented Jun 13, 2023

@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.

@spacemanspiff2007
Copy link
Contributor

spacemanspiff2007 commented Jun 13, 2023

Thank you for your quick response. I'll ignore these fields for the HABApp users then.

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
* [rest] Allow invoking ThingActions via API

Signed-off-by: Jan N. Klug <[email protected]>
GitOrigin-RevId: 062e4a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core REST/SSE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REST] Endpoint for binding actions missing
6 participants