info.json for plugins - xpl_commands section

Purpose

The xpl_command section will describe all xPL messages that must be sent by Domogik to trigger an action in the plugin.

Example

This example is the velbus plugin. See the device types documentation for more informations.

"xpl_commands": {
     "set_level_bin": {
        "name": "blah",
        "schema": "lighting.basic",
        "xplstat_name": "get_level_bin",
        "parameters": {
            "static": [],
            "device": []
        }
     },
     ...

Description

For each message you need to set:

  • name: it will be displayed in the user interface when you will configure a widget.

  • schema: the xPL schema used by the plugin.

  • xplstat_name: The xPL stat/trig message that should be received ones the command is executed by the plugin

  • parameters: all the parameters of the xPL message.

    • static: all the static keys of the xPL message. Static keys will always be the same, whatever the device is. They will never be displayed in the user interface.

      • key: The xpl key
      • value: The value the xpl key must have
    • device : the static parameters. Their value is defined on a per device basis (input is requested) in the user interface.

      • description : short description of this field
      • type : the value type for this field. The available values are the same as the ones used in the configuration part of the json
      • key : The Xpl key
      • default : Optionaly a default value for this parameter, will be pre filled in in the admin interface during device creation