Interface to/from sensors/gateways

Prerequisites

Protocol

Topics/Message Types

From Edge Gateway to Cloud (publish)

Historical data

Topic: <orgShortName>/hd/<serial>

Example

[{
    "processing_level": 0,
    "sensor_id": "Temperature",
    "timestamp": "2019-08-06T13:02:59.975Z",
    "value": 7
},{
    "processing_level": 0,
    "sensor_id": "Temperature",
    "timestamp": "2019-08-06T13:03:58.478Z",
    "value": 11
}, {
    "processing_level": 0,
    "sensor_id": "Temperature",
    "timestamp": "2019-08-06T13:04:59.975Z",
    "value": 56
},{
    "processing_level": 0,
    "sensor_id": "Temperature",
    "timestamp": "2019-08-06T13:05:58.478Z",
    "value": 50
}]

Attribute definitions

Attribute nameData type Comments 

sensor_id

StringUnique sensor identifier

processing_level

Stringindicates if there was a problem during the processing on the data. the value will be tagged. 0 mean no problem

timestamp

String

ISO 8601 (with Timezone Information)

in case of an empty string would the server would generate a now() timestamp

value

Number, String, BooleanMeasurement taken
Special sensor: device_gps_location
[
{"timestamp": "", "sensor_id": "device_gps_location", "error_code": 0, "value": "47.3597222222,13.5955555556"}
]

Events

Topic: <orgShortName>/events/<serial>

[{
	"output": "eval based on 22",
	"sensor_id": "Temperature",
	"state": "HOT",
	"timestamp": "2016-01-01T19:02:59.975+0100",
	"severity": 0
}]

(info) we recommend to send events immediately

(info) events can contain values as "hd" array element (preferably values that had an influence to the new event)

[{
	"hd": [{
		"processing_level": 0,
		"sensor_id": "Temperature",
		"timestamp": "",
		"value": -10
	}],
	"output": "eval based on -10",
	"sensor_id": "Temperature",
	"state": "COLD",
	"timestamp": "",
	"severity": 200
}]

Attribute definitions

Attribute nameData type Comments 

sensor_id

String

processing_level

String

timestamp

String

state

String
severityNumber

by default this mapping

(green star) 0 → OK,

(star) 0 < severity < 100 → WARNING,

(red star) 100<x<200 → CRITICAL (DANGER)

outputStringdetailed info describing the state
hdArrayHistorical data, array of historical data elements
Special sensor: cloud_connected

System Messages

Topic: <orgShortName>/sys_msg/<serial>

[{
	"timestamp": "",
	"type": "job_status",
	"severity": 0,
	"code": 123,
	"output_short": "test",
	"output_long": "Job successfuly started"
}]

Attribute definitions

Attribute nameData type Comments 

timestamp

String
typeString
severityNumber


codeNumber

output_short

String

output_long

String

references

Objectfree list of reference objects


Special Message Type "rev_info_report"

VSData

Topic: <orgShortName>/vs_data/<serial>/<sensor_id>

Images

Topic: <orgShortName>/imgdata/<serial>

open

From Cloud to Edge gateway (subscribe)

Actions

Topic: cloud/<serial>/exec_action/<actuator_id>


{
    "action_id": "SimulatedSensor",
    "exec_uid": "1bb083fc-8924-4324-8971-db22513ca78c",
    "origin": "SSCServices",
    "user_id": 70752,
    "command_id": "OK"
}