Reading Sensor Information

Example: Is my Asset Tag moving or not?

In https://iot.bluerange.io/asyncapi.html find the specification for sensor_data.

The topic looks like this:

rltn-iot/{organizationUuid}/{siteUuid}/{beaconUuid}/sensor/{sensorType}/{sensorIndex}/sensorData

You can find the meaning of the elements and the necessary payload under this topic.

To find out whether an asset tag is currently moving or not, we utilize the speed sensor data given by the accelerometer on an asset beacon.

Get required information

This is the information required:

  • Organization UUID

  • Site UUID

  • Beacon UUID

  • Sensor Type

  • Sensor Index

Send GET request to endpoint /gofer/security/rest/organizations and retrieve parameter uuid as organizationUuid.

Example: 8893B9A0-78EB-4547-B80C-B8FF242A139B

Send GET request to endpoint /relution/api/v1/sites filter for parameter name and retrieve parameter uuid as siteUuid.

Example: 1ECF4C49-FFE0-4723-9EA4-7E95359E6D02

Send GET request to endpoint /relution/api/v1/devices filter for parameter deviceId(equals serial) and retrieve parameter uuid as beaconUuid.

Example: 232BAD65-B2F9-4A2B-9293-72840E64D897

Alternatively you can type a + instead of a beaconUuid, you then created a single-level wildcard and would get the sensor data for every available beacon in this site.

The sensorType is clearly speed, as it is the speed data we need to determine movement.

Let’s say the sensorIndex is unknown, or we are using an Asset Beacon, so we again use a wildcard +.

So in total our topic would now look like this:

rltn-iot/8893B9A0-78EB-4547-B80C-B8FF242A139B/1ECF4C49-FFE0-4723-9EA4-7E95359E6D02/+/sensor/speed/+/sensorData

You can now subscribe to this topic with a program like MQTT.fx and you then will receive the MQTT messages with the specified payload. How to use a program like MQTT.fx see MQTT.

Get MQTT.fx here: https://mqttfx.jensd.de/

Under value you will get either 0 which means no movement detected, or a value >0 e.g. 0.8, which means the asset is in movement with 0.8 meters per second.