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.zip

Installs 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.
194 chars✓ has a “when” trigger
Intermediate

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

You give it
CLI commands, REST API requests, or Rust library calls
You get back
AV equipment power state changes, volume adjustments, input selections, or status information

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) — Binary homey for terminal-based device control with rich rendering via biscuit-terminal
  • Server (homelab/server) — Binary homelab-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

VariableUsed ByDescription
SONY_RECEIVERCLI, Server (legacy)Sony receiver host (IP or DNS)
ARCAM_AMPCLI, Server (legacy)Arcam amplifier host (IP or DNS)
PORTServerListen port (default: 3000)
REQUEST_TIMEOUT_MSServerDevice timeout in ms (default: 5000)

Server uses ~/homey.json config 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):

GroupEndpoints
HealthGET /health, GET /health/devices
Sony CRUDGET /sony_receiver, POST /sony_receiver, PUT /sony_receiver/{name}, PATCH /sony_receiver/{name} (rename), DELETE /sony_receiver/{name}
Sony ControlGET/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 CRUDGET /arcam_amp, POST /arcam_amp, PUT /arcam_amp/{name}, PATCH /arcam_amp/{name} (rename), DELETE /arcam_amp/{name}
Arcam ControlGET /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

CrateVersionUsed In
reqwest0.13.2lib (Sony HTTP)
axum0.8server
tower / tower-http0.5 / 0.6server middleware
clap + clap_complete4.5cli
color-eyre0.6cli (error reporting)
biscuit-terminallocalcli (rich rendering)
tokio1.48-1.49all

Architectural Patterns

  • Sony receiver uses serde_json::Value for all response parsing due to API inconsistencies (see sony-quirks.md)
  • Arcam amplifier uses a binary protocol over TCP port 50000
  • Server uses ~/homey.json for 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-terminal rendering or --json for machine consumption
  • CLI flags: --json is global; --host and --port are per-command (on arcam and sony subcommands)
  • All device operations in the server are wrapped with configurable timeouts

Detailed References

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.

SkillInstallsUpdatedSafetyDifficulty
homelab (this skill)04moReviewIntermediate
tauri761moReviewAdvanced
arm-cortex-expert294moNo flagsAdvanced
blockchain-developer64moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry