Create an existing device

<< Click to Display Table of Contents >>

Navigation:  The API > JSON Adminstrator API > REST Resources > Devices > POST > QR Code for existing Sensors >

Create an existing device

Existing Sensor

If you have scanned the QR Code, the following call will transmit it to the gateway.

 

NOTE: The QR-Code has to be generated according to the following rules: QR-Code for existing Sensors

 

Client to Gateway:

Resource Path

HTTP method

/devices

POST

 

Necessary  call parameters:

parameter

datatype

value / formatting

description

header

object

{}

standard header object with content = devices

device

object

{}

test object

 

learnInProcedure

string

internetOfThings

must be "internetOfThings"

 

firstSeen

string

yyyy-mm-ddT hh:mm:ss.sss+ hhmm

date/time

 

iotLabel

string

30S0000FEFEAE38+1P004B0CD50001+10Z00+20ZRockerButton

Valid Label. Refer to QR-Code for existing Sensors

 

 

example:

App POST command having scanned a QR-Code

Return Value of the POST command

 

POST /devices

Body:

{

  "header" : {

    "content" : "device",

    "timestamp" : "2015-11-13T20:53:03.795+0100"

  },

  "device" : {

    "learnInProcedure" : "internetOfThings",

    "firstSeen" : "2015-11-13T20:53:03.795+0100",

    "iotLabel" : "30S0000FFBE7880+1P004B49A52001+10Z00+20ZRockerButton"

  }

}

 

Answer of the gateway to a QR- POST command

{

  "header" : {

    "httpStatus" : 200,

    "content" : "device",

    "gateway" : "DC-GW/EO-IP v0.98.22",

    "timestamp" : "2015-12-18T17:40:41.261+0100"

  },

  "device" : {

    "deviceId" : "FFBE7880",

    "friendlyId" : "RockerButton",

    "communicationType" : "bidirectional",

    "learnInProcedure" : "internetOfThings",

    "eep" : "A5-20-01",

    "manufacturer" : "Micropelt GmbH",

    "baseIdChannel" : "0",

    "firstSeen" : "2015-11-13T20:53:03.795+0100",

    "secured" : false,

    "iotLabel" : "30S0000FFBE7880+1P004B49A52001+10Z0020ZRockerButton",

    "softSmartAck" : false,

    "transmitModes" : [ {

      "key" : "energyInput",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "serviceMode",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "contact",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "temperature",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "batteryLow",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "energyStorageCharged",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "window",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "valve",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    }, {

      "key" : "actuatorObstructed",

      "transmitOnConnect" : true,

      "transmitOnEvent" : true,

      "transmitOnDuplicate" : false

    } ],

    "operable" : true,

    "supported" : true

  }

}