New feature: Commands
The commands feature allows you to specify a generic set of actuators for a resource, which at runtime gets resolved to a specific actuator. This enables you for example to model lamps from different manufacturers with their capabilities such as (turn off/on, dimming etc..) and then at the meta level to define different actuations for different resources. This allows for much easier REST integrations with 3rd party apps.
Example: When a command is sent to the broker for the resource and command name SayHi, the engine will check the commands property of the resource’s metadata and see if there is a command SayHi mapped to an actual actuator. If such mapping exist, the Waylay engine will call the actual actuator.
We have also created a new actuator, called executeCommand. It is available on github and ready for you to download: https://docs.waylay.io/plugins/executecommand/
You can at any time check all commands sent to the resource by looking at the commands tab under the resource view: