使用说明
Hubitat MCP服务器
暴露 Hubitat Maker API设备 连接到MCP(模型上下文协议)服务器,这样像Claude Desktop这样的人工智能助手就可以控制你的智能家居。
它使用 Hubitat制造商API 用于设备访问,并与 mcp代理 项目。
特性
- 列出Hubitat设备及其属性
- 向设备发送开/关和自定义命令
- 与MCP兼容的助手(Claude Desktop等)配合使用
- 支持 本地 或 云 制造商API URL
先决条件
- Hubitat 中心 随着 创客API应用 安装。
- 你的 创客API应用程序ID 和 访问令牌.
- 已安装Python 3.10+。
- 已安装MCP代理-- mcp代理GitHub仓库.
本地URL与云URL
本地URL(推荐用于速度):
http://<HUBITAT_LOCAL_IP>/apps/api/<APP_ID>/devices
云URL(速度较慢,远程工作):
https://cloud.hubitat.com/api/<CLOUD_ID>/apps/<APP_ID>/devices
安装
git clone https://github.com/abeardmore/hubitat-mcp.git
cd hubitat-mcp
pip install -r requirements.txt
配置
复制示例环境文件:
cp .env.example .env
编辑 .env 并设置:
HUBITAT_BASE_URL=http://192.168.1.50/apps/api/<APP_ID>/devices
HUBITAT_TOKEN=<YOUR_ACCESS_TOKEN>
运行服务器
python hubitat_mcp_server.py
Claude桌面集成
将以下内容添加到您的 claude_desktop_config.json 文件:
{
"mcpServers": {
"hubitat": {
"command": "mcp-proxy",
"args": ["http://localhost:5005"]
}
}
}
重新启动克劳德桌面。您的Hubitat设备现在应该可以被发现和控制。
许可证
麻省理工学院
使用理念
一旦您的MCP服务器正在运行并且Claude Desktop已连接,您可以要求Claude执行操作或从您的Hubitat设置中检索信息。
控制装置
让克劳德打开/关闭或更改设置。
Turn on the Office Corner Lamp.
Set the Living Room Light to 30% brightness.
Turn off all lights in the Office.
列出设备
获取所有可用设备的列表。
List my Hubitat devices.
检查设备状态
询问当前状态或属性值。
What is the temperature in the Living Room?
Is the Garage Door open or closed?
Show me the battery level of all my sensors.
获取见解
分析智能家居数据。
Which lights have been on the longest today?
Show me devices that haven't responded in the past 24 hours.
Summarize my motion sensor activity for today.
自动化和常规
设计例程和自动化。
Create a morning routine that turns on the kitchen lights, starts the coffee maker, and sets the thermostat to 72°F.
Help me make a bedtime routine that turns off all lights and locks the doors.
💡 提示: Claude可以将动作链接在一起,并帮助为Hubitat或MCP设计复杂的自动化。