# Shelly Home Automation

> Safe, repeatable Shelly control through the open-source shelly-mcp server: rooms, scenes, sunset schedules, energy costs.

Shelly Home Automation is a paid AI agent skill on Agensi by Michal Burgermeister, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9 (one-time purchase)
- Creator: [Michal Burgermeister](https://www.agensi.io/creators/michal-burgermeister)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-10-16
- Security: scan passed (2026-10-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/shelly-home-automation
- Tags: automation, productivity, shelly, iot, smart-home, python, home-automation, mcp

## About this skill

Managing a smart home via CLI or chat often feels like guesswork, leading to broken routines or devices switching off at the wrong time. This skill provides a safe, local-first interface for Shelly Gen1 through Gen4 devices by driving the `shelly-mcp` server with professional-grade caution.

### What it does
- **Device Control** manages switches, dimmers, RGBW lighting, and motorized covers using absolute states for reliability.
- **Scene Management** bundles multiple device actions into named, deterministic routines like "Movie Night" that execute identically every time.
- **On-Device Scheduling** configures sunset, sunrise, and cron-based timers that run locally on the hardware without requiring a persistent server connection.
- **Energy Analytics** generates reports on live wattage, lifetime consumption, and cost projections using the bundled `energy_report.py` script.
- **Safe Execution** enforces manual confirmation for multi-room actions and prevents accidental power cycles on critical appliances like routers or freezers.

### How it works
1. **Discovery** runs `shelly_discover` to map the local network and `shelly_list_devices` to pull friendly names from the configuration.
2. **State Monitoring** checks device status, firmware versions, and power draw before attempting any write operations.
3. **Command Execution** uses the appropriate tool for the task, such as `shelly_switch_set` for toggles or `shelly_schedule_create` for automations.
4. **Validation** reports per-device success or failure, diagnosing unreachable units or authentication errors immediately.

### Frameworks & tools
This skill requires the `shelly-mcp` server installed via `uvx`. It interacts with Shelly Gen1, Gen2, Gen3, and Gen4 hardware over a local area network.

### Why this beats prompting it yourself
Standard prompts often fail to distinguish between device generations or accidentally trigger unsafe "toggle" loops. This skill implements a strict safety playbook, uses hardware-native scheduling instead of fragile software timers, and handles local mDNS discovery that generic models cannot access.

### Use cases
- Create a "Leaving Home" scene that shuts down all non-essential lighting and appliances.
- Schedule porch lights to follow seasonal sunset and sunrise times automatically.
- Audit household energy leaks by identifying devices with high standby power draw.
- Switch a device on for a fixed time — "TV for 10 minutes" — and let the device switch itself back off.

### Known limitations
Schedules, scripts and webhooks need a local (LAN) connection; devices reachable only through Shelly Cloud get basic control and status. Gen1 devices cannot be scheduled through shelly-mcp. Sunset and sunrise schedules need shelly-mcp 0.1.3+ and the device location set.

## Requires

- shelly-mcp (0.1.3+)
- Shelly devices on your LAN
- Python 3.9+
- uv (Python tool runner)

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Shelly Home Automation skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Are there any specific hardware or software prerequisites for this skill?

Yes, this skill requires the `shelly-mcp` server to be installed via `uvx`. Your host machine must also be on the same local network (VLAN/subnet) as your Shelly devices to enable discovery and control.

### How does this skill prevent accidental power cycles on important devices?

Unlike generic prompts, this skill uses absolute states (ON/OFF) rather than toggles to prevent accidental loops. It also includes a safety playbook that requires manual confirmation for high-stakes actions, such as powering off critical appliances or multi-room shutdowns.

### Which generations of Shelly hardware are supported?

This skill is compatible with Shelly Gen1 through Gen4 hardware. Note that while basic controls work across all generations, advanced hardware-native scheduling is reserved for Gen2 devices and newer.

### Can I set up automations that continue to work if my internet or host machine is down?

Absolutely. A key feature of this skill is its ability to configure native cron-based, sunset, and sunrise timers directly on the Shelly hardware, meaning your routines will run even if your AI agent or server goes offline.

### Does this skill provide insights into my electricity usage?

The skill includes the `energy_report.py` script, which allows the AI to pull live wattage and lifetime consumption data to generate cost projections and identify high-draw 'energy leaks' in your home.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
