reelyActive Developers Cheatsheet

"Owl" about the following data structures:

#raddec #dynamb #spatem #idtype

raddec   #raddec

A raddec represents a generic radio decoding.


What's it used for?
Real-time location and telemetry payloads, represented in a compact and standard way, regardless of the underyling devices, vendors & technologies.
What to index on?
If storing to a database, create a transmitter signature string of the form transmitterId/transmitterIdType and use that as the index to uniquely represent each device.

JSON raddec

{
    "transmitterId": "...",
    "transmitterIdType": 0,
    "rssiSignature": [{
        "receiverId": "...",
        "receiverIdType: 0,
        "rssi": -99,
        "numberOfDecodings": 1,
        "receiverAntenna": 3,
        "aoa": [ 0, 0 ]
    }],
    "timestamp": 1645568542222,
    "packets": [ '...' ],
    "events": [ 0, 2 ],
    "position": [ 0, 0, 0 ]
}

Binary raddec

A raddec can be converted to/from a compact binary representation using the raddec library.

Mandatory properties

Type
String (hexadecimal, lowercase)

Radio-identifier of the transmitting device.

Type
Number (whole number)

Type of radio-identifier of the transmitting device. See #idtype index below.

Type
Array (minimum length 1)

Radio receivers ordered by decreasing RSSI ( signal strength). Each object in the array has the following properties:

receiverId (hexadecimal, lowercase)
receiverIdType (whole number) See #idtype
rssi in dBm (integer)
numberOfDecodings (minimum 1)
receiverAntenna* (whole number)
aoa* [ azimuth, elevation ]

* optional property

Optional properties

Type
Number (whole number)

UNIX epoch (in milliseconds) representing the time at which the radio-transmission was received.

Type
Array (minimum length 0)

Hexadecimal strings (lowercase) representing individual raw transmission payloads, without duplicates.

Type
Array (minimum length 1)

Index list of events associated with this radio decoding:

  1. APPEARANCE
  2. DISPLACEMENT
  3. PACKETS
  4. KEEPALIVE
  5. DISAPPEARANCE

Type
Array (minimum length 2)

The calculated position of the transmitting device based on its radio decodings.

Recommended encoding is WGS 84 for interoperability: [ lat, lon, ele ].

dynamb   #dynamb

A dynamb represents dynamic ambient data from a specific device.


What's it used for?
Timeseries data, represented with standard units and/or interpretation, regardless of the underlying devices, vendors & technologies.
What to index on?
If storing to a database, create a device signature string of the form deviceId/deviceIdType and use that as the index to uniquely represent each device.

JSON dynamb

{
    "deviceId": "...",
    "deviceIdType": 0,
    "timestamp": 1645568542222,
    "property0": value0,
        ⋮     :   ⋮
    "propertyn": valuen
}

Mandatory properties

Type
String (hexadecimal, lowercase)

Identifier of the device from which the data originates.

Type
Number (whole number)

Type of identifier of the device from which the data originates. See #idtype index below.

Type
Number (whole number)

UNIX epoch (in milliseconds) representing the time at which the data was collected.

Optional dynamb properties

Source of truth: github.com/reelyactive/advlib
Property name Value example Type Units
acceleration [ -0.2, 0.9, 0.3 ] Array of Number 1 g
ammoniaConcentration 300 Number ppm
amperage 4.8 Number A
amperages [ 4.8, null, 0.4 ] Array of Number 2 A
angleOfRotation 180 Number degrees
batteryPercentage 50 Number %
batteryVoltage 3.3 Number V
carbonDioxideConcentration 1000 Number ppm
carbonMonoxideConcentration 1600 Number ppm
dissolvedOxygen 111 Number %
distance 0.5 Number m
elevation 152 Number m
heading 270 Number degrees
heartRate 60 Number bpm
illuminance 333 Number lux
isButtonPressed [ false ] Array of Boolean 2
isContactDetected [ true ] Array of Boolean 2
isHealthy true Boolean
isLiquidDetected [ false ] Array of Boolean 2
isMotionDetected [ false ] Array of Boolean 2
languages [ 'fr', 'en' ] Array of String ISO 639-1
levelPercentage 55 Number %
magneticField [ -0.7, 0.3, 0.1 ] Array of Number 1 G
methaneConcentration 1.908 Number ppm
nearest [ { "deviceId": "...",
    "rssi": -42 } ]
Array of Object dBm
nitrogenDioxideConcentration 174 Number ppm
numberOfOccupants 7 Number
passageCounts [ 12, 34 ] Array of Number 4
pH 7.0 Number
position [ -73.5, 45.5, 88 ] Array of Number 3 [ lon, lat, ele ]
pressure 101325 Number Pa
pressures [ 101325, 99999, null ] Array of Number 2 Pa
relativeHumidity 69 Number %
speed 1.1 Number m/s
temperature 21.0 Number °C
temperatures [ null, 21.0 ] Array of Number 2 °C
txCount 123456789 Number
unicodeCodePoints [ 0x1f989 ] Array of Number
uptime 60000 Number ms
volatileOrganicCompoundsConcentration 0.065 Number ppm
voltage 5.1 Number V
voltages [ 5.1, 4.9, null ] Array of Number 2 V
  • 1 Expected interpretations by length are [ x, y, z ], [ x, y ], [ absolute ]
  • 2 Array representation accommodates devices with multiple identical sensors (ex: 2-rocker switch)
  • 3 Recommended encoding is WGS 84 for interoperability
  • 4 Expected interpretations by length are [ entries, exits ], [ total ]

spatem   #spatem

A spatem represents spatial temporal data in relation to a specific device.


What's it used for?
Device location, potentially over time, represented as web-standard GeoJSON, regardless of the underyling devices, vendors & technologies.
What to index on?
If storing to a database, create a device signature string of the form deviceId/deviceIdType and use that as the index to uniquely represent each device.

JSON spatem

{
    "deviceId": "...",
    "deviceIdType": 0,
    "type": "...",
    "data": {
       "type": "FeatureCollection",
       "features": [{
         "type": "Feature",
         "geometry": {
           "type": "...",
           "coordinates": []
         }
       }]
    },
    "timestamp": 1645568542222
}

Mandatory properties

Type
String (hexadecimal, lowercase)

Identifier of the device from which the data originates.

Type
Number (whole number)

Type of identifier of the device from which the data originates. See #idtype index below.

Type
String

Either "position" or "location".

Type
Object (GeoJSON FeatureCollection)

A GeoJSON FeatureCollection, the contents of which correspond with the spatem type. See RFC 7946.

Type
Number (whole number)

UNIX epoch (in milliseconds) representing the time at which the spatial-temporal data was compiled.

Identifier Type   #idtype

A common index for device/transmitter/receiver identifier types.


What's it used for?
To efficiently distinguish identifiers that have the same number of bits but are of different types.
How to use it?
Combine the identifier and the identifier type as a signature string of the form id/idType to uniquely and efficiently represent any identifiable thing.
Source of truth: github.com/reelyactive/raddec
index Identifier Length Used by
0 Unknown type variable n/a
1 EUI-64 64 bits LLRP, reelyActive (see reel)
2 EUI-48 48 bits Bluetooth Low Energy, WiFi
3 RND-48 48 bits Bluetooth Low Energy (random address)
4 TID-96 96 bits RAIN RFID (EPC Tag Data Standard)
5 EPC-96 96 bits RAIN RFID (Electronic Product Code)
6 UUID-128 128 bits RF Controls
7 EURID-32 32 bits EnOcean Alliance
8+ Reserved variable Future use

Where to next?

Continue exploring our open architecture and all its applications.