Smart Home & IoTDocumentedScanned
homey-cli
Control Homey home automation hub.
Share:
Installation
npx clawhub@latest install homey-cliView the full skill documentation and source below.
Documentation
Homey CLI
Safe, agent-friendly CLI for controlling Homey home automation hubs.
What This Skill Provides
- Device control: Turn devices on/off, dim lights, change colors, set temperatures
- Device inspection: List devices, check status, read capabilities
- Zone management: List zones and devices per zone
- Flow control: List and trigger flows
- Inventory: Get complete hub overview
Setup
1. Install Dependencies
cd skills/homey-cli
npm install
2. Create Homey App Credentials
- Callback URL:
- Note your **Client ID** and **Client Secret**
### 3. Configure Environment
Create .env file:
__CODE_BLOCK_1__
### 4. Login
__CODE_BLOCK_2__
Follow the OAuth flow in your browser. Tokens are stored in ~/.config/homey-cli/.
## Usage
### List Homeys
__CODE_BLOCK_3__
### Select Active Homey
__CODE_BLOCK_4__
### Device Operations
__CODE_BLOCK_5__
### Flow Operations
__CODE_BLOCK_6__
### Complete Inventory
__CODE_BLOCK_7__
## Safety Model
Write operations are **capability-allowlisted** for safety:
- Default allowed: onoff, dim, light_hue, light_saturation, light_temperature, target_temperature
- Override via: export HOMEY_CLI_ALLOWED_CAPABILITIES=onoff,dim,target_temperature
Destructive operations (delete devices, modify flows, change app settings) are **not supported**.
## Common Queries
When users ask:
- "Turn on the kitchen lights" → List devices, find match, use devices on
- "Dim living room to 50%" → Find device, use devices dim 0.5
- "What's the temperature in the bedroom?" → Find device, use devices read measure_temperature
- "List all my lights" → Use devices list --json and filter by class/capabilities
## Configuration Storage
- **Tokens**: ~/.config/homey-cli/credentials.json
- **Active Homey**: ~/.config/homey-cli/config.json
## Troubleshooting
- **Auth errors**: Re-run bash run.sh auth login
- **Device not found**: Check device name/ID with bash run.sh devices list
- **Capability not allowed**: Add to HOMEY_CLI_ALLOWED_CAPABILITIES` or check if it's a read-only capability