home-assistant-awtrix
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAWTRIX
AWTRIX
Workflow
工作流程
- Use the bundled script for deterministic filesystem operations and LaMetric icon imports.
awtrix_fs.py - Use absolute device paths (leading ) to avoid firmware path errors.
/ - Use references for endpoint behavior and MQTT/HA integration patterns.
- 使用内置的脚本执行确定性文件系统操作和LaMetric图标导入。
awtrix_fs.py - 使用绝对设备路径(以开头),避免固件路径错误。
/ - 参考端点行为以及MQTT/HA集成模式。
Quick start
快速开始
All script and reference files are relative to the location of this SKILL.md file.
bash
python3 scripts/awtrix_fs.py --host <ip> status
python3 scripts/awtrix_fs.py --host <ip> icons list
python3 scripts/awtrix_fs.py --host <ip> icons import-lametric <id>所有脚本和参考文件的路径均相对于本SKILL.md文件所在位置。
bash
python3 scripts/awtrix_fs.py --host <ip> status
python3 scripts/awtrix_fs.py --host <ip> icons list
python3 scripts/awtrix_fs.py --host <ip> icons import-lametric <id>Tasks
任务
Import a LaMetric icon by ID
通过ID导入LaMetric图标
- Run:
python3 scripts/awtrix_fs.py --host <ip> icons import-lametric <id> - Read: for endpoint details
references/AWTRIX_HTTP_FILESYSTEM.md
- 运行命令:
python3 scripts/awtrix_fs.py --host <ip> icons import-lametric <id> - 阅读获取端点详情
references/AWTRIX_HTTP_FILESYSTEM.md
List icons on the device
列出设备上的图标
- Run:
python3 ~/.codex/skills/home-assistant-awtrix/scripts/awtrix_fs.py --host <ip> icons list
- 运行命令:
python3 ~/.codex/skills/home-assistant-awtrix/scripts/awtrix_fs.py --host <ip> icons list
Upload / rename / delete files
上传 / 重命名 / 删除文件
- Upload local file:
... upload ./local.jpg /ICONS/9999.jpg - Rename:
... rename /ICONS/old.gif /ICONS/new.gif - Delete:
... delete /ICONS/bad.gif
- 上传本地文件:
... upload ./local.jpg /ICONS/9999.jpg - 重命名:
... rename /ICONS/old.gif /ICONS/new.gif - 删除:
... delete /ICONS/bad.gif
Delete ALL icons safely (avoid 404 loop bug)
安全删除所有图标(避免404循环漏洞)
When deleting many files returned by , avoid command substitution loops that collapse whitespace. Use a line-safe loop so each filename is deleted individually:
icons listbash
python3 scripts/awtrix_fs.py --host <ip> icons list \
| awk '{print $3}' \
| while IFS= read -r f; do
python3 scripts/awtrix_fs.py --host <ip> delete "/ICONS/$f"
done当删除返回的多个文件时,要避免会折叠空白字符的命令替换循环。使用行安全循环,逐个删除每个文件名:
icons listbash
python3 scripts/awtrix_fs.py --host <ip> icons list \
| awk '{print $3}' \
| while IFS= read -r f; do
python3 scripts/awtrix_fs.py --host <ip> delete "/ICONS/$f"
doneReferences
参考资料
- HTTP endpoints, filesystem API, and LaMetric import details:
references/AWTRIX_HTTP_FILESYSTEM.md - MQTT/HA control patterns (custom apps, notify, settings):
references/AWTRIX.md - Upstream MQTT API reference:
references/upstream-api.md
- HTTP端点、文件系统API和LaMetric导入详情:
references/AWTRIX_HTTP_FILESYSTEM.md - MQTT/HA控制模式(自定义应用、通知、设置):
references/AWTRIX.md - 上游MQTT API参考:
references/upstream-api.md