Generic Sdk

Generic SDK Protocol

This document contains the information about the generic SDK for devices of the dialog IOT platform. This includes how to perform authentication, message flow which the SDK communicate with dialog IOT platform and vice versa.

1. Authentication

For the generic SDK devices authentication is done via authentication key. The authentication key will be the serial number which will be auto generated at the time of adding the device to the IOT platform. If the user needs he can regenerate the authentication key (serial number) .

Note : regeneration of the serial number will not be available at the initial phase.

2. Action

Generic device contains the ten actions and below show the json message format.

{
    "action": "actionOne",
    "param": {
        "parentMac": "abcd",
        "mac": "abcd",
        "ac1Value1": <DOUBLE/STRING>,
        "ac1Value2": <DOUBLE/STRING>,
        "ac1Value3": <DOUBLE/STRING>,
        "ac1Value4": <DOUBLE/STRING>,
        "ac1Value5": <DOUBLE/STRING>
    }
}

For each action there are five variable (ac1Value1, ac1Value2,…,ac1Value5) in the which the action information will be carried to the SDK.

3. Event

Generic device contains the ten Events and below show the json message format.

{ 
    "mac": "abcd",
    "eventName ": "eventOne ",
    "state": "none",
    "eventOne ": {
        "ev1Value1": <DOUBLE> ,
        "ev1Value2": <DOUBLE> ,
        "ev1Value3": <DOUBLE> ,
        "ev1Value4": <DOUBLE> ,
        …….
        …….
        "ev1value15":<DOUBLE>,
        "ev1value16":<STRING>,
        "ev1value17":<STRING>,
        …….
        …….
        "ev1value24":<STRING>,
        "ev1value25":<STRING> 
    }
}

For each Event there are twenty five variables(value1,value2,…,value24,value25) in the which the event information will be carried from the SDK to the IOT platform.

The communication protocol which this message format supports will be http, https and MQTT.

Last updated on 22nd Apr 2018