You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Introduction

Our TG-BT5-OUT Bluetooth tag model has a temperature sensor built in. This means that it can be used to measure the surrounding temperature.

The temperature's value is "written" into the advertising payload that the tag is going to broadcast over Bluetooth advertising channels. Based on how you configure the tag, the tag can broadcast the payload periodically or/and when a trigger is detected. You can find more information about the tag's configuration options in iOS and Android Beacon Manager guides.

You can see/display the payloads using our KNOT model under IoT>Bluetooth>Advertising reports tab:

The payloads will be shown in the "Advertisement (hex)" field and they will be in the hexadecimal format.

When the tag is configured in the MikroTik format, the payload's 14th and 15th octets indicate the temperature (ambient temperature in Celsius in signed 8.8 fixed point format) that was "sensed" at the moment of the broadcast.

An example of the payload in MikroTik's format is shown below:

15ff4f09010032a500000000ffff 5019 bd5954000061

Please note that all multi-byte values in the payload are in little-endian. So, if #14 and #15 octets indicate the temperature as "50 19" → the decimal temperature value is going to be (0x1950)/256 = 25.31 C.

With this knowledge, we can then utilize RouterOS scripting to structure a message out of the received payloads and send it to the MQTT/HTTP server. In this guide, we will be using MQTT post to ThingsBoard.

ThingsBoard configuration

You will require to have a ThingsBoard server up and running.



  • No labels