Skip to main content

Data Output

The data schema can be obtained with the sifibridge schema subcommand.

Data Packet Format

SiFi Bridge outputs sensor data as JSON packets (use -p flag for pretty-printed output). Each packet follows a standard structure defined by the DataPacket schema.

DataPacket Structure

{
"device": "BioPointV1_3",
"id": "device",
"mac": "00:11:22:33:44:55",
"download_progress": null,
"packet_type": "ppg",
"data": {
"ir": [2738.0, 2753.0, 2765.0],
"r": [3141.0, 3154.0, 3168.0],
"g": [3465.0, 3474.0, 3482.0],
"b": [2890.0, 2903.0, 2915.0]
},
"data_timestamps": {
"ir": [1730370225.123, 1730370225.133, 1730370225.143],
"r": [1730370225.123, 1730370225.133, 1730370225.143],
"g": [1730370225.123, 1730370225.133, 1730370225.143],
"b": [1730370225.123, 1730370225.133, 1730370225.143]
},
"data_lost_count": {
"ir": 0,
"r": 0,
"g": 0,
"b": 0
},
"sample_rate": 100.0,
"status": "ok",
"timestamp": 1730370225.123
}

Field Descriptions

FieldTypeRequiredDescription
devicestring | nullNoDevice type (e.g., BioPointV1_3, SiFiBand)
idstring | nullNoDevice manager name/identifier
macstring | nullNoDevice MAC address
download_progressuint8 | nullNoMemory download progress (0-255)
packet_typestringYesType of data in this packet (see Packet Types)
dataobjectYesChannel data: { "channel_name": [samples...] }
data_timestampsobjectYesPer-sample timestamps: { "channel_name": [timestamps...] }
data_lost_countobjectYesLost sample counts: { "channel_name": count }
sample_ratedouble | nullNoSampling rate in Hz
statusstringYesPacket status (see Packet Status)
timestampdoubleYesPacket timestamp (Unix epoch)

Packet Types

The packet_type field indicates what kind of data is in the packet:

TypeDescriptionCommon Channels
ecgElectrocardiographyecg
emgElectromyographyemg
edaElectrodermal Activityeda
imuInertial Measurement Unitax, ay, az, qw, qx, qy, qz
ppgPhotoplethysmographyir, r, g, b, ppg
emg_armbandEMG Armband (8 channels)emg0-emg7
temperatureTemperature sensortemperature
statusDevice status updatebattery_%
memoryMemory download dataVaries
low_latencyLow-latency mode dataVaries
start_timeAcquisition start time-
start_packetAcquisition started-
device_infoDevice information-

Packet Status

The status field indicates the state of the packet:

StatusDescription
okData received successfully
lost_dataSome data samples were lost
recordingDevice is recording to memory
memory_download_completedMemory download finished
memory_erasedDevice memory was erased
invalid_datetimeInvalid timestamp
invalidInvalid/corrupted packet

Channel Names

Available channel names that can appear in the data object:

Biosignal Channels

  • ecg - Electrocardiography (heart activity)
  • emg - Electromyography (muscle activity)
  • eda - Electrodermal activity (skin conductance)

IMU Channels

  • ax, ay, az - Accelerometer (g, or 9.81 m/s²)
  • qw, qx, qy, qz - Quaternion orientation

PPG Channels

  • ir - Infrared LED
  • r - Red LED
  • g - Green LED
  • b - Blue LED

EMG Armband Channels

  • emg0 through emg7 - 8-channel EMG armband

Status Channels

  • temperature - Device temperature (°C)
  • battery_% - Battery level (percentage)

Device Types

The device field can be:

  • BioPointV1_0, BioPointV1_1, BioPointV1_2, BioPointV1_3 - BioPoint versions
  • SiFiBand - SiFiBand device
  • Invalid - Unknown/invalid device

Example Data Packets

PPG Data Packet

{
"device": "BioPointV1_3",
"id": "device",
"mac": "AA:BB:CC:DD:EE:FF",
"packet_type": "ppg",
"data": {
"ir": [2738.0, 2753.0, 2765.0],
"r": [3141.0, 3154.0, 3168.0],
"g": [3465.0, 3474.0, 3482.0],
"b": [2890.0, 2903.0, 2915.0]
},
"data_timestamps": {
"ir": [1730370225.123, 1730370225.133, 1730370225.143],
"r": [1730370225.123, 1730370225.133, 1730370225.143],
"g": [1730370225.123, 1730370225.133, 1730370225.143],
"b": [1730370225.123, 1730370225.133, 1730370225.143]
},
"data_lost_count": {
"ir": 0,
"r": 0,
"g": 0,
"b": 0
},
"sample_rate": 100.0,
"status": "ok",
"timestamp": 1730370225.123
}

IMU Data Packet

{
"device": "SiFiBand",
"id": "device",
"mac": "11:22:33:44:55:66",
"packet_type": "imu",
"data": {
"ax": [-0.15, -0.14, -0.16],
"ay": [0.08, 0.09, 0.08],
"az": [9.81, 9.80, 9.82],
"qw": [1.0, 1.0, 1.0],
"qx": [0.0, 0.01, 0.0],
"qy": [0.0, 0.0, 0.01],
"qz": [0.0, 0.0, 0.0]
},
"data_timestamps": {
"ax": [1730370225.200, 1730370225.210, 1730370225.220],
"ay": [1730370225.200, 1730370225.210, 1730370225.220],
"az": [1730370225.200, 1730370225.210, 1730370225.220],
"qw": [1730370225.200, 1730370225.210, 1730370225.220],
"qx": [1730370225.200, 1730370225.210, 1730370225.220],
"qy": [1730370225.200, 1730370225.210, 1730370225.220],
"qz": [1730370225.200, 1730370225.210, 1730370225.220]
},
"data_lost_count": {
"ax": 0,
"ay": 0,
"az": 0,
"qw": 0,
"qx": 0,
"qy": 0,
"qz": 0
},
"sample_rate": 100.0,
"status": "ok",
"timestamp": 1730370225.200
}

ECG Data Packet

{
"device": "BioPointV1_3",
"id": "device",
"mac": "AA:BB:CC:DD:EE:FF",
"packet_type": "ecg",
"data": {
"ecg": [0.85, 0.92, 1.15, 1.45, 1.23, 0.95, 0.88]
},
"data_timestamps": {
"ecg": [
1730370225.000,
1730370225.004,
1730370225.008,
1730370225.012,
1730370225.016,
1730370225.020,
1730370225.024
]
},
"data_lost_count": {
"ecg": 0
},
"sample_rate": 250.0,
"status": "ok",
"timestamp": 1730370225.000
}

Status Packet with Data Loss

{
"device": "BioPointV1_3",
"id": "device",
"mac": "AA:BB:CC:DD:EE:FF",
"packet_type": "status",
"data": {
"battery_%": [87.0],
"temperature": [36.5]
},
"data_timestamps": {
"battery_%": [1730370225.500],
"temperature": [1730370225.500]
},
"data_lost_count": {
"battery_%": 0,
"temperature": 0
},
"sample_rate": null,
"status": "lost_data",
"timestamp": 1730370225.500
}

Processing Data Packets

For Python, we recommend using sifi-bridge-py.