Bitaxe Skills
Overview
Use the bundled CLI to discover miners on the same subnet, normalize their mixed Bitaxe and Nerd payloads, and safely perform common read and write actions.
Prefer the script over handwritten curl when the task involves discovery, field extraction, comparisons, or repeated updates.
Primary Tool
Use scripts/bitaxe_skills.py as the default interface.
Quick examples:
CODEBLOCK0
Workflow
- 1. Discover first unless the user already supplied a confirmed IP or hostname.
- Save the normalized discovery result when the user needs the miner list to be reused later.
- For a question about one metric, run
show with --field instead of dumping the whole payload. - For a comparison across miners, run
discover --format json, then compare the normalized fields. - Before writing settings, read the current payload or at least state the target device and intended keys.
- Restart after writes when the user wants the new configuration applied immediately.
Field Semantics
Use the normalized fields from the script unless the user explicitly asks for raw JSON keys.
- - "本轮最佳难度" or "current round best" maps to
best_session_diff / raw bestSessionDiff. - "历史最佳难度" or "best ever" maps to
best_diff / raw bestDiff. - "当前算力" maps to
hash_rate_ghs / raw hashRate. - "1 分钟算力", "10 分钟算力", "1 小时算力" map to the corresponding normalized rolling fields.
- "池难度" maps to
pool_difficulty. - "温度" maps to
temp_c, while VR temperature maps to vr_temp_c.
If the user says only “最佳难度” and does not clarify whether they mean current round or lifetime best, return both values.
Discovery Rules
- - By default, discover on the local private
/24 networks detected from the current machine and also probe 192.168.4.1. - If the user gives a specific CIDR, use that instead of guessing.
- Treat success on
GET /api/system/info as the source of truth for device presence. - Record at least the normalized IP, type, hostname, model, ASIC model, firmware, pool target, hashrate, temperature, power, and difficulty fields.
Write Safety
- - Use
set for common settings such as hostname, fanspeed, autofanspeed, temptarget, frequency, coreVoltage, pool URL, pool port, pool user, and display settings. - The script has a safe allowlist for documented common keys and a small Nerd-specific observed allowlist.
- If the requested key is outside that set, inspect the current payload first and use
--allow-unknown only when the field is already visible on the device or the user provided firmware-specific evidence. - Tell the user when a write was sent and whether a restart was also sent.
References
Read references/api-map.md when you need the cross-model field map, query heuristics, or update safety notes.
Bitaxe 技能
概述
使用捆绑的 CLI 工具发现同一子网内的矿机,标准化其混合的 Bitaxe 和 Nerd 负载,并安全地执行常见的读写操作。
当任务涉及发现、字段提取、比较或重复更新时,优先使用脚本而非手写 curl。
主要工具
使用 scripts/bitaxe_skills.py 作为默认接口。
快速示例:
bash
发现本地局域网内的矿机并保存标准化清单
python3 scripts/bitaxe_skills.py discover --save /tmp/solo-miners.json
探测特定设备并返回一个指标
python3 scripts/bitaxe_skills.py show 192.168.28.89 --field bestSessionDiff
查询一台设备的原始 JSON
python3 scripts/bitaxe_skills.py show luckyminer001 --format raw
更新常用设置并立即重启
python3 scripts/bitaxe_skills.py set luckyminer001 fanspeed=95 --restart
重启设备
python3 scripts/bitaxe_skills.py restart 192.168.4.1
工作流程
- 1. 除非用户已提供确认的 IP 或主机名,否则先执行发现操作。
- 当用户需要稍后重复使用矿机列表时,保存标准化后的发现结果。
- 对于单个指标的查询,使用 --field 参数运行 show 命令,而非转储整个负载。
- 对于跨矿机的比较,运行 discover --format json,然后比较标准化后的字段。
- 在写入设置前,先读取当前负载,或至少说明目标设备和预期键值。
- 当用户希望新配置立即生效时,在写入后执行重启。
字段语义
除非用户明确要求原始 JSON 键,否则使用脚本中的标准化字段。
- - 本轮最佳难度 或 current round best 映射到 bestsessiondiff / 原始 bestSessionDiff。
- 历史最佳难度 或 best ever 映射到 bestdiff / 原始 bestDiff。
- 当前算力 映射到 hashrateghs / 原始 hashRate。
- 1 分钟算力、10 分钟算力、1 小时算力 映射到对应的标准化滚动字段。
- 池难度 映射到 pooldifficulty。
- 温度 映射到 tempc,而 VR 温度映射到 vrtemp_c。
如果用户仅说最佳难度且未明确是指本轮还是历史最佳,则同时返回两个值。
发现规则
- - 默认情况下,在当前机器检测到的本地私有 /24 网络上执行发现,并同时探测 192.168.4.1。
- 如果用户提供了特定的 CIDR,则使用该 CIDR 而非自动猜测。
- 将 GET /api/system/info 的成功响应作为设备存在的真实依据。
- 至少记录标准化后的 IP、类型、主机名、型号、ASIC 型号、固件、矿池目标、算力、温度、功耗和难度字段。
写入安全
- - 使用 set 命令处理常用设置,如 hostname、fanspeed、autofanspeed、temptarget、frequency、coreVoltage、矿池 URL、矿池端口、矿池用户和显示设置。
- 脚本包含一个安全的允许列表,涵盖文档记录的常用键以及一个较小的 Nerd 特定观察允许列表。
- 如果请求的键不在该列表之外,则先检查当前负载,仅当该字段已在设备上可见或用户提供了固件特定证据时,才使用 --allow-unknown。
- 告知用户写入操作是否已发送,以及是否同时发送了重启指令。
参考
当需要跨型号字段映射、查询启发式规则或更新安全说明时,请阅读 references/api-map.md。