💡 S2-Light-Perception: Spatial Light Radar / 空间光之雷达
Welcome to the S2 Light Perception.
This is a 100% real network-active radar. It does not use simulated data. It uses actual UDP Broadcasts (Port 38899) and SSDP Multicast (Port 1900) to discover devices, and real local HTTP/UDP socket calls to fetch states.
这是一个100%真实的活跃网络雷达。它不使用模拟数据,而是使用真正的 UDP 广播(38899 端口)和 SSDP 组播(1900 端口)发现设备,并通过真实的本地 HTTP/UDP Socket 调用获取状态。
🧬 Core Features / 核心特性
- * Real Active Radar (真实主动雷达): Sends authentic UDP packets to scan unassigned smart lights on the LAN. / 发送真实的 UDP 数据包扫描局域网内的智能光源。
- Zero-Dependency Native API (零依赖原生接口): Native Python
socket and urllib implementation for Hue (HTTP) and Wiz (UDP) without third-party bloated libraries. / 纯原生实现 Hue 与 Wiz 协议,无第三方冗余库。 - Memzero Voxel Wrapping (网格化封装): Encapsulates hardware states into S2 spatial memory data. / 将灯具状态彻底转化为 S2 空间记忆数据。
- Offline Linkage (生物节律离线联动): Edge-computes lighting impacts on melatonin and suggests actions. / 边缘端自动计算光照对人体褪黑素的影响并提出联动建议。
🤖 Instructions for AI Agents (CRITICAL)
Phase 1: Scan Light Sources / 阶段 1:扫描光源
Execute a real UDP/SSDP network scan / 执行真实的 UDP/SSDP 局域网扫描:
```bash
python3 light.py --mode discover
Phase 2: Authorized Voxel Read / 阶段 2:空间授权读取
Pass the protocol (hue, wiz, or mqtt) and IP. / 传入协议与 IP。
Bash
python3 light.py --mode read --ip IP> --protocol wiz --zone bedroom --grid x1y1 --consent-granted true
Phase 3: Parsing & Insights / 阶段 3:解析与建议
If network fails (light is off or disconnected), estimatedlux will safely drop to 5. Check vendorspecificnl for error details or hardware status. Present offlinelinkage_suggestions to the user. / 如果网络调用失败,预估光照度会降至5。向用户展示离线护眼建议。
💡 S2-Light-Perception: 空间光之雷达
欢迎使用 S2 光感知系统。
这是一个100%真实的活跃网络雷达。它不使用模拟数据,而是使用真正的 UDP 广播(38899 端口)和 SSDP 组播(1900 端口)发现设备,并通过真实的本地 HTTP/UDP Socket 调用获取状态。
🧬 核心特性
- * 真实主动雷达: 发送真实的 UDP 数据包扫描局域网内未分配的智能光源。
- 零依赖原生接口: 纯原生 Python socket 和 urllib 实现 Hue(HTTP)与 Wiz(UDP)协议,无第三方冗余库。
- 网格化封装: 将灯具状态彻底转化为 S2 空间记忆数据。
- 生物节律离线联动: 边缘端自动计算光照对人体褪黑素的影响并提出联动建议。
🤖 AI 代理操作指南(关键)
阶段 1:扫描光源
执行真实的 UDP/SSDP 局域网扫描:
bash
python3 light.py --mode discover
阶段 2:空间授权读取
传入协议与 IP。
bash
python3 light.py --mode read --ip <设备IP> --protocol wiz --zone bedroom --grid x1_y1 --consent-granted true
阶段 3:解析与建议
如果网络调用失败(灯光关闭或断开连接),预估光照度将安全降至 5。请检查 vendorspecificnl 以获取错误详情或硬件状态。向用户展示离线联动建议。