Provides tools for controlling AV hardware within a home lab environment.
Install
mkdir -p .claude/skills/homelab && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12281" && unzip -o skill.zip -d .claude/skills/homelab && rm skill.zipInstalls to .claude/skills/homelab
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Home automation AV control library, CLI, and REST server for Sony ES receivers and Arcam amplifiers. Use when working in homelab/, controlling AV equipment, or building home automation features.Key capabilities
- →Control Sony ES receivers via JSON-RPC over HTTP
- →Control Arcam amplifiers via TCP binary protocol
- →Provide a CLI for terminal-based device control
- →Expose device control over HTTP via a REST API
- →Manage multi-device configurations using `~/homey.json`
How it works
The skill provides a Rust library, CLI, and REST server to communicate with Sony ES receivers using JSON-RPC over HTTP and Arcam amplifiers using a TCP binary protocol. It manages device configurations and exposes control functionalities.
Inputs & outputs
When to use homelab
- →Automating home av equipment
- →Building av control rest apis
- →Controlling sony receivers via cli
About this skill
Purpose
The homelab package provides local-network control of AV equipment:
- Library (
homelab/lib) — Rust client library for Arcam amplifiers (TCP binary protocol) and Sony ES receivers (JSON-RPC over HTTP) - CLI (
homelab-cli) — Binaryhomeyfor terminal-based device control with rich rendering viabiscuit-terminal - Server (
homelab/server) — Binaryhomelab-server(Axum REST API) exposing device control over HTTP
Package Structure
homelab/
├── lib/ # Core library (arcam, network, sony_receiver modules)
├── cli/ # Binary: homey
├── server/ # Binary: homelab-server (Axum)
├── docs/ # Sony STR-AZ7000ES API reference
└── justfile # DevOps commands (build, test, lint, install, server)
Quick Reference
Environment Variables
| Variable | Used By | Description |
|---|---|---|
SONY_RECEIVER | CLI, Server (legacy) | Sony receiver host (IP or DNS) |
ARCAM_AMP | CLI, Server (legacy) | Arcam amplifier host (IP or DNS) |
PORT | Server | Listen port (default: 3000) |
REQUEST_TIMEOUT_MS | Server | Device timeout in ms (default: 5000) |
Server uses
~/homey.jsonconfig file for multi-device support. ENV vars are legacy and auto-migrated to the config file on first run.
Common Commands
just -f homelab/justfile build # Build lib + cli + server
just -f homelab/justfile test # Test all packages
just -f homelab/justfile lint # Clippy on all packages
just -f homelab/justfile install # Install homey CLI
just -f homelab/justfile install-server # Install server binary
just -f homelab/justfile server # Run server in dev mode
CLI Command Tree
homey (--json)
├── arcam (--host) [on|off|power-status|mute-status|mute-toggle]
├── sony (--host, --port)
│ ├── system [power-status|on|off|info|update-check|update-apply|
│ │ alexa-status|ecia-info|wu-tang-info]
│ ├── audio [volume|set-volume|mute-status|mute|unmute|speaker-settings]
│ ├── input [list|current|set|schemes|sources|content-count|content-list|
│ │ browse|set-terminal|bluetooth|set-bluetooth|playback-mode]
│ ├── playback [now-playing|stop|pause|next|previous|functions|
│ │ supported-functions|preset|seek|scan]
│ └── debug [methods|probe]
└── completions
REST API (Server)
Named device routes ({name} = device name from ~/homey.json):
| Group | Endpoints |
|---|---|
| Health | GET /health, GET /health/devices |
| Sony CRUD | GET /sony_receiver, POST /sony_receiver, PUT /sony_receiver/{name}, PATCH /sony_receiver/{name} (rename), DELETE /sony_receiver/{name} |
| Sony Control | GET/POST /sony_receiver/{name}/power, GET/POST /sony_receiver/{name}/volume, GET/POST /sony_receiver/{name}/mute, GET /sony_receiver/{name}/inputs, GET /sony_receiver/{name}/input/current, POST /sony_receiver/{name}/input, GET /sony_receiver/{name}/system/info |
| Arcam CRUD | GET /arcam_amp, POST /arcam_amp, PUT /arcam_amp/{name}, PATCH /arcam_amp/{name} (rename), DELETE /arcam_amp/{name} |
| Arcam Control | GET /arcam_amp/{name}/power, POST /arcam_amp/{name}/power/on, POST /arcam_amp/{name}/power/off, GET /arcam_amp/{name}/mute, POST /arcam_amp/{name}/mute/on, POST /arcam_amp/{name}/mute/off, GET /arcam_amp/{name}/mode |
| Legacy | /sony/*, /arcam/* (deprecated, uses ENV vars) |
Interactive API explorer at
/explore(Scalar UI).
Key Dependencies
| Crate | Version | Used In |
|---|---|---|
reqwest | 0.13.2 | lib (Sony HTTP) |
axum | 0.8 | server |
tower / tower-http | 0.5 / 0.6 | server middleware |
clap + clap_complete | 4.5 | cli |
color-eyre | 0.6 | cli (error reporting) |
biscuit-terminal | local | cli (rich rendering) |
tokio | 1.48-1.49 | all |
Architectural Patterns
- Sony receiver uses
serde_json::Valuefor all response parsing due to API inconsistencies (see sony-quirks.md) - Arcam amplifier uses a binary protocol over TCP port 50000
- Server uses
~/homey.jsonfor multi-device config with named devices; legacy ENV vars auto-migrate on first run - Server state stores devices in
Arc<RwLock<HashMap<String, Device>>>for concurrent access; CRUD ops auto-save to disk - CLI uses dual output: rich
biscuit-terminalrendering or--jsonfor machine consumption - CLI flags:
--jsonis global;--hostand--portare per-command (onarcamandsonysubcommands) - All device operations in the server are wrapped with configurable timeouts
Detailed References
- Sony JSON-RPC Quirks — Response format gotchas, ghost methods, field inconsistencies
- Architecture — Library, CLI, and server design details
When not to use it
- →When controlling AV equipment not compatible with Sony ES receivers or Arcam amplifiers
- →When legacy environment variables are preferred over the `~/homey.json` config file for multi-device support
- →When direct I/O operations are needed without configurable timeouts
Limitations
- →Supports only Sony ES receivers and Arcam amplifiers.
- →Legacy environment variables are deprecated in favor of `~/homey.json` for multi-device support.
- →Sony receiver control uses `serde_json::Value` due to API inconsistencies.
How it compares
This skill offers a unified Rust-based solution for controlling specific Sony and Arcam AV equipment via CLI or REST API, simplifying home automation compared to using disparate vendor-specific tools.
Compared to similar skills
homelab side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| homelab (this skill) | 0 | 4mo | Review | Intermediate |
| tauri | 76 | 1mo | Review | Advanced |
| arm-cortex-expert | 29 | 4mo | No flags | Advanced |
| blockchain-developer | 6 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
tauri
EpicenterHQ
Tauri path handling, cross-platform file operations, and API usage. Use when working with file paths in Tauri frontend code, accessing filesystem APIs, or handling platform differences in desktop apps.
arm-cortex-expert
sickn33
Senior embedded software engineer specializing in firmware and driver development for ARM Cortex-M microcontrollers (Teensy, STM32, nRF52, SAMD). Decades of experience writing reliable, optimized, and maintainable embedded code with deep expertise in memory barriers, DMA/cache coherency, interrupt-driven I/O, and peripheral drivers.
blockchain-developer
sickn33
Build production-ready Web3 applications, smart contracts, and decentralized systems. Implements DeFi protocols, NFT platforms, DAOs, and enterprise blockchain integrations. Use PROACTIVELY for smart contracts, Web3 apps, DeFi protocols, or blockchain infrastructure.
rust-async-patterns
wshobson
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.
rust-errors
EpicenterHQ
Rust to TypeScript error handling patterns for Tauri apps. Use when defining Rust errors that will be passed to TypeScript, handling Tauri command errors, or creating discriminated union error types.
write-script-rust
windmill-labs
MUST use when writing Rust scripts.