返回顶部
e

earl-display-control显示控制

>-

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
647
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

earl-display-control

Earl 显示控制

管理视觉空间画板——Earl 客厅电视仪表盘的技能。包括启动 HTTP 服务器、启动自助浏览器以及通过 Python API 更新 earl_mind.json。

以下所有文件路径使用 {baseDir} 表示此技能的根目录(包含 VisuoSpatialSketchpad/ 的仓库根目录)。

快速响应清单

  1. 1. 唤醒请求(Earl 醒醒、无法同步、Earl 正在睡觉)
- 启动本地服务器(参见服务器管理) - 启动自助浏览器(参见启动自助终端) - 确认健康状态:在服务器日志中查看 GET /earl_mind.json ... 200
  1. 2. 内容更新(心情、家务、热评、涂鸦、天气)
- 使用 {baseDir}/VisuoSpatialSketchpad/earl_api.py 中的 EarlMind API - 如果显示内容过时,更改后重新启动自助终端

服务器管理

从 VisuoSpatialSketchpad 目录启动 HTTP 服务器:

bash
cd {baseDir}/VisuoSpatialSketchpad && python3 -m http.server 8000

将进程置于后台运行,以便返回 Shell 提示符。

终止卡死的服务器

macOS / Linux:
bash
lsof -ti:8000 | xargs kill -9

Windows(PowerShell):
powershell
Get-Process -Id (Get-NetTCPConnection -LocalPort 8000).OwningProcess | Stop-Process -Force

启动自助终端

macOS:
bash
open -a Google Chrome --args --kiosk http://localhost:8000/sketchpad.html

如果 Chrome 不可用,也可使用 Safari:
bash
open -a Safari http://localhost:8000/sketchpad.html

Windows(PowerShell):
powershell
Start-Process msedge.exe --kiosk http://localhost:8000/sketchpad.html --edge-kiosk-type=fullscreen

Linux:
bash
xdg-open http://localhost:8000/sketchpad.html

或使用 Chromium 实现真正的自助终端:
bash
chromium-browser --kiosk http://localhost:8000/sketchpad.html

每次唤醒循环后务必重新启动——浏览器可能缓存了旧页面。

EarlMind API 参考

所有方法位于 {baseDir}/VisuoSpatialSketchpad/earl_api.py。从 VisuoSpatialSketchpad 目录运行:

python
from earl_api import EarlMind
mind = EarlMind()

每个修改方法会自动保存并更新 meta.lastupdated / meta.updatecount。

方法参考

方法用途关键参数
setmood(mood, energy, vibe, expression)设置 Earl 的心情和内心独白mood:字符串,energy:0-1 浮点数,vibe:字符串,expression:字符串
setphoto(url, caption)
设置 Earl 的标题照片 | url:字符串(URL 或本地路径),caption:字符串 | | posthousestuff(title, detail, priority, category, icon) | 添加家务提醒 | priority:high/medium/low,icon:表情符号字符串 | | resolvehousestuff(itemid) | 按 ID 移除已解决的项目 | itemid:字符串(例如 hs_a1b2c3) | | clearhousestuff() | 清除所有家务项目 | — | | updateroom(roomid, status, notes, attention) | 更新房间状态 | attention:0-1 浮点数 | | addroom(roomid, name, x, y, icon, status, notes, attention) | 添加新房间 | x、y:0-1 归一化位置 | | sweep() | 记录一次全面清扫 | — | | hot_take(topic, take, heat, emoji) | 添加或更新热评 | heat:0-1 浮点数,如果主题存在则更新 | | drop_take(topic) | 按主题移除热评 | — | | doodle(label, x, y, size, color, note) | 在画板上放置表情涂鸦 | x、y:0-1,size:像素,color:十六进制 | | sketch_note(text, x, y, size, color) | 在画板上放置文本笔记 | 与涂鸦相同 | | clear_sketchpad() | 清空画板 | — | | learn_pattern(pattern, confidence, observations) | 记录长期模式 | confidence:0-1,observations:整数 | | summary() | 获取人类可读的状态摘要 | 返回字符串 | | snapshot() | 获取原始思维字典 | 返回字典 |

常见示例

python

设置心情


mind.set_mood(happy, energy=0.9, vibe=阳光明媚,氛围绝佳。)

发布家务提醒

mind.posthousestuff(今晚要倒垃圾, detail=又是周三了。, priority=high, category=chores, icon=🗑️)

发布热评

mind.hot_take(菠萝披萨, 有争议但我尊重这种大胆。, heat=0.6, emoji=🍕)

在画板上涂鸦

mind.doodle(🌧️, x=0.3, y=0.2, size=30, note=开始下雨了)

记录模式

mind.learn_pattern(猫下午3点坐在窗边, confidence=0.7, observations=5)

天气更新

运行天气助手获取实时 Open-Meteo 数据,更新心情/能量,并放置天气涂鸦:

bash
cd {baseDir}/VisuoSpatialSketchpad && python3 updateweatherping.py

earl_mind.json 架构

仪表盘读取 {baseDir}/VisuoSpatialSketchpad/earl_mind.json。顶层结构:

{
identity: { name, role, mood, energy (0-1), currentvibe, avatarexpression, photo, photo_caption }
spatialawareness: { housename, location: { latitude, longitude, timezone, temperatureunit, windspeedunit }, lastsweep, rooms: [...] }
house_stuff: { items: [{ id, title, detail, priority, category, icon }] }
earl_unplugged: [{ id, topic, take, heat (0-1), emoji, date }]
sketchpad: { canvas: [{ id, type (doodle|note), label, x, y, size, color, note }] }
longtermpatterns: [{ pattern, confidence (0-1), observations }]
meta: { schemaversion, lastupdated (ISO 8601), update_count }
}

如果直接编辑 JSON,务必更新 meta.lastupdated 和 meta.updatecount,并使用 ensure_ascii=False, indent=2 写入。

故障排除

  • - 服务器持续崩溃——检查是否有重复的 Python 进程。macOS/Linux:lsof -i:8000。Windows:Get-Process python。
  • 浏览器无法全屏——先终止残留的浏览器进程。macOS:pkill -f Google Chrome。Windows:taskkill /IM msedge.exe /F。
  • 内容未更新——重新启动自助终端以清除缓存。验证 JSON 是否正确保存。
  • 天气无法工作——检查 earlmind.json 中 spatialawareness.location.latitude 和 longitude 是否已设置(不为 0.0)。
  • 导入错误——确保从 VisuoSpatialSketchpad 目录运行 Python,或将其添加到 sys.path。

紧密循环

重启服务器 -> 启动自助终端 -> 应用内容更改 -> 必要时重新启动自助终端。每次收到醒醒消息时遵循此流程。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 earl-display-control-1776420003 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 earl-display-control-1776420003 技能

通过命令行安装

skillhub install earl-display-control-1776420003

下载

⬇ 下载 earl-display-control v0.1.0(免费)

文件大小: 22.6 KB | 发布时间: 2026-4-17 19:46

v0.1.0 最新 2026-4-17 19:46
Initial release of Earl Display Control for managing the living-room TV dashboard.

- Provides tools to wake Earl's display, restart the local server, and launch the kiosk browser across macOS, Windows, and Linux.
- Adds comprehensive documentation on updating Earl's mind (mood, house stuff, hot takes, doodles, weather) via the included Python API.
- Includes server management tips, troubleshooting guidance, and quick command references.
- Details the structure of `earl_mind.json` and how to maintain it safely.
- Offers clear action checklists for common wake and update scenarios.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部