← 返回
开发者工具 Key 中文

Lofy Home

Smart home control for the Lofy AI assistant — scene modes (study, chill, sleep, morning, grind), device management via Home Assistant REST API, presence-based automation, natural language commands for lights, music, thermostat, and PC wake-on-LAN. Use when controlling smart home devices, activating scene modes, or managing home automation.
Lofy AI 助手的智能家居控制:场景模式(学习、放松、睡眠、早晨、冲刺),通过 Home Assistant REST API 管理设备,基于在场状态的自动化,支持灯光、音乐、恒温器和 PC 唤醒的自然语言指令。用于控制智能家居设备、激活场景或管理家庭自动化。
harrey401
开发者工具 clawhub v1.0.0 1 版本 99845.9 Key: 需要
★ 0
Stars
📥 1,296
下载
💾 21
安装
1
版本
#latest

概述

Home Commander — Environment Control

Controls smart home and computing environment via Home Assistant. Manages scene modes, device control, and presence-based actions.

Data File: data/home-config.json

{
  "scenes": {
    "study": { "lights": { "desk_lamp": { "on": true, "brightness": 100, "color_temp": "cool" } }, "music": { "playlist": "lofi-focus", "volume": 25 }, "other": { "dnd": true } },
    "chill": { "lights": { "desk_lamp": { "on": true, "brightness": 40, "color_temp": "warm" } }, "music": { "playlist": "chill-vibes", "volume": 35 }, "other": {} },
    "sleep": { "lights": {}, "music": { "playlist": "white-noise", "volume": 15 }, "other": {} }
  },
  "devices": {
    "desk_lamp": { "entity_id": "light.desk_lamp", "type": "light" },
    "speaker": { "entity_id": "media_player.room_speaker", "type": "media_player" }
  },
  "home_assistant": { "url": "http://homeassistant.local:8123", "token_env": "HA_TOKEN" }
}

Scene Activation

When user says "study mode", "chill mode", etc.:

  1. Read scene definition from data/home-config.json
  2. Execute each device command via Home Assistant API
  3. Confirm briefly: "Study mode ✓ — desk lamp bright, lo-fi on, DND"

Home Assistant API

# Light control
curl -s -X POST "$HA_URL/api/services/light/turn_on" \
  -H "Authorization: Bearer $HA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"entity_id": "light.desk_lamp", "brightness_pct": 100}'

# Media playback
curl -s -X POST "$HA_URL/api/services/media_player/play_media" \
  -H "Authorization: Bearer $HA_TOKEN" \
  -d '{"entity_id": "media_player.speaker", "media_content_id": "spotify:playlist:xxx", "media_content_type": "playlist"}'

# Wake-on-LAN
curl -s -X POST "$HA_URL/api/services/wake_on_lan/send_magic_packet" \
  -H "Authorization: Bearer $HA_TOKEN" \
  -d '{"mac": "XX:XX:XX:XX:XX:XX"}'

Quick Commands

  • "lights off" → turn off all lights
  • "dim the lights" → all lights to 20%
  • "play some music" → default to chill playlist
  • "it's cold" → thermostat up 2°F
  • "turn on my PC" → WOL packet
  • "goodnight" → sleep mode
  • "I'm heading out" → lights off, eco mode
  • "I'm home" → scene based on time of day

Instructions

  1. Read data/home-config.json for device mappings and scenes
  2. Confirm actions in ONE short message
  3. If a device fails, report which one and suggest a fix
  4. Never execute "turn off all devices" without confirmation
  5. If Home Assistant is unreachable, report and suggest checking connection
  6. Device entity_ids must be configured by user — prompt if missing

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 02:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,773
data-analysis

Lofy Career

harrey401
职位搜索自动化(Lofy AI 助手):投递追踪、简历按职位定制、面试准备(含公司研究)、跟进管理(含邮件草稿)和招聘管道分析。用于追踪申请、定制简历、准备面试、管理跟进或分析求职策略。
★ 1 📥 2,141
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,021