返回顶部
l

lametric-cliLaMetric命令行工具

Control LaMetric TIME/SKY smart displays from the command line. Use when sending notifications, controlling device brightness/volume, managing timers, or displaying data on LaMetric devices. Triggers on "LaMetric", "smart display", "notification to device", "set timer", "send alert to clock".

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

lametric-cli

LaMetric CLI

用于控制LaMetric TIME/SKY设备的CLI工具。发送通知、控制设置、管理计时器和流式传输内容。

前提条件

安装

bash

Homebrew (macOS/Linux)


brew install dedene/tap/lametric

或通过Go安装

go install github.com/dedene/lametric-cli/cmd/lametric@latest

设置

  1. 1. 从LaMetric移动应用获取API密钥:设备设置 > API密钥
  2. 运行设置向导:

bash
lametric setup

或手动配置:

bash

安全存储API密钥


lametric auth set-key --device=living-room

或使用环境变量

export LAMETRICAPIKEY=your-api-key export LAMETRIC_DEVICE=192.168.1.100

配置文件位置:~/.config/lametric-cli/config.yaml

核心工作流程

发送通知

简单通知:
bash
lametric notify Hello World

带图标和声音:
bash
lametric notify Build passed --icon=checkmark --sound=positive1

关键警报(唤醒设备,播放闹铃):
bash
lametric notify ALERT: Server down --priority=critical --sound=alarm1

进度指示器:
bash
lametric notify Upload progress --goal=75/100 --icon=upload

迷你折线图:
bash
lametric notify CPU Usage --chart=10,25,50,30,45,80,60

从标准输入(用于管道操作):
bash
echo Build complete | lametric notify
git log -1 --format=%s | lametric notify --icon=github

等待用户关闭:
bash
lametric notify Confirm deployment? --wait

设备控制

获取设备信息:
bash
lametric device

显示亮度:
bash
lametric display get
lametric display brightness 50 # 设置为50%
lametric display mode auto # 自动亮度

音频音量:
bash
lametric audio get
lametric audio volume 30 # 设置为30%

蓝牙:
bash
lametric bluetooth get
lametric bluetooth on
lametric bluetooth off

内置应用

计时器:
bash
lametric app timer set 5m # 设置5分钟计时器
lametric app timer set 1h30m # 设置1小时30分钟
lametric app timer start
lametric app timer pause
lametric app timer reset

秒表:
bash
lametric app stopwatch start
lametric app stopwatch pause
lametric app stopwatch reset

收音机:
bash
lametric app radio play
lametric app radio stop
lametric app radio next
lametric app radio prev

应用导航:
bash
lametric app list # 列出已安装应用
lametric app next # 切换到下一个应用
lametric app prev # 切换到上一个应用

流式传输

将图像或视频流式传输到显示屏:

bash
lametric stream start # 开始流式传输会话
lametric stream image logo.png # 发送静态图像
lametric stream gif animation.gif # 发送动画GIF
lametric stream stop # 结束流式传输

从ffmpeg管道传输:
bash
ffmpeg -i video.mp4 -vf scale=37:8 -f rawvideo -pix_fmt rgb24 - | lametric stream pipe

发现

在网络中查找LaMetric设备:

bash
lametric discover
lametric discover --timeout=10s

常见模式

构建/CI通知

bash

成功


lametric notify Build #123 passed --icon=checkmark --sound=positive1

失败

lametric notify Build #123 failed --icon=error --sound=negative1 --priority=warning

部署

lametric notify Deployed to prod --icon=rocket --sound=positive2

系统监控

bash

CPU警报


lametric notify High CPU: 95% --priority=warning --icon=warning

磁盘空间

lametric notify Disk: 85% full --goal=85/100 --icon=harddrive

番茄钟计时器

bash
lametric app timer set 25m && lametric app timer start

会议提醒

bash
lametric notify Meeting in 5 min --icon=calendar --sound=alarm3 --priority=warning

快速参考

常用图标

别名描述
checkmark成功/完成
error
错误/失败 | | warning | 警告/注意 | | info | 信息 | | rocket | 部署/启动 | | github | GitHub | | slack | Slack | | mail | 邮件 | | calendar | 日历/会议 | | download | 下载 | | upload | 上传 |

运行 lametric icons 查看完整列表。

常用声音

声音类别
positive1-5成功音效
negative1-5
错误音效 | | alarm1-13 | 闹铃音效 | | notification1-4 | 温和通知 |

运行 lametric sounds 查看完整列表。

全局标志

标志描述
-d, --device设备名称或IP
-j, --json
输出JSON格式 | | --plain | 输出TSV格式(用于脚本) | | -v, --verbose | 详细日志输出 |

故障排除

连接失败

  1. 1. 验证设备IP:lametric discover
  2. 检查设备是否在同一网络
  3. 确保API密钥正确:lametric auth get-key --device=NAME

认证错误

bash

重新设置API密钥


lametric auth set-key --device=living-room

或使用环境变量

export LAMETRICAPIKEY=your-api-key

设备未找到

bash

发现设备


lametric discover --timeout=10s

添加到配置

lametric setup

安装

bash
brew install dedene/tap/lametric

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 lametric-cli-1776420063 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 lametric-cli-1776420063 技能

通过命令行安装

skillhub install lametric-cli-1776420063

下载

⬇ 下载 lametric-cli v1.0.2(免费)

文件大小: 2.81 KB | 发布时间: 2026-4-17 18:24

v1.0.2 最新 2026-4-17 18:24
- Removed the requirement for the LAMETRIC_DEVICE environment variable in the skill metadata.
- Updated the metadata section to only require the lametric binary for operation.
- No workflow or usage changes to documentation content.

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

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

p2p_official_large
返回顶部