"serial" : "282C024FFFB3",
"response_handle": 3,
"battery" : "ok",
"signal" : -70,
"measured_at" : "2018-10-12 15:28:21",
"measurement_interval" : 180,
"next_measurement_at" : "2018-10-12 20:28:21",
"params" : [
{ "channel" : 1, "type" : "temperature", "value" : 50},
{ "channel" : 2, "type" : "humidity", "value" : 30},
{ "channel" : 3, "type" : "pressure_diff", "value" : 21 }
]
},
{
"serial" : "282C024FFFB4",
"response_handle": 4,
"battery" : "ok",
"signal" : -70,
"measured_at" : "2018-10-12 15:28:21",
"measurement_interval" : 180,
"next_measurement_at" : "2018-10-12 16:28:21",
"params" : [
{ "channel" : 1, "type" : "open-close", "value" : "open"},
{ "channel" : 2, "type" : "open-close", "value" : "closed"},
{ "channel" : 3, "type" : "open-close", "value" : "closed"}
]
}
]
}
Server should always answer with “
201 Created
” to a message sent by Efento Gateway. Otherwise, the
gateway will consider the message as not received by the server and will resend it in a loop. Moreover, the
server should include in the message body the list of the IDs of accepted sensors along with the information,
if the gateway should synchronize the measurements of these sensors with the server (ID of each sensor is
sent by the gateway in the JSON in the “
response_handle
” field. Response body:
{
"
Y
": [number],
// IDs of sensors, which should be synchronised with the server
"
N
": [number]
// IDs of sensors, which should NOT be synchronised with the server
}
Example of the http response sent to the gateway:
{
"Y":[1,2,3],
"N":[4]
}