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
| Field | Type | Required | Description |
|---|---|---|---|
device | string | null | No | Device type (e.g., BioPointV1_3, SiFiBand) |
id | string | null | No | Device manager name/identifier |
mac | string | null | No | Device MAC address |
download_progress | uint8 | null | No | Memory download progress (0-255) |
packet_type | string | Yes | Type of data in this packet (see Packet Types) |
data | object | Yes | Channel data: { "channel_name": [samples...] } |
data_timestamps | object | Yes | Per-sample timestamps: { "channel_name": [timestamps...] } |
data_lost_count | object | Yes | Lost sample counts: { "channel_name": count } |
sample_rate | double | null | No | Sampling rate in Hz |
status | string | Yes | Packet status (see Packet Status) |
timestamp | double | Yes | Packet timestamp (Unix epoch) |
Packet Types
The packet_type field indicates what kind of data is in the packet:
| Type | Description | Common Channels |
|---|---|---|
ecg | Electrocardiography | ecg |
emg | Electromyography | emg |
eda | Electrodermal Activity | eda |
imu | Inertial Measurement Unit | ax, ay, az, qw, qx, qy, qz |
ppg | Photoplethysmography | ir, r, g, b, ppg |
emg_armband | EMG Armband (8 channels) | emg0-emg7 |
temperature | Temperature sensor | temperature |
status | Device status update | battery_% |
memory | Memory download data | Varies |
low_latency | Low-latency mode data | Varies |
start_time | Acquisition start time | - |
start_packet | Acquisition started | - |
device_info | Device information | - |
Packet Status
The status field indicates the state of the packet:
| Status | Description |
|---|---|
ok | Data received successfully |
lost_data | Some data samples were lost |
recording | Device is recording to memory |
memory_download_completed | Memory download finished |
memory_erased | Device memory was erased |
invalid_datetime | Invalid timestamp |
invalid | Invalid/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 LEDr- Red LEDg- Green LEDb- Blue LED
EMG Armband Channels
emg0throughemg7- 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 versionsSiFiBand- SiFiBand deviceInvalid- 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.