Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Publish Data

This section provides an overview of how sensor data is sent to the AWS Broker.

Broker Namespace Topic - Data

All data is sent to the data subtopic of a designated Buoy ID.

$aws/<version#>/<buoy_id>/data/

For example (data for Buoy ID = 1, version 0 of this project):

$aws/0/1/data/

MQTT Packet Payload

The packet payload that will be published to the data topic is a JSON message. This message will include key/value pairs with the key identifying the type of sensor and the value representing the data value that was measured. Only the key/value pairs for the sensors on a buoy will be included in the message.

For example (Buoy with 1 PH sensor):

{
  "ph": 7.03,      # PH Sensor
}

For example (Buoy with all sensors):

{
  "do": 80.3,      # Dissolved Oxygen Sensor (%Sat)
  "ec": 250.21,    # Electrical Conductivity Sensor (ms/cm)
  "liqlev": true,  # Liquid Level Sensor (boolean)
  "ph": 7.03,      # PH Sensor
  "tds": 550.96,   # Total Dissolved Solids Sensor (ppm)
  "tbd": 0.8,      # Turbidity Sensor (NTU)
  "wf": 1.904,     # Water Flow Sensor (L/s)
  "wp": 9.81,      # Water Pressure Sensor (kpa)
  "temp" : 20.34   # Temperature Sensor (Degree C)
}

For specific sensor information breakdown (name, data type, and data value) please refer to the relevant sensor pages.