“智能照明,极致简约”
IntelliGlow 是一个模型上下文协议(MCP)服务器,它允许像 Claude 和 ChatGPT 这样的人工智能助手通过 UDP 网络通信来控制真正的智能灯泡。这个基于 Python 的实现具备语音命令、人工智能推理和直接硬件控制等功能。
安装 IntelliGlow:
# 核心系统
pip install -e .
# 具备语音功能
pip install -e .[voice]
配置你的灯泡(可选):
export BULB_IP=192.168.1.45 # 你的灯泡 IP 地址
export BULB_PORT=4000 # 你的灯泡端口号
# 1. 仅运行 MCP 服务器(用于人工智能集成)
mcp-server-smartbulb
# 2. 仅运行语音接口
mcp-server-smartbulb-voice
# 3. 运行完整的 IntelliGlow 系统(语音 + 人工智能 + MCP)
python voice_enabled_server.py
# 测试与你真实灯泡的 UDP 通信
python test_network_bulbs.py
192.168.1.45:4000安装 IntelliGlow:
# 核心系统
pip install -e .
# 具备语音功能
pip install -e .[voice]
配置你的灯泡(可选):
export BULB_IP=192.168.1.45 # 你的灯泡 IP 地址
export BULB_PORT=4000 # 你的灯泡端口号
# 安装 IntelliGlow
pip install -e .
# 运行 MCP 服务器
mcp-server-smartbulb
# 运行具备语音功能的完整 IntelliGlow 系统
python voice_enabled_server.py
将以下内容添加到你的 Claude 桌面版 claude_desktop_config.json 文件中:
{
"mcpServers": {
"intelliglow": {
"command": "python",
"args": ["-m", "mcp_server_smartbulb.network_server"],
"cwd": "/path/to/your/IntelliGlow",
"env": {
"BULB_IP": "192.168.1.45",
"BULB_PORT": "4000"
}
}
}
}
discover_bulbs() - 在网络中查找智能灯泡connect_to_bulb(ip, port) - 连接到特定的灯泡turn_on_bulb(ip, port) - 通过 UDP 命令打开灯泡turn_off_bulb(ip, port) - 通过 UDP 命令关闭灯泡set_bulb_brightness(brightness, ip, port) - 设置亮度(0 - 100)set_bulb_color(color, ip, port) - 使用十六进制代码设置颜色get_bulb_status(ip, port) - 获取当前灯泡的状态ping_bulb(ip, port) - 测试与灯泡的连接性IntelliGlow 默认连接到 192.168.1.45:4000。你可以通过以下方式覆盖此设置:
export BULB_IP=192.168.1.100
export BULB_PORT=4001
创建 bulb_config.json 文件:
{
"default_bulb": {
"ip": "192.168.1.45",
"port": 4000,
"timeout": 5.0
},
"discovery": {
"enabled": true,
"timeout": 10.0,
"port_range": {
"start": 4000,
"end": 4010
}
}
}
| 属性 | 详情 |
|---|---|
| 语音控制 | Alexa/Google:支持基本命令;IntelliGlow:支持自然语言 + 人工智能推理 |
| 人工智能集成 | Alexa/Google:生态系统有限;IntelliGlow:可与任何人工智能模型(Claude、GPT 等)配合使用 |
| 硬件控制 | Alexa/Google:依赖云服务;IntelliGlow:直接 UDP 网络通信 |
| 定制性 | Alexa/Google:受供应商限制;IntelliGlow:完全控制协议 |
| 上下文理解 | Alexa/Google:仅识别简单关键词;IntelliGlow:人工智能理解上下文和工作流 |
| 隐私性 | Alexa/Google:云处理;IntelliGlow:本地处理 |
| 开发者自由度 | Alexa/Google:封闭生态系统;IntelliGlow:开放协议,可扩展 |
结论:IntelliGlow = Alexa 的便利性 + 人工智能的智能性 + 开源的自由度!🎉
# 测试与你的灯泡的真实 UDP 通信
python test_network_bulbs.py
此测试将:
python -c "import asyncio; from mcp_server_smartbulb.bulb_discovery import BulbDiscovery; asyncio.run(BulbDiscovery().discover_bulbs())"pip install -e .[voice]python -m mcp_server_smartbulb.voice_interfacebulb_config.json 文件中增加超时时间IntelliGlow/
├── mcp_server_smartbulb/
│ ├── __init__.py # 包初始化
│ ├── network_server.py # 主要的支持 UDP 的 MCP 服务器
│ ├── udp_client.py # UDP 网络客户端
│ ├── bulb_discovery.py # 网络发现
│ └── voice_interface.py # 语音命令处理
├── bulb_config.json # 网络配置
├── test_network_bulbs.py # UDP 测试脚本
├── voice_enabled_server.py # 完整的 IntelliGlow 系统
├── README.md # 本文件
└── pyproject.toml # 项目配置
IntelliGlow 不仅仅是另一个智能灯泡控制器,它是人工智能智能与物理硬件之间的桥梁。
用户:“我要工作到很晚,需要专注照明”
IntelliGlow:
→ 人工智能理解上下文
→ 设置为冷白光(5000K)
→ 调整到最佳亮度(85%)
→ 通过直接 UDP 通信控制
→ 回复确认信息
这就是智能家居的未来——照明真正理解并适应你的需求!🚀
怀着对下一代智能家庭自动化的热爱而打造 ❤️