← Back to Skills Marketplace
oywq00008-cell

Broadlinkac

by KevinChan · GitHub ↗ · v3.0.0 · MIT-0
cross-platform ✓ Security Clean
50
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install broadlinkac
Description
Control air conditioners via Broadlink RM devices — multi-brand IR control, weather monitoring, typhoon alerts, scheduled automation. Clone, pip install, imp...
README (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)
Usage Guidance
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.
Capability Tags
requires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install broadlinkac
  3. After installation, invoke the skill by name or use /broadlinkac
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug broadlinkac
Version 3.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Broadlinkac?

Control air conditioners via Broadlink RM devices — multi-brand IR control, weather monitoring, typhoon alerts, scheduled automation. Clone, pip install, imp... It is an AI Agent Skill for Claude Code / OpenClaw, with 50 downloads so far.

How do I install Broadlinkac?

Run "/install broadlinkac" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Broadlinkac free?

Yes, Broadlinkac is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Broadlinkac support?

Broadlinkac is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Broadlinkac?

It is built and maintained by KevinChan (@oywq00008-cell); the current version is v3.0.0.

💬 Comments