← 返回 Skills 市场
oywq00008-cell

Broadlinkac

作者 KevinChan · GitHub ↗ · v3.0.0 · MIT-0
cross-platform ✓ 安全检测通过
50
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install broadlinkac
功能描述
Control air conditioners via Broadlink RM devices — multi-brand IR control, weather monitoring, typhoon alerts, scheduled automation. Clone, pip install, imp...
使用说明 (SKILL.md)

BroadlinkAC — AI Agent Smart AC Controller

Cross-platform AC control library for Broadlink RM series IR blasters. Zero GUI dependency — designed for AI agents to clone, install, and control air conditioners programmatically.

Quick Start (Agent)

git clone https://github.com/oywq00008-cell/BroadlinkAC-For-AI-Agent.git
cd BroadlinkAC-For-AI-Agent
pip install -r requirements-core.txt
from broadlinkac_core import init, send_ac, fetch_weather, fetch_weather_alerts

# One-time setup — all config persisted to ~/.ac_controller/config.json
init(
    api_key="your_qweather_key",
    qw_host="https://xxx.re.qweatherapi.com",
    location={"lat": 22.54, "lon": 114.05, "name": "Shenzhen"},
    brand="Gree"
)

# Control AC
send_ac("on", "cool", 26, "auto")   # Turn on, cool 26°C, auto fan
send_ac("off", "cool", 26, "auto")  # Turn off

# Get weather
weather = fetch_weather()            # Real-time temp, humidity, feels-like
alerts = fetch_weather_alerts()      # Local disaster warnings (heat/rain/typhoon)

API Reference

Setup

Function Description
init(api_key=None, qw_host=None, location=None, brand=None) Initialize config + start background scheduler. All params optional — subsequent calls read from persistent config.

AC Control

Function Description
send_ac(power, mode, temp, fan) Send IR command. power: "on"/"off". mode: "cool"/"heat"/"dry"/"fan"/"auto". temp: 16-30. fan: "auto"/"1"/"2"/"3"
decide_ac(outdoor_temp) Run temperature rules → returns (target_temp, mode)

Weather & Alerts

Function Description
fetch_weather() Current weather (temp, humidity, feels-like, wind) via QWeather API
fetch_weather_alerts() Local weather warnings — returns list of {headline, severity, description, senderName, effectiveTime, expireTime}
city_lookup(query) OpenStreetMap city search → coordinates

Typhoon

Function Description
fetch_typhoons() Active NW Pacific typhoons from China NMC
fetch_typhoon_detail(typhoon_id) Detailed track + forecast

Supported AC Brands

hvac_ir (5 brands): Gree, Midea, Hisense, Daikin, Mitsubishi

Custom protocols (3 brands): Haier, AUX, Panasonic (ported from IRremoteESP8266 C++)

Select in Settings or pass brand= to init(). Device auto-discovered on LAN via Broadlink UDP.

Key Design

  • import broadlinkac_core has zero side effects — no network I/O, no filesystem reads, no threads started
  • init() is idempotent — safe to call multiple times
  • Config auto-persisted to ~/.ac_controller/config.json
  • Runs on any device with Python 3.9+ (macOS/Windows/Linux/Raspberry Pi/NAS)

Common Agent Tasks

"Turn on the AC to 26°C cooling"

from broadlinkac_core import init, send_ac
init()
send_ac("on", "cool", 26, "auto")

"What's the temperature outside?"

from broadlinkac_core import init, fetch_weather
init()
w = fetch_weather()
# Returns {"temp": "31", "text": "晴", "feelsLike": "33", "humidity": "65", ...}

"Are there any weather warnings?"

from broadlinkac_core import init, fetch_weather_alerts
init()
alerts = fetch_weather_alerts()
for a in alerts:
    print(f"[{a['severity']}] {a['headline']}")

"Turn off the AC at 10pm"

# Set off_time in config, then the built-in scheduler handles it
import broadlinkac_core.config as _cfg
from broadlinkac_core import init
init()
_cfg.config["off_time"] = "22:00"
_cfg.config["off_enabled"] = True
_cfg.save_config(_cfg.config)
安全使用建议
Install only if you are comfortable storing AC-related configuration and API keys under ~/.ac_controller/config.json and sharing location/weather lookup data with the named external services. Review the config file permissions, avoid reusing sensitive API keys, and disable or avoid network-backed weather features if you do not want location data sent to third parties.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
An AC controller reasonably needs device settings, schedules, location, and weather/alert data to operate effectively; no artifact-backed evidence shows unrelated capability.
Instruction Scope
The reviewed signals indicate persistence and external weather/geocoding calls are documented, though users would benefit from clearer upfront privacy wording before entering keys or location.
Install Mechanism
No evidence was supplied or found of deceptive install behavior, hidden downloads, obfuscation, or automatic execution beyond normal skill instructions.
Credentials
Network calls to QWeather, OpenStreetMap, and NMC are proportionate for weather and city lookup features, but they can disclose location and usage patterns to those services.
Persistence & Privilege
Writing configuration to ~/.ac_controller/config.json is purpose-aligned, but it may store sensitive API keys, coordinates, brand, device, and scheduling data across sessions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install broadlinkac
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /broadlinkac 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.0.0
Version 3.0.0 — Major update - Adds multi-brand air conditioner control via Broadlink RM IR devices (Gree, Midea, Hisense, Daikin, Mitsubishi, Haier, AUX, Panasonic) - Introduces weather monitoring, disaster/typhoon alerts, and automated scheduling - New zero-config, agent-focused API: single import with no GUI or setup required - Supports persistent config, auto device discovery, and runs cross-platform - All setup and operation documented for easy scripting and integration
元数据
Slug broadlinkac
版本 3.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Broadlinkac 是什么?

Control air conditioners via Broadlink RM devices — multi-brand IR control, weather monitoring, typhoon alerts, scheduled automation. Clone, pip install, imp... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 50 次。

如何安装 Broadlinkac?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install broadlinkac」即可一键安装,无需额外配置。

Broadlinkac 是免费的吗?

是的,Broadlinkac 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Broadlinkac 支持哪些平台?

Broadlinkac 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Broadlinkac?

由 KevinChan(@oywq00008-cell)开发并维护,当前版本 v3.0.0。

💬 留言讨论