Structure of sent data into CitySys

Data is sent to the system via messages in JSON format using the MQTT protocol. The basic structure of the data sent is as follows:


object identifier

It is a unique object identifier that is unique in the system. It is not possible for the system to have two identical object identifiers. The ej value can be copied from City Studio from the TB name field.


ts

It represents a time stamp assigning the values in the “values” section to the timeline according to the time of their creation. Data is entered in UNIX format (Epoch format).


values

It represents the list and values of the Attributes sent to the given timestamp.


Sample JSON message structure

{
  "<object identifier>": [
    {
      "ts": <timestamp>,
      "values": {
        ...
      }
    }
  ]
}
An example of a report format for a parking space
{
  "1092": [
    {
      "ts": 1666178890739,
      "values": {
        "available": false,
        "status": "OK",
        "vehicle_type": "Car",
        "start_time": 1666155187000,
        "duration": 23703
      }
    }
  ]
}