Data Model Definition

Last modified: Jul 9, 2019 @ 14:40

HTTP Gateway supports the LWM2M 1.1 SenML based JSON message format. Moreover, only IPSO data structure model is acceptable by the gateway.

For Uplink: Devices should prepare the SenML message with IPSO resources and send to the Gateway.

For Downlink: Gateway prepares the SenML message with IPSO resources and sends to devices and device HTTP server interface should support the format accordingly.

The referenced table from LwM2M 1.1 specifications is supported.

Examples:

Example to show how to send Temperature and Humidity values to Gateway:

[ 
{ 
 "n": "3303/0/5700", 
 "v": "23.9" 
}, 
{ 
 "n": "3303/0/5701", 
 "vs": "Celcius" 
}, 
{ 
 "n": "3304/0/5700", 
 "v": "80" 
}, 
{ 
 "n": "3304/0/5701", 
 "vs": "Percentage" 
} 
]

Example which represents the historical values of Temperature sensor:

[ 
{ 
 "bn": "3303/0/5700", 
 "bt": 1.320067464e+09, 
 "v": 22.4 
},

{ 
 "v": 22.9 
}, 
{ 
 "v": 24.1 
}
]

Limitations

  • The payload data for DDM resources having String, Boolean, Integer, and Float are the only datatypes which are supported for uplink and downlink commands.

Note: Opaque and Timestamp data types are not supported for uplink and downlink commands.

  • DDM currently does not support the “t” (relative time ) field and hence HTTP GW also does not support it. The “bt” field is supported and can be used for each record separately which enables to set time explicitly.
  • All the objects which have “n” fields after the object having “bn” field are grouped to the same resource until another object with “bn” field is found. That is why objects with “n” field followed by object with “bn” field cannot represent individual resource.

For example, the following scenario is not accepted:

[ 
{ 
 "bn": "3303/0/5700", 
 "v": 22.4, 
}, 
{ 
 "n": "3303/0/5701", "
 vs": "Celcius" 
} 
]