Data output
The packet format changed in 2.0: timestamp became received_at,
lost_data_count became samples_lost, a per-sample timestamps array
and a name field were added, and a sifibridge schema subcommand was
introduced to export the schemas. None of those apply here. For 2.0 or
later, see the current data output reference.
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": "default-1",
"mac": "00:11:22:33:44:55",
"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]
},
"lost_data_count": 0,
"sample_rate": 100.0,
"status": "ok",
"timestamp": 1730370225.123
}
1.3 stamps the packet, not the individual samples: there is a single
timestamp and no per-sample array. To place samples in time, divide by
sample_rate back from the packet timestamp. A per-sample timestamps
array arrived in 2.0.
Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
device | string | Yes | Device type (e.g., BioPointV1_3, SiFiBand) |
id | string | Yes | Device manager name (e.g. default-1) |
mac | string | Yes | Device MAC address |
packet_type | string | Yes | Type of data in this packet (see Packet Types) |
data | object | Yes | Channel data: { "channel_name": [samples...] } |
lost_data_count | integer | Yes | Number of samples lost since the previous packet |
status | string | Yes | Packet status (see Packet Status) |
timestamp | double | Yes | Packet timestamp (Unix epoch seconds) |
sample_rate | double | No | Measured rate in Hz. Omitted on packet types with no rate, such as status and start_time, and on the first packet of each sensor |
id is the device manager name, not a device identifier — 1.3
addresses hardware through named managers, and SiFi Bridge creates one
called default-1 at startup. There is no name field; it was added in
2.0.
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)memory_used_kbytes- On-board memory used (kB)
Start-time Channels
-
year,month,day- Acquisition start date -
hours,minutes,seconds- Acquisition start timeNote these are plural in 1.3; 2.0 renamed them to
hour,minuteandsecond.
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": "default-1",
"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": "default-1",
"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": "default-1",
"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": "default-1",
"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.