{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Payload", "anyOf": [ { "description": "You can send a single message in a payload", "allOf": [ { "$ref": "#/definitions/MqttMessagePayload" } ] }, { "$ref": "#/definitions/MqttSensorPayload" }, { "description": "You can also send a list in a payload. You should try to use this approach if applicable.", "allOf": [ { "$ref": "#/definitions/MqttMessagePayloadList" } ] }, { "$ref": "#/definitions/MqttSensorPayloadList" } ], "definitions": { "MqttMessagePayload": { "type": "object", "required": [ "class_id", "lat", "long", "tracking_id" ], "properties": { "acceleration_ms": { "description": "the current acceleration in meters per second", "type": [ "number", "null" ], "format": "float" }, "class_confidence": { "description": "An percentage value specifying how confident the client is about the objects class", "type": [ "number", "null" ], "format": "float" }, "class_id": { "description": "An integer that corresponds to an object class. The mapping is currently done globally.", "type": "integer", "format": "int32" }, "data": { "description": "This field can be used to store arbitrary JSON data" }, "heading": { "description": "Heading information in radians", "type": [ "number", "null" ], "format": "float" }, "lat": { "description": "Latitude information as specified in ISO 6709", "type": "number", "format": "double" }, "level": { "description": "Height information in centimeters", "type": [ "number", "null" ], "format": "float" }, "long": { "description": "Longitude information as specified in ISO 6709", "type": "number", "format": "double" }, "object_height": { "description": "An objects height in centimeters", "type": [ "number", "null" ], "format": "float" }, "object_length": { "description": "An objects length in centimeters", "type": [ "number", "null" ], "format": "float" }, "object_width": { "description": "An objects width in centimeters", "type": [ "number", "null" ], "format": "float" }, "pitch": { "description": "Pitch information in radians", "type": [ "number", "null" ], "format": "float" }, "time": { "description": "The time at which the measurement was taken. This value is optional and if no value is supplied, the time the server receives the message is used as a default.", "type": [ "string", "null" ], "format": "date-time" }, "tracking_id": { "description": "A tracking id given to an object to distinguish it from other objects. The tracking id can be assigned by the client and will be internally mapped to a unique uuid by the server. The tracking id isn't required to be globally unique and can repeat after some time (~3h).", "type": "integer", "format": "uint32", "minimum": 0.0 }, "velocity_ms": { "description": "the current velocity recorded in meters per second", "type": [ "number", "null" ], "format": "float" } } }, "MqttMessagePayloadList": { "type": "object", "required": [ "measurements" ], "properties": { "measurements": { "description": "A list of measurements", "type": "array", "items": { "$ref": "#/definitions/MqttMessagePayload" } } } }, "MqttSensorPayload": { "type": "object", "required": [ "sensor_id" ], "properties": { "lat": { "description": "Latitude information as specified in ISO 6709 - can be sent to position the sensor", "type": [ "number", "null" ], "format": "double" }, "level": { "description": "Height information in centimeters - can be sent to position the sensor", "type": [ "number", "null" ], "format": "float" }, "long": { "description": "Longitude information as specified in ISO 6709 - can be sent to position the sensor", "type": [ "number", "null" ], "format": "double" }, "sensor_class_id": { "description": "An integer that corresponds to a sensor object class. The mapping is currently done globally.", "type": [ "integer", "null" ], "format": "int32" }, "sensor_id": { "description": "A sensor id given to a sensor to distinguish it from other sensors. The sensor id is assigned by the client and must be unique for the location. The sensor id will be internally mapped to a unique uuid by the server.", "type": "integer", "format": "uint32", "minimum": 0.0 }, "state": { "description": "This field can be used to store the current sensor state as key-value-pair" }, "time": { "description": "The time at which the measurement was taken. This value is optional and if no value is supplied, the time the server receives the message is used as a default.", "type": [ "string", "null" ], "format": "date-time" } } }, "MqttSensorPayloadList": { "type": "object", "required": [ "measurements" ], "properties": { "measurements": { "description": "A list of measurements", "type": "array", "items": { "$ref": "#/definitions/MqttSensorPayload" } } } } } }