An event is the consequence of an interaction between a radio-identifiable device and receiver infrastructure. The event is the core data structure used in the reelyActive platform — many applications need only consume events. An event may have some or all of the following properties in addition to the basic properties:
Basic Contextual Positioning Session
The following JSON represents a basic event — essentially what is where and when — as detailed below.
{ "time": 1420075425678, "deviceId": "fee150bada55", "deviceAssociationIds": [ "004c" ], "receiverId": "001bc50940810000", "rssi": 150, "event": "appearance" }
Property | Type | Description |
---|---|---|
time | Number | The time at which the event occurred, represented as the number of milliseconds since the Unix epoch (January 1st, 1970 UTC). Example: 1420075425678 is equivalent to 01 Jan 2015 01:23:45.678 GMT. |
deviceId | String | The (normally) unique identifier of the transmitting device to which the event corresponds. Expressed as a lowercase hexadecimal string without colons or dashes. Example: "fee150bada55" is equivalent to the 48-bit BLE advertiser address fe:e1:50:ba:da:55. |
deviceAssociationIds | Array of String | The list of complementary device identifiers included in the payload(s) of the device. Each is expressed as a lowercase hexadecimal string without colons or dashes. Example: [ "004c" ] is equivalent to the 16-bit BLE company identifier for Apple, Inc. |
receiverId | String | The unique identifier of the receiver which detects the device with the strongest signal strength in relation to the corresponding event. Expressed as a lowercase hexadecimal string without colons or dashes. Example: "001bc50940810000" is equivalent to the EUI-64 reelceiver address 00-1b-c5-09-40-81-00-00. |
rssi | Number | The received signal strength indication (RSSI) as a unitless number, with greater values corresponding to greater received signal strength. In the case of reelyActive reelceivers, each unit represents 0.5dBm and the offset is constant for a given model, allowing for direct comparison. Example: 183 is 1.5dBm stronger than 180. |
event | String | The nature of the event which is of one of the following four types, further detailed in the next section:
|
Event type | Description |
---|---|
"appearance" | Indicates that the device is detected for the first time at a point of interest. This means that either the device has come within range of a radio receiver or has started transmitting. |
"keep-alive" | Indicates that the device continues to be detected and has not displaced. The keep-alive is sent periodically (typically every few seconds) to indicate that the device remains at the same point of interest. |
"displacement" | Indicates that the device has moved closer to a different point of interest. Specifically, it indicates that the device is detected at a stronger RSSI by a different radio receiver than previously. |
"disappearance" | Indicates that the device is no longer detected at any point of interest. This means that the device has either gone out of range of all radio receivers or has stopped transmitting. |
The following JSON represents the additional properties of a contextual event, which associates meaning to the device and receiver identifiers, as detailed below.
{ /* In addition to the basic event properties above... */ "deviceUrl": "https://myjson.info/stories/test", "deviceTags": [ "mascot", "reelyActive" ], "receiverUrl": "https://sniffypedia.org/Product/reelyActive_RA-R436/", "receiverTags": [ "indoors" ], "receiverDirectory": "farm:barn" }
Property | Type | Description |
---|---|---|
deviceUrl | String | The Uniform Resource Locator (URL) associated with the device, at which metadata is expected to be found. Example: "https://myjson.info/stories/test" points to the profile for our mascot. |
deviceTags | Array of String | Each tag represents a classifier for the device, which can be used to facilitate filtering and querying. Example: [ "mascot", "reelyActive" ] would classify the device as being associated with both a mascot and reelyActive. |
receiverUrl | String | The Uniform Resource Locator (URL) associated with the receiver, at which metadata is expected to be found. Example: "https://sniffypedia.org/Product/reelyActive_RA-R436/" points to the profile for a reelyActive reelceiver. |
receiverTags | Array of String | Each tag represents a classifier for the receiver, which can be used to facilitate filtering and querying. Example: [ "indoors" ] would classify the receiver as being associated with indoors. |
receiverDirectory | String | The hierarchical directory structure which specifies the semantic location of one or more points of interest. The levels of hierarchy are colon-separated. Example: "farm:barn" indicates a semantic location called barn contained within a semantic location called farm. |
The following JSON represents the additional properties of a positioned event, where the real-time 2D or 3D position is estimated, as detailed below.
{ /* In addition to the event properties above... */ "position": [ 0.0, 0.0 ], "positioningMethod": "strongestReceiver" }
Property | Type | Description |
---|---|---|
position | Array of Number | The estimated real-time position of the device, represented as a GeoJSON position. The array consists of either two or three values, representing a 2D or 3D position, respectively. Example: [ 0.0, 0.0 ] is the origin in 2D. |
positioningMethod | String | The name of the method used to estimate the position. Example: strongestReceiver simply applies the position of the strongest receiver of the device's transmissions. |
The following JSON represents the additional properties of an event with session data, which is detailed below.
{ /* In addition to the event properties above... */ "sessionId": "341f64ce-c001-babe-d0e5-cbf75095135e", "sessionDuration": 600000 }
Property | Type | Description |
---|---|---|
sessionId | String | The 128-bit UUID assigned to the device's current session. Generated deterministically from the device's identifier(s). It is the physical analog to a Google Analytics clientId which "anonymously identifies a browser instance." A device with a non-cyclic identifier will always generate the same sessionId. |
sessionDuration | Number | The duration, in milliseconds, since the start of the current session. Once a session expires (after 5 minutes of non-detection, by default), any subsequent session will start with a sessionDuration of 0. Example: 60000 represents a session that has lasted 1 minute so far. |
Our Pareto platform combines the convenience of SaaS with plug-and-play hardware. Your source for real-time real-world events.
Visit getpareto.com Connect to Pareto
Build event-driven web apps with beaver.js, connect a websocket client to Pareto to consume events, or return to the diyActive home page.
Build web apps with beaver.js Connect to Pareto Return to diyActive