Control API

1 Power control

Request

    {
      "directive": {
        "header": {
           "namespace": "DNA.PowerControl",
           "name": "ChangePowerState",
           "interfaceVersion": "2",
           "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	      "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "powerState": "ON"
        }
      }
    }

Response

    {
      "context": {
        "properties": [ {
           "namespace": "DNA.PowerControl",
           "name": "powerState",
           "value": "ON",
           "timeOfSample": "2017-02-03T16:20:50.52Z"
        } ]
      },
      "event": {
        "header": {
           "namespace": "DNA.PowerControl",
           "name": "Response",
           "interfaceVersion": "2",
           "messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
2 Channel control

Request

    {
      "directive": {
        "header": {
           "namespace": "DNA.ChannelControl",
           "name": "ChangeChannel",
           "interfaceVersion": "2",
           "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {

          "endpointId": "appliance-001",
          "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
              "channelNumber":"1234"
        }
      }
    }

Response

    {
      "context": {
        "properties": [ {
           "namespace": "DNA.ChannelControl",
           "name": "channelNumber",
           "value":"123",
           "timeOfSample": "2017-02-03T16:20:50.52Z"
        } ]
      },
      "event": {
        "header": {
           "namespace": "DNA.ChannelControl",
           "name": "Response",
           "interfaceVersion": "2",
           "messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }

Request:

    {
      "directive": {
        "header": {
          "namespace": "DNA.ChannelControl",
          "name": "AdjustChannel",
          "messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
          "payloadVersion": "2"
        },
       "endpoint": {
          "endpointId": "appliance-001",
          "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "channelSteps" : 1
        }
      }
    }

Response:

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.ChannelControl",
               "name": "channelSteps",
               "value": 1
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
3 Volume control

request:

    {
      "directive": {
        "header": {
          "namespace": "DNA.VolumeControl",
          "name": "AdjustVolume",
          "messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "volumeSteps": 2
        }
      }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.VolumeControl",
               "name": "volumeSteps",
               "value": 20
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }

request:

    {
      "directive": {
        "header": {
          "namespace": "DNA.VolumeControl",
          "name": "SetVolume",
          "messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "<appliance-001>",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "volume": 50
        }
      }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.VolumeControl",
               "name": "volume",
               "value": 50
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }

Request:

    {
      "directive": {
        "header": {
          "namespace": "DNA.VolumeControl",
          "name": "SetMute",
          "messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
          "payloadVersion": "3"
        },
        "endpoint": {
          "endpointId": "<appliance-001>",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "mute": true
        }
      }
    }

Response:

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.VolumeControl",
               "name": "mute",
               "value": true
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
4Play control
5Wind control

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.WindSpeedControl",
          "name": "SetWindSpeed",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "windSpeed": "HIGH"
        }
      }
    }

Response:

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.PercentageControl",
               "name": "windSpeed",
               "value":"HIGH",
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }

Request:

    {
      "directive": {
        "header": {
          "namespace": "DNA.WindSpeedControl",
          "name": "AdjustWindSpeed",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "windSpeedSteps": 1
        }
      }
    }

Response:

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.PercentageControl",
               "name": "windSpeedSteps",
               "value":1,
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
6Wind direction control

7 Color control

Request

    {
        "directive": {
            "header": {
                "namespace": "DNA.ColorControl",
                "name": "SetColor",
                "interfaceVersion": "2",
                "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
            },
            "endpoint": {
                "endpointId": "appliance-001",
		"devicePairedInfo":devicePairedInfo,
                "cookie": {}
            },
            "payload": {
                "color": {
                    "hue": 350.5,
                    "saturation": 0.7138,
                    "brightness": 0.6524
                }
            }
        }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.ColorControl",
               "name": "color",
               "value":{
                    "hue": 350.5,
                    "saturation": 0.7138,
                    "brightness": 0.6524
               },
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
8Color name control

Request

    {
        "directive": {
            "header": {
                "namespace": "DNA.ColorNameControl",
                "name": "SetColorName",
                "interfaceVersion": "2",
                "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
            },
            "endpoint": {
                "endpointId": "appliance-001",
		"devicePairedInfo":devicePairedInfo,
                "cookie": {}
            },
            "payload": {
                "colorName": "RED"
            }
        }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.ColorNameControl",
               "name": "colorName",
               "value":"RED",
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
9 Color temperature control

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.ColorTempControl",
          "name": "SetColorTemp",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "colortemp": 3000
        }
      }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.ColorTempControl",
               "name": "colortemp",
               "value":3000,
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
10Brightness control

*Change brightness directly

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.BrightnessControl",
          "name": "SetBrightness",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "brightness": 42
        }
      }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.BrightnessControl",
               "name": "brightness",
               "value":42,
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.BrightnessControl",
          "name": "AdjustBrightness",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "brightnessSteps": 42
        }
      }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.BrightnessControl",
               "name": "brightness",
               "value":42,
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
11 Percentage control

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.PercentageControl",
          "name": "SetPercentage",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "percentage": 74
        }
      }
    }

Response

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.PercentageControl",
               "name": "percentage",
               "value":42,
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
12Thermostat control
13Mode control

Request:

    {
      "directive": {
        "header": {
          "namespace": "DNA.ThermostatControl",
          "name": "SetMode",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {
          "mode": "COLD"
        }
      }
    }

Response:

    {
      "context": {
        "properties": [
            {
               "namespace": "DNA.ThermostatControl",
               "name": "mode",
               "value":"COLD",
               "timeOfSample": "2017-02-03T16:20:50.52Z"
            }
        ]
      },
      "event": {
          "header": {
          "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
          "name": "Response",
          "payloadVersion": "2"
        },
        "endpoint": {
          "endpointId": "appliance-001"
        },
        "payload": {
        }
      }
    }
14Temperature sensoring

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.TemperatureSensor",
          "name": "ReportState",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {}
      }
    }

Response

        {
          "context": {
            "properties": [
                {
                   "namespace": "DNA.TemperatureSensor",
                   "name": "temperature",
                   "value":{
                        "value":12,
                        "scale":"CELSIUS",
                        "attributeName":""
                        "scaleName":"",
                        "valueName":""
                   },
                   "timeOfSample": "2017-02-03T16:20:50.52Z"
                }
            ]
          },
          "event": {
              "header": {
              "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
              "name": "StateReport",
              "payloadVersion": "2"
            },
            "endpoint": {
              "endpointId": "appliance-001"
            },
            "payload": {
            }
          }
        }
15Humidity sensoring

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.HumiditySensor",
          "name": "ReportState",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {}
      }
    }

Response

        {
          "context": {
            "properties": [
                {
                   "namespace": "DNA.HumiditySensor",
                   "name": "humidity",
                   "value":{
                        "value":12,
                        "scale":"",
                        "attributeName":""
                        "scaleName":"",
                        "valueName":""
                   },
                   "timeOfSample": "2017-02-03T16:20:50.52Z"
                }
            ]
          },
          "event": {
              "header": {
              "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
              "name": "StateReport",
              "payloadVersion": "2"
            },
            "endpoint": {
              "endpointId": "appliance-001"
            },
            "payload": {
            }
          }
        }
16PM2.5 sensoring

Request

    {
      "directive": {
        "header": {
          "namespace": "DNA.PM2_5Sensor",
          "name": "ReportState",
          "interfaceVersion": "2",
          "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
        },
        "endpoint": {
          "endpointId": "appliance-001",
	  "devicePairedInfo":devicePairedInfo,
          "cookie": {}
        },
        "payload": {}
      }
    }

Response

        {
          "context": {
            "properties": [
                {
                   "namespace": "DNA.PM2_5Sensor",
                   "name": "pm2_5",
                   "value":{
                        "value":20,
                        "scale":"",
                        "attributeName":""
                        "scaleName":"",
                        "valueName":""
                   },
                   "timeOfSample": "2017-02-03T16:20:50.52Z"
                }
            ]
          },
          "event": {
              "header": {
              "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
              "name": "StateReport",
              "payloadVersion": "2"
            },
            "endpoint": {
              "endpointId": "appliance-001"
            },
            "payload": {
            }
          }
        }
17Query state

Request

        {
          "directive": {
            "header": {
              "messageId": "abc-123-def-456",
              "namespace": "DNA.TemperatureSensor"|“DNA”,
              "name": "ReportState",
              "interfaceVersion": "2"
            },
            "endpoint": {
              "endpointId": "appliance-001",
	      "devicePairedInfo":devicePairedInfo,
              "cookie": {},
            },
            "payload": {
            }
          }
        }

Response:

        {
          "context": {
            "properties": [
                {
                   "namespace": "DNA.TemperatureSensor",
                   "name": "temperature",
                   "value":{
                        "value":12,
                        "scale":"",
                        "attributeName":""
                        "scaleName":"",
                        "valueName":""
                   },
                   "timeOfSample": "2017-02-03T16:20:50.52Z"
                }
            ]
          },
          "event": {
              "header": {
              "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
              "name": "StateReport",
              "payloadVersion": "2"
            },
            "endpoint": {
              "endpointId": "appliance-001"
            },
            "payload": {
            }
          }
        }
18Motion control
19 AC control
{
  "directive": {
    "header": {
       "namespace": "DNA.ACControl",
       "name": "set",
       "interfaceVersion": "2",
       "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
    },
    "endpoint": {
      "devicePairedInfo":devicePairedInfo,
      "endpointId": "",
      "cookie": {}
    },
    "payload": {
       "state":{ 
        	"powerState":"ON",
        	"mode":"COLD",
       		"windSpeed":"AUTO",
        	"fixedTargetTemperature":26
       } 
    }
  }
}