This article will provide instructions on how to use a BLE Smart Sensor Tag. The BLE Smart Sensor Tag functions like any other type of item in the Brain. In addition, it has a number of settings and sensor features that can be accessed and managed through the Brain.
Identifying the tag
Each tag has a unique code printed consisting of twelve letters and digits, for example e263c74c233a
. After the device has been nearby a BLE-enabled Smartspot, it will have an item representation in the Brain, with technology bluetooth
, type smarttag
and the printed code as item code. It may be useful to look up the item by code in the item editor and assign a label for future reference. When location information is enabled in the item editor, the tag should appear as present (green circle).
Configuring the Tag
It may be desirable to change settings, e.g. it's transmit power. This kind of basic setting can be changed using the Item Editor; see How to change smart item settings.
Advanced settings can only be changed through the tag's item object on the Brain Web API.
Receiving Smart Item senses and events
Smart items such as the BLE Smart Sensor Tag support senses and events.
A smart item sense is defined as an internal or environmental value that is re-transmitted periodically and when it changes significantly. Examples of smart item senses are environment temperature and battery level.
A smart item event is defined as something that happens at certain points in time, e.g. a detection. Examples of smart item events are "detected motion" and "NFC tag was read".
Smart item senses and events can be accessed through the Brain Web API. The most recent data can be retrieved through the REST API, and live updates can be received using the Brain events system.
Brain REST API
See Brain Web API for an introduction and reference regarding the REST API.
Smart item data is included in objects from the items
resource type in the properties senses
and supported_events
. The smart item data of a tag could look as follows:
"senses":{ "temperature": { "temperature": 20, "time_updated": "2018-10-09T09:55:43.866Z" }, "battery": { "percentage": 93, "time_updated": "2018-10-09T09:49:53.960Z" } }, "supported_events": { "motion_event":{ "time_last_occurred": "2018-10-08T8:04:59.865Z" } }
Brain events
See Brain Web API - Events for an introduction and reference regarding Brain events and how to receive them.
Smart item updates can be received by subscribing on the "reported" action of the "items" resource type. For example, the topic filter items/+/reported/#
would match all smart item updates from any smart item. The topic filter items/+/reported/temperature/#
would only match temperature updates.
Comments
0 comments
Article is closed for comments.