Skip to main content

BussDCC Hardware

bussdcc-hardware provides hardware device integrations for bussdcc.

It includes drivers for common buses and devices and exposes them through the BussDCC device system so they can be managed, monitored, and orchestrated by the runtime.

Architecture

Hardware in BussDCC is modeled as devices in a dependency graph. Bus devices are one common kind of dependency node.

Runtime
  ├── Bus Devices
  │     ├── I2C Bus
  │     ├── 1-Wire Bus
  │     └── GPIO Bus
  │
  └── Hardware Devices
        ├── Sensors
        ├── ADCs
        ├── Cameras
        └── Actuators

Each hardware component is represented as a BussDCC Device with a managed lifecycle:

connect → operate → disconnect

The runtime handles:

  • device initialization
  • dependency ordering
  • failure detection
  • online/offline status

Features

Bus Drivers

Hardware buses are modeled as devices themselves.

Currently supported:

I²C

bussdcc_hardware.bus.i2c

Features:

  • bus discovery
  • device address scanning
  • register bus interface

1-Wire

bussdcc_hardware.bus.w1

Features:

  • device discovery
  • filesystem-based device access

Hardware Devices

NAU7802 Load Cell ADC

High precision load cell amplifier.

bussdcc_hardware.device.nau7802

Features:

  • dual channel support
  • calibration parameters
  • automatic channel switching
  • failure detection

DS18B20 Temperature Sensor

1-Wire temperature sensor.

bussdcc_hardware.device.ds18b20

Features:

  • filesystem-based reading
  • automatic offline detection

USB Camera

OpenCV-based camera integration.

bussdcc_hardware.device.usb_camera

Features:

  • configurable resolution and FPS
  • exposure control
  • focus control
  • white balance control
  • automatic failure recovery

Digital Output

Simple GPIO-based actuator for controlling devices such as pumps, relays, LEDs, or lights.

bussdcc_hardware.device.digital_output

Features:

  • on/off control
  • safe shutdown

Device Configuration

All devices use typed dataclass configurations.

Example:

from bussdcc_hardware.device.nau7802 import NAU7802Config

config = NAU7802Config(
    bus_id="i2c0",
    addr=0x2A,
)

Configuration metadata includes UI hints:

  • labels
  • groups
  • help text
  • numeric constraints
  • dependency references

This allows configuration systems or web interfaces to automatically generate forms.

Example metadata:

{
  "label": "Frame Width",
  "group": "Video",
  "min": 160,
  "max": 3840
}

Device Discovery

Hardware integrations are registered using Python entry points.

bussdcc.device

The registry loads available devices automatically:

from bussdcc_hardware.registry import registry

registry.devices

Unavailable drivers (missing optional dependencies) are detected and reported.

Optional Dependencies

Some hardware drivers require additional libraries.

Install them using extras:

pip install bussdcc-hardware[nau7802]
pip install bussdcc-hardware[digital_output]
pip install bussdcc-hardware[usb_camera]

Example

Example hardware configuration:

runtime.add_device(
    "i2c0",
    "i2c",
    {
        "bus": 1
    }
)

runtime.add_device(
    "scale_adc",
    "nau7802",
    {
        "bus_id": "i2c0",
        "addr": 0x2A
    }
)

The runtime attaches devices in dependency order.

Design Goals

Hardware as first-class devices

Buses and sensors are modeled the same way as any other BussDCC device.

Runtime-managed lifecycle

Devices automatically:

  • connect
  • report failures
  • recover when possible

Strong typing

All configurations are statically typed dataclasses.

Composable integrations

Hardware modules can be distributed as independent packages and discovered through entry points.

Installation

pip install bussdcc-hardware

Optional drivers:

pip install bussdcc-hardware[nau7802]
pip install bussdcc-hardware[digital_output]
pip install bussdcc-hardware[usb_camera]

Related Projects

  • bussdcc — cybernetic runtime kernel
  • bussdcc-framework — runtime utilities and web interface

License

MIT License

Metadata

Release files for bussdcc-hardware 0.32.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bussdcc-hardware 0.32.0
File Size Uploaded Provenance Actions
bussdcc_hardware-0.32.0.tar.gz 24.4 kB Without provenance Details for bussdcc_hardware-0.32.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bussdcc-hardware 0.32.0
File Interpreter ABI Platform Actions
bussdcc_hardware-0.32.0-py3-none-any.whl Python 3 none any Details for bussdcc_hardware-0.32.0-py3-none-any.whl

Total release size: 53.8 kB

Release files / bussdcc_hardware-0.32.0.tar.gz

Download URL bussdcc_hardware-0.32.0.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aa6b376e0705c4cffee293a8492d8cbd2e598f9024bb1d98adc137915bab26d0
BLAKE2b-256 checksum
How to use checksums
f8603a7fb31740161c909b18c5af14a1e740f1136518671bf1f719603898c26c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / bussdcc_hardware-0.32.0-py3-none-any.whl

Download URL bussdcc_hardware-0.32.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17a06e8a92be4f5ada63dd3fe96e3ebfd28dea812fef43afe2abeaba481700bc
BLAKE2b-256 checksum
How to use checksums
6f46d73a3c1ed2071719b36f4d634bef2f83b2aa734dcebcdc329bc0b66c1e3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.16

Security for bussdcc-hardware 0.32.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.32.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page