This article contains the types of events an application can subscribe to, organized by REST API resource. For each event type, the variable parts of the topic (marked with <bold-between-angles>) and properties found in the payload (other than "time") are listed.
Items
Created
A new item was added to the items resource. This happens when a device observes an item that was never seen before by this Brain.
Topic format: items/<item-id>/created
Payload properties:
- The technology, type, protocol and code properties of the item as found on the REST API.
Appeared
The item is now present (i.e. observed by one or more devices). When this event is fired, the is_present
property of the item changed from false
to true
.
Topic format: items/<item-id>/appeared
Payload properties:
- The technology, type, protocol and code properties of the item as found on the REST API.
Disappeared
The item is no longer present (i.e. not in range of any device). When this event is fired, the is_present
property of the item changed from true
to false
.
Topic format: items/<item-id>/disappeared
Payload properties:
- The technology, type, protocol and code properties of the item object as found on the REST API.
Moved
The Brain location services decided the item moved to a different location.
Topic format: items/<item-id>/moved-to/<new-location-id>/<old-location-id>
Arguments:
new-location-id
is the locations resource ID of the location that the item moved to.old-location-id
is the locations resource ID of the location that the item moved from.
Payload properties:
item_move_count
contains the number of times the item has changed location since it was first seen.item_label
contains the label string of the item object.location_label
contains the label string of the new location.
Connected
A BLE connection was established with the item. Only applicable to smart items with BLE connection capability, such as the Intellifi BLE smart tag or Micro spot BLE relay. Will be followed by a "connection ready" event when the connection is initialized.
Topic format: items/<item-id>/connected
Connection ready
A previously established BLE connection is now fully operational. Only applicable to smart items with BLE connection capability.
Topic format: items/<item-id>/connection-ready
Connection RSSI changed
A new RSSI (received signal strength indication) was measured for a currently active BLE connection. This is an indication of the radio signal of the collection. Only applicable to smart items with BLE connection capability.
Topic format: items/<item-id>/connection-rssi-changed
Payload properties:
rssi_dbm
is the measured RSSI in dBm.
Disconnected
A previously established BLE connection was terminated. Only applicable to smart items with BLE connection capability.
Topic format: items/<item-id>/disconnected
Configuration changed
One or more configuration parameters were changed on the item. Only applicable to smart items with BLE connection capability. which can be remotely configured through BLE.
Topic format: items/<item-id>/config-changed
Payload properties:
config
is an object with the item's config object (as found on the REST API) after the change(s).
Reported
The item reported new sensor data or an event occurred on the item. Only applicable to smart items with sensors, such as the Intellifi BLE smart tag.
Topic format: items/<item-id>/reported/<data-type>
The various data types are listed below.
Temperature
A new temperature was measured.
Topic format: items/<item-id>/reported/temperature
Payload properties:
temperature
is the measured temperature in degrees Celsius.
Battery
A new battery level was measured.
Topic format: items/<item-id>/reported/battery
Payload properties:
percentage
is the estimated remaining battery capacity as a percentage.
Motion event
Physical motion was detected on the item (e.g. picked up, vibrating).
Topic format: items/<item-id>/reported/motion_event
NFC read event
The item's NFC data was read by an external device (e.g. smartphone).
Topic format: items/<item-id>/reported/nfc_read_event
Presences
Created
A new presence (i.e. a certain item is observed at a certain location) was created.
Topic format: presences/<presence-id>/created/<item-id>/<location-id>/<proximity>
Arguments:
item-id
is the ID of the item that is being observed.location-id
is the ID of the location that the item is observed at.proximity
is the rough distance approximation ("immediate", "near" or "far").
Payload properties:
- The technology, type, protocol and code properties of the observed item as found on the REST API.
Changed proximity
The proximity of a presence changed. This means the item moved closer or further away from the location.
Topic format: presences/<presence-id>/changed-proximity/<item-id>/<location-id>/<new-proximity>/<old-proximity>/<direction>
Arguments:
item-id
is the ID of the item that is being observed.location-id
is the ID of the location that the item is observed at.new-proximity
is the current proximity value ("immediate", "near" or "far").old-proximity
is the previous proximity value ("immediate", "near" or "far").direction
is "moved-closer" if the distance decreased (e.g. near to immediate) or "moved-away" if the distance increased (e.g. near to far).
Payload properties:
- The technology, type, protocol and code properties of the observed item as found on the REST API.
Deleted
An active presence was deleted (i.e. the presence's item is no longer observed at the presence's location).
Topic format: presences/<presence-id>/deleted/<item-id>/<location-id>/<proximity>
Arguments:
item-id
is the ID of the item that was being observed.location-id
is the ID of the location that the item was observed at.proximity
is the last known proximity at the location.
Payload properties:
- The technology, type, protocol and code properties of the observed item as found on the REST API.
Spots
Connected
The Smartspot connected to the Brain.
Topic format: spots/<spot-id>/connected
Disconnected
The Smartspot disconnected from the Brain.
Topic format: spots/<spot-id>/disconnected
Other
A number of other spot events related to their internal workings exist, but these are not considered stable and may change at any time. These events are omitted from this reference.
Miscellaneous
Events pertaining to more than one resource are covered in this section.
Created through HTTP POST
An object was created on the REST API with a HTTP POST request. Note that not all resources allow objects to be created with a through the REST API (for example, items and presences cannot be created this way).
Topic format: <resource>/<id>/created/post
Updated through HTTP PUT
An object was modified on the REST API with a HTTP PUT request. Note that not all resources allow objects to be modified through the REST API.
Topic format: <resource>/<id>/updated/put
Deleted through HTTP DELETE
An object was deleted from the REST API with a HTTP DELETE request. Note that not all resources allow objects to be deleted through the REST API.
Topic format: <resource>/<id>/deleted/delete
Comments
0 comments
Article is closed for comments.