360 Secure SkillHub
360 安全技能中心

Shelly Sync

该 Skill 通过 shelly_client.py 调用 Shelly Pro 3EM 的 EMData.GetStatus RPC 接口,读取当前功率与三相明细,并在检测到光伏余量时按功率阈值触发本地负载(如热泵、充电器)。支持 get_status 与 optimize_load 两个动作,需通过环境变量指定设备地址,输出结构化 JSON。

jcbuer
jcbuer
热度 22.20
最近更新 2026-06-09 01:04:40
分类:自动化依赖:代码执行 / 第三方 API应用场景:自动化脚本 / 工作流 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add shelly-sync
Metadata
name
shelly_sync
description
Monitor real-time power consumption from Shelly Pro 3EM and control local appliances/automation based on solar yield or grid usage.
version
1.0.1
license
MIT
capabilities
["Read current power consumption and grid injection (W)","Trigger smart plugs/appliances based on power thresholds","Provide power stats summary"]
inputs
{"action":{"type":"string","description":"The operation: 'get_status' or 'optimize_load'","required":true},"target_load":{"type":"string","description":"Optional: Specific appliance to toggle (e.g. 'heatpump', 'charger')","required":false}}
env
["SHELLY_EM_IP"]

Shelly Sync Skill

Interface between Shelly Pro 3EM energy monitoring and home automation.

Usage Guidelines

  • Power output in Watts (W) or Kilowatts (kW)
  • Negative = grid injection (surplus). Positive = grid consumption
  • If data fetch fails → report connection error immediately, don't hallucinate

Commands

get_status

Returns current power consumption across all 3 phases.

/shelly get_status

optimize_load

Analyzes surplus and triggers load optimization if excess energy available.

/shelly optimize_load
/shelly optimize_load target_load:heatpump

Implementation

  • Script: shelly_client.py
  • Calls Shelly Pro 3EM RPC API (EMData.GetStatus)
  • Returns clean JSON with total power and phase breakdown