Data Format (JSON)

This page describes the format needed to send information to the Syncware MQTT Broker

The JSON format for integrating sensors in the Syncware platform is a nested JSON structure that contains the following fields and data types:

{
  "id": "string",
  "date": "string",
  "time": "string",
  "battery": "double",
  "co2": "integer",
  "temperature": "double",
  "humidity": "double",
  "x_axis": "list of doubles",
  "y_axis": "list of doubles",
  "z_axis": "list of doubles",
  "mc_pm1_0": "list of doubles",
  "mc_pm2_5": "list of doubles",
  "mc_pm4_0": "list of doubles",
  "mc_pm10": "list of doubles",
  "nc_pm0_5": "list of doubles",
  "nc_pm1_0": "list of doubles",
  "nc_pm2_5": "list of doubles",
  "nc_pm4_0": "list of doubles",
  "nc_pm10": "list of doubles",
  "particle_size": "list of doubles"
}
  • "id": string, the unique identifier of the sensor
  • "date": string, the date of the data reading in the format of "YYYY/MM/DD"
  • "time": string, the time of the data reading in the format of "HH:MM:SS"
  • "battery": float, the battery level of the sensor in decimal form
  • "co2": integer, the level of CO2 in the environment
  • "temperature": float, the temperature reading in degrees Celsius
  • "humidity": float, the humidity level in percentage
  • "x_axis", "y_axis", "z_axis": arrays of float, the readings of the x, y, and z axis of the sensor
    "mc_pm1_0", "mc_pm2_5", "mc_pm4_0", "mc_pm10": arrays of float, the readings of the mass concentration of particulate matter with diameters less than or equal to 1.0, 2.5, 4.0, and 10.0 micrometers
  • "nc_pm0_5", "nc_pm1_0", "nc_pm2_5", "nc_pm4_0", "nc_pm10": arrays of float, the readings of the number concentration of particulate matter with diameters less than or equal to 0.5, 1.0, 2.5, 4.0, and 10.0 micrometers
  • "particle_size": array of float, the particle size readings in micrometers.

Here is an example of a JSON message in this format:

{
  "id": "sensor003",
  "date": "2023/2/9",
  "time": "15:6:23",
  "battery": "0.00",
  "co2": 1177,
  "temperature": 32.4,
  "humidity": 49.13,
  "x_axis": [2.93,-19.043,-34.668,3.906,-17.09,-8.789,3.418,-7.812,-11.719,-18.555],
  "y_axis": [-1005.859,-1012.207,-1007.812,-1016.113,-1005.859,-1015.137,-1011.23,-1009.277,-1005.371,-1008.301],
  "z_axis": [10.035,10.038,10.016,10.023,10.039,10.02,9.995,10.005,9.997,9.953],
  "mc_pm1_0": [10.035,10.038,10.016,10.023,10.039,10.02,9.995,10.005,9.997,9.953],
  "mc_pm2_5": [10.611,10.615,10.592,10.599,10.615,10.596,10.569,10.58,10.572,10.524],
  "mc_pm4_0": [10.611,10.615,10.592,10.599,10.615,10.596,10.569,10.58,10.572,10.524],
  "mc_pm10": [10.611,10.615,10.592,10.599,10.615,10.596,10.569,10.58,10.572,10.524],
  "nc_pm0_5": [69.765,69.788,69.637,69.682,69.792,69.663,69.486,69.561,69.503,69.193],
  "nc_pm1_0": [79.912,79.938,79.765,79.818,79.943,79.795,79.592,79.678,79.612,79.257],
  "nc_pm2_5": [80.087,80.112,79.939,79.992,80.117,79.969,79.766,79.852,79.785,79.429],
  "nc_pm4_0": [80.106,80.132,79.958,80.011,80.136,79.988,79.785,79.871,79.804,79.448],
  "nc_pm10": [80.12,80.145,79.972,80.024,80.15,80.001,79.799,79.885,79.818,79.462],
  "particle_size": [0.426,0.426,0.423,0.423,0.425,0.424,0.427,0.429,0.43,0.429]
}

Please note that there will be changes in the data type for the date, time and battery fields.