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

Clarifying that actions can be about non-physical processes #1974

Open
egekorkan opened this issue Feb 15, 2024 · 1 comment
Open

Clarifying that actions can be about non-physical processes #1974

egekorkan opened this issue Feb 15, 2024 · 1 comment
Labels
Editorial Issues with no technical impact on implementations

Comments

@egekorkan
Copy link
Contributor

egekorkan commented Feb 15, 2024

The spec states "ActionAffordance: An Interaction Affordance that allows to invoke a function of the Thing, which manipulates state (e.g., toggling a lamp on or off) or triggers a process on the Thing (e.g., dim a lamp over time)". Both of those suggest a primarily one-way action and both modify Thing state in some way. There are many examples of functions/actions that simply ask the Thing to perform a task that may return data but not alter state - querying log files, querying local data such as sensor history or application data, and so on. These do not modify the state in any way.

Coming from a separate discussion with @RickBullotta

@github-actions github-actions bot added the needs-triage Automatically added to new issues. TF should triage them with proper labels label Feb 15, 2024
@benfrancis
Copy link
Member

Just recording my comments from the same conversation here, since I'm not convinced that actions should be used for the kinds of use cases suggested.

Personally my rule of thumb is that you should only use an action when the setting of a property alone is not sufficient to affect a required change in state.

This may be used to describe a function which takes a period of time to complete, manipulates multiple properties, or has a different outcome based on provided arguments or current state. Examples might include a "fade" action which has a specified "duration", a "sequence" action which triggers a sequence of flashing lights or a "toggle" action on a switch.

I always struggle to think of good examples of actions which have an output, but I can imagine a machine which carries out an action and then reports back its status, e.g. you tell a robot to go and collect all the widgets from a room and once it's finishes it reports back how many widgets it collected.

I personally don't think that querying log files or historical sensor data are great examples of actions. Partly because they could be modelled as reading a property, but actually maybe they're not interaction affordances at all (since they don't represent the current state of a physical device).

WebThings Gateway used to have an API for historical sensor data and we spent time arguing for an operation type for reading historical values of properties, but in the end concluded it was out of scope. There is a topic around time-series data for WoT 2.0, so maybe there will be a formally defined mechanism for that in the future.

@egekorkan egekorkan added Editorial Issues with no technical impact on implementations and removed needs-triage Automatically added to new issues. TF should triage them with proper labels labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editorial Issues with no technical impact on implementations
Projects
None yet
Development

No branches or pull requests

2 participants