Writing a HUP Device Adapter
The Hardware Use Protocol (HUP) is how physical devices — wristbands, smart glasses, robots, sensors — join the FERAL mesh. Each device runs a small adapter that connects to the Brain over WebSocket, registers its capabilities, streams telemetry, and responds to commands.Concepts
| Term | Meaning |
|---|---|
| Device Mesh | The Brain’s registry of connected hardware nodes |
| Device Manifest | A declarative description of a device’s type, name, and capabilities |
| Telemetry | Periodic sensor data pushed from device → Brain |
| HUP Action | A command sent from Brain → device (read, write, execute, stream, configure) |
Quick Start (Python SDK)
run():
- It opens a WebSocket to the Brain’s
/v1/daemonendpoint. - It sends a
node_registermessage with its manifest. - It starts two concurrent loops:
- Telemetry loop — calls
read_telemetry()everytelemetry_interval_sseconds and pushes results. - Command loop — listens for
node.invokemessages and dispatches toexecute_action().
- Telemetry loop — calls
Raw WebSocket (No SDK)
You can also connect with plain WebSocket messages:Device Manifest
The manifest tells the Brain what the device can do:HUP Action Types
| Type | Direction | Use Case |
|---|---|---|
read | Brain → Device → Brain | Request a specific sensor reading |
write | Brain → Device | Set a value (display, config) |
execute | Brain → Device → Brain | Trigger an action (vibrate, beep) |
stream | Device → Brain | Start a continuous data stream |
configure | Brain → Device | Change device settings |
Viewing Connected Devices
Supported Devices
FERAL ships with reference adapters for:| Device | Adapter Location |
|---|---|
| Smart Glasses (BLE) | feral-nodes/ |
| Wristband (HR, SpO2, temp) | feral-nodes/ |
| iOS Bluetooth Bridge | feral-nodes/phone-bridge/ |
| Home Assistant | feral-core/integrations/ |
TypeScript / Node Adapter
FeralNode API.