Skip to content
PUDAPPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

bioshake

BioShake driver and edge service.

What It Does

  • Runs the bioshake machine edge service.
  • Connects to NATS and translates commands into machine actions.
  • Communicates with the bioshake device over serial.

Prerequisites

  • Docker and Docker Compose installed
  • Python 3.14+ and uv (for baremetal mode)
  • bioshake device reachable on the serial port

Environment Setup

From repo root:

cp .env.example .env

Edit .env and configure:

  • MACHINE_ID
  • NATS_SERVERS
  • BIOSHAKE_HOST_PORT — serial-device path on the Docker host
  • BIOSHAKE_PORT — serial-device path exposed inside the container

The example uses /dev/ttyUSB0 for both paths. Prefer a stable /dev/serial/by-id/... value for both BIOSHAKE_HOST_PORT and BIOSHAKE_PORT. Docker device mappings require Linux device paths; Windows COM names are supported only in bare-metal mode. Compose uses host networking, so NATS_SERVERS=nats://localhost:4222 is the broker on the same machine. Recreate the container after a network-mode change; docker start keeps the old network.

Run With Docker (Recommended)

All commands below are run from repo root.

Build and start:

docker compose up -d --build

View logs:

docker compose logs -f

Stop:

docker compose down

Commands

Run puda machine commands bioshake for the advertised commands, parameters and safety metadata.

heat_shake(temperature, speed, duration, *, plate_seated, heatup_timeout=600, speed_timeout=60) heats and shakes as one blocking operation. It waits for a stable temperature, ramps to speed, holds for duration seconds, and then verifies that the heater and shaker are off, whether it succeeds or fails. Use it instead of overlapping set_temp and shake calls. Tolerances and abort conditions are listed in the command's docstring.

Run Baremetal (uv)

From repo root:

uv sync
uv run python main.py

Build and Push Image (GHCR)

Login:

echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin

Build:

docker compose build

Push:

docker push ghcr.io/PUDAP/bioshake-edge:latest

Or with Compose:

docker compose push

Test

Offline, with no device connected:

uv run python -m unittest discover -s tests -v

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages