Back to Discussions
28
SoftwareSolved

Streaming PiEEG-8 / IronBCI-32 to MNE-Python and OpenViBE via LSL (splitting EEG and EOG channels)

Dr. Sarah Chen (BCI Lab)Contributor· Posted 11h ago
315 views1 reply

In our lab protocol, Channels 1–7 are scalp EEG and Channel 8 is positioned above the eye for EOG blink artifact tracking.

How can we stream both simultaneously from pieeg-server over Lab Streaming Layer (LSL) as separate LSL outlets so MNE-LSL and LabRecorder see EEG_PiEEG and EOG_PiEEG independently?

1 Reply

Accepted Solution
30
youssefCo-Founder & Software Architect
· 11h ago

pieeg-server supports multi-outlet LSL Channel Groups out of the box!

1. Start PiEEG Server with LSL enabled

bash
pieeg-server --lsl --lsl-name PiEEG

2. Split Channels via WebSocket or Setup Wizard

You can either run pieeg-server --osc-regions-setup interactively (which writes ~/.pieeg/lsl_groups.json), or send a single JSON command over the WebSocket (ws://localhost:1617/ws):

json
{
  "cmd": "lsl_groups_set",
  "groups": [
    { "name": "EEG", "channels": [0, 1, 2, 3, 4, 5, 6] },
    { "name": "EOG", "channels": [7] }
  ]
}

This automatically publishes two float32 LSL streams at 250 Hz (or 500 Hz on IronBCI-32): EEG_PiEEG (7 ch) and EOG_PiEEG (1 ch).

3. Pull in Python with pylsl

python
from pylsl import StreamInlet, resolve_stream

eeg_streams = resolve_stream('name', 'EEG_PiEEG')
inlet = StreamInlet(eeg_streams[0])
sample, timestamp = inlet.pull_sample()

Your Reply

You'll verify with a quick 6-digit email code when posting.
Streaming PiEEG-8 / IronBCI-32 to MNE-Python and OpenViBE via LSL (splitting EEG and EOG channels) — PiEEG Community Discussions