hardwareOS
Spec Phase: hardwareOS is in active development. Documentation reflects current design and implementation progress.
hardwareOS is the embedded firmware platform for RS-1 devices, built with Go for backend logic and React for the web-based configuration UI.
Architecture
Section titled “Architecture”┌─────────────────────────────────────────────────┐│ hardwareOS Application │├─────────────────────────────────────────────────┤│ React Web UI ││ ├── Device configuration ││ ├── Zone management ││ ├── Real-time status ││ └── OTA update interface │├─────────────────────────────────────────────────┤│ Go Backend ││ ├── HTTP API server ││ ├── Sensor data processing ││ ├── Home Assistant MQTT ││ └── System management │├─────────────────────────────────────────────────┤│ rv1106-system (Linux) │└─────────────────────────────────────────────────┘Technology Stack
Section titled “Technology Stack”| Component | Technology | Purpose |
|---|---|---|
| Backend | Go | API server, sensor processing |
| Frontend | React | Configuration web UI |
| Protocol | MQTT | Home Assistant integration |
| Build | Cross-compilation | ARM target from x86 |
Development
Section titled “Development”Prerequisites
Section titled “Prerequisites”# Go toolchaingo version # 1.21+
# Node.js for React buildnode --version # 18+
# Cross-compilation toolsapt install gcc-arm-linux-gnueabihfBuilding
Section titled “Building”cd hardwareOS
# Build Go backendGOOS=linux GOARCH=arm GOARM=7 go build -o hardwareos ./cmd/main.go
# Build React frontendcd web && npm run buildDevelopment Server
Section titled “Development Server”# Run locally for developmentgo run ./cmd/main.go --dev
# Frontend dev servercd web && npm run devFeatures
Section titled “Features”Web Configuration UI
Section titled “Web Configuration UI”- Device setup — Network, name, location
- Zone management — Define presence detection zones
- Sensor tuning — Sensitivity, range, thresholds
- Status dashboard — Real-time sensor data
Home Assistant Integration
Section titled “Home Assistant Integration”hardwareOS publishes presence data via MQTT:
# Example MQTT topic structurehomeassistant/binary_sensor/rs1_living_room/presence/statehomeassistant/sensor/rs1_living_room/target_count/stateOTA Updates
Section titled “OTA Updates”Firmware updates delivered via:
- Web UI upload
- Automatic update check (configurable)
- Rollback support on failure
API Reference
Section titled “API Reference”Status Endpoint
Section titled “Status Endpoint”GET /api/statusReturns device health, sensor readings, and system info.
Configuration Endpoint
Section titled “Configuration Endpoint”GET /api/configPUT /api/configRead and update device configuration.
Deployment
Section titled “Deployment”Built artifacts are deployed to RS-1 devices via:
- OTA — Push through web UI or scheduled update
- Flash — Direct write to device storage
- SD Card — Manual update for recovery
Source: hardwareOS/README.md, rs-1/docs/firmware/README.md