All urls described on this page are related to cerating, deleting and updating devices and there coresponding parameters on the Rinor DB.
a couple of steps are required for creating a device: 1. get the parameters for the device type you want to add: GET /device/params 2. create the device itself: POST /device 3. add the global parameters: PUT /device/addglobal 4. add the xplcommand specifick parameters: PUT /device/xplcmdparams 5. add the xpl stat specifick parameters: PUT /device/xplstatparams
Step 4 and 5 are optional steps
List all devices known by domogik
Result:
[
{
"xpl_stats": [
{
"schema": "lighting.device",
"core_device": null,
"params": [
{
"xplstat_id": 14,
"core_sensor": null,
"sensor_id": null,
"core_xplstat": null,
"value": "2",
"ignore_values": null,
"static": true,
"key": "channel"
},
{
"xplstat_id": 14,
"core_sensor": null,
"sensor_id": null,
"core_xplstat": null,
"value": "80",
"ignore_values": null,
"static": true,
"key": "device"
},
{
"xplstat_id": 14,
"core_sensor": {
"conversion": "from_level_to_DT_Switch",
"core_device": null,
"data_type": "DT_Switch",
"name": "level sensor",
"last_received": 1371318247,
"params": [
null
],
"last_value": "0",
"id": 14,
"reference": "level_bin",
"device_id": 10
},
"sensor_id": 14,
"core_xplstat": null,
"value": null,
"ignore_values": "",
"static": false,
"key": "level"
}
],
"core_xplcommand": [
{
"stat": null,
"core_device": null,
"name": "blah",
"stat_id": 14,
"core_command": {
"return_confirmation": true,
"core_device": null,
"reference": "set_level_bin",
"params": [
{
"key": "level",
"conversion": "from_DT_Switch_to_level",
"data_type": "DT_Switch",
"cmd_id": 3,
"core_command": null
}
],
"xpl_command": null,
"device_id": 10,
"id": 3,
"name": "Switch On or Off"
},
"params": [
{
"core_xplcommand": null,
"value": "2",
"key": "channel",
"xplcmd_id": 3
},
{
"core_xplcommand": null,
"value": "80",
"key": "device",
"xplcmd_id": 3
}
],
"cmd_id": 3,
"json_id": "set_level_bin",
"schema": "lighting.basic",
"id": 3,
"device_id": 10
}
],
"json_id": "get_level_bin",
"device_id": 10,
"id": 14,
"name": "get_level_bin"
}
],
"commands": [
null
],
"description": "",
"reference": "",
"xpl_commands": [
null
],
"device_type": {
"plugin_id": "velbus",
"plugin": {
"version": "0.5.0",
"description": "velbus interface",
"id": "velbus"
},
"description": "Switch one channel on a device",
"name": "Switch",
"id": "velbus.relay"
},
"address": null,
"device_type_id": "velbus.relay",
"sensors": [
null
],
"id": 10,
"name": "test"
}
]
Del the device (will delete all commands, sensors, sensor history and all xpl stuff from the db)
Result : same as GET /device with only the user deleted