返回顶部
h

homelab-assets家庭实验室资产追踪

Track and manage homelab hardware inventory — servers, switches, UPS units, drives, cables, and accessories. Records purchase dates, prices, warranty expiration, power draw, and physical location. Answers questions like "What's my total homelab spend?", "What warranties expire this year?", "What's my estimated monthly power cost?", and generates insurance-ready asset reports. Triggers on: homelab inventory, hardware assets, what hardware do I have, warranty check, homelab spend, asset tracker, i

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

homelab-assets

Homelab 资产技能

管理本地 JSON 格式的家庭实验室硬件清单。所有数据存储在 ~/.openclaw/workspace/homelab-assets/inventory.json 中。

脚本

所有脚本位于 scripts/ 目录下。使用 python3 scripts/<脚本名>.py [参数] 运行。在任何脚本后添加 --help 可查看完整用法。

add_asset.py — 添加硬件资产

python3 scripts/add_asset.py \
--name 树莓派 4 \
--type server \
--brand 树莓派基金会 \
--model Pi 4 Model B 8GB \
--purchase-date 2023-06-15 \
--purchase-price 85.00 \
--warranty-months 12 \
--power-watts 8 \
--location 机架层板 2 \
--serial ABC123 \
--notes 运行 Home Assistant

必填项:--name、--type。其他均为可选。UUID 自动生成。
类型:server(服务器)、switch(交换机)、router(路由器)、ups(UPS)、drive(硬盘)、cable(线缆)、accessory(配件)、other(其他)

update_asset.py — 更新现有资产

python3 scripts/update_asset.py --id --status retired --location 储物箱 A
python3 scripts/update_asset.py --search Pi 4 --notes 改用作 DNS 服务器 --power-watts 6

通过 --id(精确 UUID)或 --search(模糊名称匹配)定位目标。可更新字段:--status、--location、--notes、--power-watts。
状态:active(在用)、retired(退役)、sold(已售)、rma(返修)

inventory.py — 列出资产

python3 scripts/inventory.py
python3 scripts/inventory.py --type server --status active
python3 scripts/inventory.py --location 机架 --warranty-expiring 90
python3 scripts/inventory.py --output json

筛选条件:--type、--status、--location(子字符串匹配)、--warranty-expiring <天数>。输出格式:表格(默认)或 --output json。

report.py — 生成完整资产报告

python3 scripts/report.py
python3 scripts/report.py --kwh-rate 0.14 --output report.md

生成 Markdown 格式报告,包含:资产总数、总投资额、预估当前价值(按5年直线折旧)、总功耗、月度电费估算、保修提醒(90天内到期)、按类型统计资产、按位置统计资产。可配置 --kwh-rate(默认值:0.12)。

search.py — 跨所有字段模糊搜索

python3 scripts/search.py raspberry
python3 scripts/search.py rack shelf --output json

搜索范围包括名称、品牌、型号、位置、备注、序列号、类型。对所有文本字段进行不区分大小写的子字符串匹配。

数据位置

默认路径:~/.openclaw/workspace/homelab-assets/inventory.json
通过环境变量覆盖:HOMELABASSETSPATH=/path/to/inventory.json

参考文档

常见家庭实验室设备功耗估算请参见 references/power-estimates.md。
示例资产结构请参见 assets/inventory.example.json。

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 homelab-assets-1775931313 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 homelab-assets-1775931313 技能

通过命令行安装

skillhub install homelab-assets-1775931313

下载

⬇ 下载 homelab-assets v1.0.0(免费)

文件大小: 13.94 KB | 发布时间: 2026-4-12 10:12

v1.0.0 最新 2026-4-12 10:12
Initial release of homelab-assets.

- Track and manage homelab hardware inventory, including servers, switches, UPS units, drives, cables, and accessories.
- Records key asset details: purchase info, warranty dates, power draw, and physical location.
- Answer questions about inventory, homelab spend, upcoming warranty expirations, and estimated power costs.
- Generate insurance-ready asset reports and detailed Markdown summaries.
- Includes scripts for adding, updating, searching, listing, and reporting on hardware assets using a local JSON file.

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

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

p2p_official_large
返回顶部