WebThingsIO / api

Web Thing API Specification
http://iot.mozilla.org/wot/
Other
164 stars 25 forks source link

Persistence of Action states #54

Open coderbyheart opened 6 years ago

coderbyheart commented 6 years ago

The documentation gives the impression that a Thing is expected to persist the state of actions and also the events that happened while processing the action request.

Especially for resource constrained devices this is unfavorable and they will most likely apply the action and internally discard the data associated with the request.

Especially in that case of the reboot example the documentation gives the impression that a rebooted device should have a history of a previous reboot request.

It should be allowed for a thing to return a 404 for an action request that it has processed. In that case the Thing should publish the action status to the websocket, if the Thing supports it.

benfrancis commented 6 years ago

For resource constrained devices it's more likely that they will use the gateway integration pattern and the gateway will be responsible for logging this data for the device.

But yes, we could note that providing a list of past actions and events is optional. This isn't yet a formal web specification so there are probably lots of things like this which will need marking as mandatory or optional.