当前位置: 首页 > Skill >

smart-control-skill

smart-control-skill

smart-control-skill

控制已在智能家APP中配置的智能家居设备。适用于:查询设备和场景(灯具、空调、开关等),控制设备电源等。

1.0.2 2026.11.20 675
获取Skill文件查看使用说明
作 者:顾辰 许可证: 更新时间:2026.11.20
本文目录展开

Mxchip Smart Control

Control smart home devices configured in Smart Plus APP (智家精灵) through MXCHIP MCP service.

Developer: Shanghai MXCHIP Information Technology Co., Ltd. (上海庆科信息有限公司)
Official Website: https://www.mxchip.com/
GitHub: https://github.com/mxchip
Support: https://app.api.cloud.mxchip.com:2443/oauth2/mcp/oauth

Overview

This skill provides AI agents with complete control over smart home devices configured in Smart Plus (智家精灵) APP using the MCP (Model Context Protocol). Supports device management, air conditioner control, and scene automation through JSON-RPC 2.0 over HTTP.

Protocol: MCP with JSON-RPC 2.0
Transport: HTTP
Target Application: Smart Plus APP (智家精灵)

About MXCHIP

Shanghai MXCHIP Information Technology Co., Ltd. (上海庆科信息有限公司) is a leading IoT solution provider in China, specializing in:

  • Smart home device connectivity
  • IoT cloud platform services
  • AI-powered home automation
  • MCP (Model Context Protocol) integration

Smart Plus (智家精灵) is MXCHIP's official smart home application that allows users to:

  • Configure and manage smart devices
  • Create automation scenes
  • Control devices remotely
  • Integrate with AI assistants

Environment Setup

Install dependencies:

pip install requests

Set OAuth token:

export MXCHIP_OAUTH_TOKEN="oauth2_YOUR_TOKEN_HERE"

Get your token:

  1. Visit: https://app.api.cloud.mxchip.com:2443/oauth2/mcp/oauth
  2. Enter your Smart Plus APP account credentials
  3. Copy the OAuth2 access token

Quick Start

Query Devices and Scenes

from mxchip_mcp_client import MxchipMCPClient

client = MxchipMCPClient()

# List all devices and scenes
result = client.list_home_devices_and_scenes()

# Access devices
for device in result.get('devices', []):
    print(f"{device['name']}: {device['category']}")

# Access scenes
for scene in result.get('scenes', []):
    print(f"{scene['name']}: {scene['scene_id']}")

Control Devices

# Turn on light
client.control_device("device_001", "TurnOnRequest")

# Turn off switch
client.control_device("device_002", "TurnOffRequest")

Control Air Conditioner

# Set temperature to 26°C
client.control_air_conditioner(
    "ac_device_id",
    "SetTemperatureRequest",
    temperature=26
)

# Increase temperature by 2°C
client.control_air_conditioner(
    "ac_device_id",
    "IncrementTemperatureRequest",
    delta="2"
)

# Set cooling mode
client.control_air_conditioner(
    "ac_device_id",
    "SetModeRequest",
    mode="COOL"
)

Trigger Scenes

# Trigger "Coming Home" scene
client.trigger_scene("sceneid_coming_home")

MCP Tools Reference

1. list_home_devices_and_scenes

Description: Get all smart devices and scenes in your home.

Parameters: None

Returns:

  • devices: Array of device objects
    • device_id: Device unique identifier
    • name: Device name
    • category: Device type (LIGHT, AIR_CONDITION, SWITCH, etc.)
    • status: Current device status
  • scenes: Array of scene objects
    • scene_id: Scene identifier (format: sceneid_xxx)
    • name: Scene name (e.g., "Coming Home", "Sleep Mode")

Example:

result = client.list_home_devices_and_scenes()
devices = result.get('devices', [])
scenes = result.get('scenes', [])

2. control_device

Description: Control device power state (on/off).

Parameters:

  • device_id (string, required): Device identifier from list_home_devices_and_scenes
  • action (string, required): Control action
    • "TurnOnRequest": Turn on device
    • "TurnOffRequest": Turn off device

Example:

# Turn on device
client.control_device("light_001", "TurnOnRequest")

# Turn off device
client.control_device("light_001", "TurnOffRequest")

3. control_air_conditioner

Description: Control air conditioner temperature and mode.

Parameters:

  • device_id (string, required): Air conditioner device ID (AIR_CONDITION category)
  • action (string, required): Control action type
    • "IncrementTemperatureRequest": Increase temperature
    • "DecrementTemperatureRequest": Decrease temperature
    • "SetTemperatureRequest": Set target temperature
    • "SetModeRequest": Set working mode
  • temperature (int, optional): Target temperature 16-32°C (for SetTemperatureRequest)
  • delta (string, optional): Temperature change amount, default "1" (for Increment/Decrement)
  • mode (string, optional): Working mode (for SetModeRequest)
    • "COOL": Cooling mode
    • "HEAT": Heating mode
    • "AUTO": Auto mode
    • "FAN": Fan only
    • "DEHUMIDIFICATION": Dehumidify
    • "SLEEP": Sleep mode

Examples:

# Set temperature to 26°C
client.control_air_conditioner("ac_001", "SetTemperatureRequest", temperature=26)

# Increase temperature by 2°C
client.control_air_conditioner("ac_001", "IncrementTemperatureRequest", delta="2")

# Set cooling mode
client.control_air_conditioner("ac_001", "SetModeRequest", mode="COOL")

# Set heating mode
client.control_air_conditioner("ac_001", "SetModeRequest", mode="HEAT")

4. trigger_scene

Description: Trigger a smart home scene to control multiple devices at once.

Parameters:

  • scene_id (string, required): Scene identifier (format: sceneid_xxx)

Common Scenes:

  • Coming Home Mode (回家模式)
  • Leaving Home Mode (离家模式)
  • Sleep Mode (睡眠模式)
  • Movie Mode (观影模式)

Example:

client.trigger_scene("sceneid_coming_home")

MCP Prompts Reference

The MCP service provides three specialized prompts:

1. device_control

Purpose: Device control assistant focused on controlling lights, switches, curtains, etc.

When to use: When user wants to control specific device types (turn on/off lights, switches)

2. scene_trigger

Purpose: Scene control assistant for managing preset automation scenes

When to use: When user wants to execute scenes like "Coming Home", "Sleep Mode"

3. smart_home_assistant

Purpose: Full-featured smart home assistant

When to use: When user needs comprehensive home automation (query + control + scenes)

Common Use Cases

Example 1: Morning Routine

client = MxchipMCPClient()

# Turn on bedroom light
client.control_device("bedroom_light", "TurnOnRequest")

# Set AC to comfortable temperature
client.control_air_conditioner("bedroom_ac", "SetTemperatureRequest", temperature=24)

# Open curtains (if supported)
client.control_device("curtain_001", "TurnOnRequest")

Example 2: Leaving Home

# Trigger "Leaving Home" scene
client.trigger_scene("sceneid_leaving_home")

# Or manually turn off devices
client.control_device("living_room_light", "TurnOffRequest")
client.control_device("bedroom_ac", "TurnOffRequest")

Example 3: Check All Devices

result = client.list_home_devices_and_scenes()

for device in result.get('devices', []):
    status = device.get('status', 'Unknown')
    print(f"{device['name']}: {status}")

Device Categories

Category Description Control Methods
LIGHT Smart lights control_device (on/off)
AIR_CONDITION Air conditioners control_air_conditioner
SWITCH Smart switches control_device (on/off)
CURTAIN Smart curtains control_device (on/off)
SOCKET Smart sockets control_device (on/off)

Error Handling

from mxchip_mcp_client import (
    MxchipMCPClient,
    AuthenticationError,
    InvalidParameterError,
    MxchipMCPError
)

try:
    client = MxchipMCPClient()
    client.control_device("device_001", "TurnOnRequest")
except AuthenticationError as e:
    print(f"Auth failed: {e}")
    # Regenerate token
except InvalidParameterError as e:
    print(f"Invalid parameter: {e}")
    # Check parameters
except MxchipMCPError as e:
    print(f"MCP error: {e}")
    # Handle other errors

Troubleshooting

Authentication Errors:

  • Verify MXCHIP_OAUTH_TOKEN is set correctly
  • Token should start with oauth2_
  • Regenerate token at OAuth page if expired

Device Not Found:

  • Always call list_home_devices_and_scenes() first
  • Use exact device_id from the response
  • For AC control, ensure device category is AIR_CONDITION

Invalid Parameters:

  • Temperature range: 16-32°C
  • Valid modes: COOL, HEAT, AUTO, FAN, DEHUMIDIFICATION, SLEEP
  • Scene ID format: sceneid_xxx

Security Notes

  • OAuth token provides access to your smart home devices
  • Keep token secure and never commit to version control
  • Token has expiration time - regenerate when needed
  • Use environment variables for token storage

Resources

scripts/

  • mxchip_mcp_client.py - Official MCP client SDK
    • Implements JSON-RPC 2.0 protocol
    • All 4 MCP tools wrapped as Python methods
    • Complete error handling
    • Type hints and documentation

references/

  • api_reference.md - Detailed API documentation
    • JSON-RPC 2.0 protocol details
    • Complete parameter specifications
    • Error codes and handling
    • Advanced usage examples

README

Project Information

Skill Name: Mxchip Smart Control
Developer: Shanghai MXCHIP Information Technology Co., Ltd. (上海庆科信息有限公司)
Version: 1.0.2
License: MIT-0 (Free to use, modify, and redistribute)
Protocol: MCP (Model Context Protocol) + JSON-RPC 2.0

About MXCHIP

Shanghai MXCHIP Information Technology Co., Ltd. (上海庆科信息有限公司) is a leading Chinese IoT solution provider founded in 2005. The company specializes in:

  • IoT Hardware: Wi-Fi modules, Bluetooth modules, IoT development boards
  • Cloud Services: MXCHIP Cloud platform for device management
  • Smart Home: Smart Plus APP for home automation
  • AI Integration: MCP protocol support for AI assistants

Smart Plus APP

Smart Plus (智家精灵) is MXCHIP's official smart home application that provides:

  • Device Management: Add and configure smart devices
  • Scene Automation: Create custom automation rules
  • Remote Control: Control devices from anywhere
  • Voice Control: Integration with AI assistants via MCP

Download:

  • iOS: App Store search "Smart Plus" or "智家精灵"
  • Android: Major app stores search "Smart Plus" or "智家精灵"

Supported Devices

This skill supports all devices configured in Smart Plus APP, including:

  • Switches: Smart plugs, power strips
  • Lights: Smart bulbs, LED strips, ceiling lights
  • Air Conditioners: Split ACs, central ACs
  • Sensors: Temperature, humidity, motion (via scenes)
  • Curtains: Smart curtain controllers
  • Other: Any device added to Smart Plus APP

API Access

MCP Endpoint: https://app.api.cloud.mxchip.com:2443/mcp
OAuth Token: https://app.api.cloud.mxchip.com:2443/oauth2/mcp/oauth

Authentication: OAuth2 Bearer Token
Format: oauth2_<your_token>
Validity: Token expires after certain period (regenerate as needed)

Use Cases

For Home Users

  • Control devices with natural language
  • Trigger scenes with voice commands
  • Monitor device status
  • Automate daily routines

For Developers

  • Build AI-powered smart home applications
  • Integrate with OpenClaw ecosystem
  • Create custom automation workflows
  • Develop voice-controlled interfaces

Technical Stack

Client SDK: Python 3.7+
Dependencies: requests>=2.28.0
Protocol: MCP with JSON-RPC 2.0 over HTTP
Authentication: OAuth2 Bearer Token

Support & Resources

Official Website: https://www.mxchip.com/
Documentation: See references/api_reference.md in this skill
OAuth Token: https://app.api.cloud.mxchip.com:2443/oauth2/mcp/oauth
GitHub: https://github.com/mxchip

Contributing

This skill is developed and maintained by Shanghai MXCHIP Information Technology Co., Ltd. For issues, feature requests, or contributions:

  1. Issues: Contact MXCHIP support team
  2. Feature Requests: Submit via Smart Plus APP feedback
  3. Documentation: See skill documentation in scripts/ and references/ directories

Disclaimer

This skill is provided as-is for controlling devices configured in Smart Plus APP. Users must:

  • Have a valid Smart Plus APP account
  • Configure devices in the app before using this skill
  • Configure devices in the app before using this skill
  • Keep OAuth token secure and confidential
  • Comply with MXCHIP's terms of service

Changelog

v1.0.2 (2026-03-23)

  • Fixed JSON parsing for MCP response structure
  • Updated environment variable from ZHIJIA to MXCHIP
  • Added comprehensive documentation
  • Added Shanghai MXCHIP company information

v1.0.1 (2026-03-23)

  • Initial release
  • Support for 4 MCP tools
  • Support for 3 MCP prompts

© 2026 Shanghai MXCHIP Information Technology Co., Ltd. All rights reserved.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,014
Skill 文件
  • SKILL.md
    • Mxchip Smart Control
    • Overview
    • About MXCHIP
    • Environment Setup
    • Quick Start
      • Query Devices and Scenes
      • Control Devices
      • Control Air Conditioner
      • Trigger Scenes
    • MCP Tools Reference
      • 1. list_home_devices_and_scenes
      • 2. control_device
      • 3. control_air_conditioner
      • 4. trigger_scene
    • MCP Prompts Reference
      • 1. device_control
      • 2. scene_trigger
      • 3. smart_home_assistant
    • Common Use Cases
      • Example 1: Morning Routine
      • Example 2: Leaving Home
      • Example 3: Check All Devices
    • Device Categories
    • Error Handling
    • Troubleshooting
    • Security Notes
    • Resources
      • scripts/
      • references/
    • README
      • Project Information
      • About MXCHIP
      • Smart Plus APP
      • Supported Devices
      • API Access
      • Use Cases
        • For Home Users
        • For Developers
      • Technical Stack
      • Support & Resources
      • Contributing
      • Disclaimer
      • Changelog
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期