UniteLabs
Setup

Raspberry Pi

Running multiple UniteLabs connectors on a Raspberry Pi — folder structure, systemd services, and common operations.

This example shows a typical multi-connector deployment on a Raspberry Pi 4 running Raspberry Pi OS (64-bit). All connectors run as systemd services and start automatically on boot.

For the step-by-step setup guide, see Headless install.


Folder structure

All connectors live under /opt/connectors/, one folder per connector:

/opt/connectors/
├── microlab_star/
│   ├── unitelabs-microlab-star-aarch64-unknown-linux-gnu-0.3.1
│   ├── config.json
│   └── ul-microlab-star.service          # backup of the systemd unit
├── bioshake_q1/
│   ├── unitelabs-bioshake-q1-aarch64-unknown-linux-gnu-0.2.0
│   ├── config.json
│   └── ul-bioshake-q1.service
└── filesystem/
    ├── unitelabs-filesystem-aarch64-unknown-linux-gnu-0.3.2
    ├── config.json
    └── ul-filesystem.service

Each connector folder contains:

  • The connector binary: self-contained executable with a bundled Python runtime
  • config.json: instrument connection settings and cloud relay config
  • A backup of the systemd unit file: so the full setup can be reconstructed from /opt/connectors/ alone

Example active services

Service nameConnectorPort
ul-microlab-starHamilton Microlab STAR50052
ul-bioshake-q1Bioshake Q150053
ul-filesystemFile System50054
ul-tapo-camera-01Tapo Camera50055

Each service uses a unique port for its local SiLA 2 server. Assign ports incrementally to avoid conflicts.


Common operations

List all UniteLabs services

systemctl list-units | grep ul-

Check the status of a service

sudo systemctl status ul-microlab-star

Start / stop / restart

sudo systemctl start ul-microlab-star
sudo systemctl stop ul-microlab-star
sudo systemctl restart ul-microlab-star

View live logs

journalctl -u ul-microlab-star -f

Adding a new connector

1. Create the folder and place the binary

sudo mkdir -p /opt/connectors/<connector_name>
sudo cp <binary> /opt/connectors/<connector_name>/
sudo chmod +x /opt/connectors/<connector_name>/<binary>

2. Generate and edit the config

cd /opt/connectors/<connector_name>
./<binary> --start-cmd "config create"
# edit config.json with instrument settings and the next available port

3. Create the systemd service file

Create /etc/systemd/system/ul-<name>.service:

[Unit]
Description=UniteLabs <Connector Name>
After=network.target
Wants=network-online.target

[Service]
User=<your-user>
WorkingDirectory=/opt/connectors/<connector_name>
ExecStart=/opt/connectors/<connector_name>/<binary>
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

4. Enable and start

sudo systemctl daemon-reload
sudo systemctl enable ul-<name>
sudo systemctl start ul-<name>
sudo systemctl status ul-<name>

5. Back up the service file

sudo cp /etc/systemd/system/ul-<name>.service /opt/connectors/<connector_name>/

Removing a connector

sudo systemctl stop ul-<name>
sudo systemctl disable ul-<name>
sudo rm /etc/systemd/system/ul-<name>.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
sudo rm -rf /opt/connectors/<connector_name>

Notes

  • The connector binary unpacks a Python runtime into /opt/connectors/.cache/ on first run. This is expected and shared across all connectors on the machine.
  • Service names use the ul- prefix so they group together when listing services.
  • Camera connectors may log raw binary data (encoded video stream): this is normal.