Skip to content

fix: map AxeOS VR temp to board, chip temp to chain#315

Open
adamdecaf wants to merge 1 commit into
256foundation:masterfrom
adamdecaf:fix/bitaxe-nerdaxe-asic-vr-temps
Open

fix: map AxeOS VR temp to board, chip temp to chain#315
adamdecaf wants to merge 1 commit into
256foundation:masterfrom
adamdecaf:fix/bitaxe-nerdaxe-asic-vr-temps

Conversation

@adamdecaf

@adamdecaf adamdecaf commented Jul 17, 2026

Copy link
Copy Markdown

AxeOS exposes distinct sensors on /api/system/info: temp (ASIC chip) and vrTemp (voltage regulator / board). Bitaxe and Nerdaxe backends copied vrTemp into inlet/outlet chip temperatures and often left chips[].temperature empty by reading temp from the config-only /api/system/asic payload.

Map vrTemp to board_temperature and temp to inlet/outlet plus chips[0].temperature, preferring live system/info over the ASIC config endpoint.

@adamdecaf
adamdecaf force-pushed the fix/bitaxe-nerdaxe-asic-vr-temps branch 2 times, most recently from c531ffe to 9432ec5 Compare July 17, 2026 19:53

@b-rowan b-rowan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, but I think this should be limited to fixes specifically on the relevant miner types, and not touch the core data structures (other than the small documentation changed mentioned if you feel it's required).

Comment thread asic-rs-core/src/data/board.rs Outdated
Comment thread asic-rs-core/src/data/board.rs Outdated
Comment thread asic-rs-core/src/data/board.rs Outdated
Comment thread asic-rs-core/src/traits/miner.rs Outdated
@adamdecaf
adamdecaf force-pushed the fix/bitaxe-nerdaxe-asic-vr-temps branch from 9432ec5 to 261e1c5 Compare July 17, 2026 20:25
@adamdecaf adamdecaf changed the title fix(bitaxe,nerdaxe): stop mapping VR temp as ASIC chip temp fix(bitaxe): stop mapping VR temp as ASIC chip temp Jul 17, 2026
@adamdecaf

Copy link
Copy Markdown
Author

That's my bad. Changing core types wasn't my intention - was going a bit too fast with Grok.

@adamdecaf
adamdecaf force-pushed the fix/bitaxe-nerdaxe-asic-vr-temps branch from 261e1c5 to 8679ba7 Compare July 17, 2026 20:42
@adamdecaf adamdecaf changed the title fix(bitaxe): stop mapping VR temp as ASIC chip temp fix: map AxeOS VR temp to board, prefer chip for average Jul 17, 2026
@b-rowan

b-rowan commented Jul 17, 2026

Copy link
Copy Markdown
Member

Still a couple core changes, just revert them fully. Making average be chip OR board is even more confusing...

AxeOS exposes distinct sensors on /api/system/info: `temp` (ASIC chip)
and `vrTemp` (voltage regulator / board). Bitaxe and Nerdaxe backends
copied `vrTemp` into inlet/outlet chip temperatures and often left
`chips[].temperature` empty by reading `temp` from the config-only
/api/system/asic payload.

Map `vrTemp` to board_temperature and `temp` to inlet/outlet plus
chips[0].temperature, preferring live system/info over the ASIC
config endpoint.
@adamdecaf
adamdecaf force-pushed the fix/bitaxe-nerdaxe-asic-vr-temps branch from 8679ba7 to 2904f28 Compare July 17, 2026 22:29
@adamdecaf adamdecaf changed the title fix: map AxeOS VR temp to board, prefer chip for average fix: map AxeOS VR temp to board, chip temp to chain Jul 17, 2026

@b-rowan b-rowan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more small thing I noticed, other than that this should be good.

Comment on lines +315 to +325
// Always emit a chip row when we have live telemetry; temperature comes
// from system/info `temp`, not the config-only ASIC endpoint.
board.chips = vec![ChipData {
position: 0,
temperature: chip_temp,
voltage: board.voltage,
frequency: board.frequency,
tuned: Some(true),
working: Some(true),
hashrate: board.hashrate.clone(),
}];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the reason the check for chip data was here is for guarding for DataField::Chips, since having that check will skip adding the chips if it is excluded by the user.

Suggested change
// Always emit a chip row when we have live telemetry; temperature comes
// from system/info `temp`, not the config-only ASIC endpoint.
board.chips = vec![ChipData {
position: 0,
temperature: chip_temp,
voltage: board.voltage,
frequency: board.frequency,
tuned: Some(true),
working: Some(true),
hashrate: board.hashrate.clone(),
}];
if let Some(chip_data) = chip_data {
board.chips = vec![ChipData {
position: 0,
temperature: chip_temp,
voltage: board.voltage,
frequency: board.frequency,
tuned: Some(true),
working: Some(true),
hashrate: board.hashrate.clone(),
}];
}

Comment on lines +621 to +655
assert_eq!(hashboards_without_chips[0].chips.len(), 1);
assert_eq!(hashboards_without_chips[0].working_chips, Some(1));
assert_eq!(
hashboards_without_chips[0].chips[0]
.temperature
.map(|t| t.as_celsius()),
Some(59.875)
);
assert_eq!(
hashboards_without_chips[0]
.board_temperature
.map(|t| t.as_celsius()),
Some(78.0)
);
assert_eq!(
hashboards_without_chips[0]
.inlet_chip_temperature
.map(|t| t.as_celsius()),
Some(59.875)
);
assert_eq!(
hashboards_without_chips[0]
.outlet_chip_temperature
.map(|t| t.as_celsius()),
Some(59.875)
);
// Guard against the old bug that copied VR into chip-chain fields.
assert_ne!(
hashboards_without_chips[0]
.board_temperature
.map(|t| t.as_celsius()),
hashboards_without_chips[0]
.inlet_chip_temperature
.map(|t| t.as_celsius())
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can revert these test changes with the fix above, these should have no chips since they should be explicitly excluded by the user.

Comment on lines +312 to +320
board.chips = vec![ChipData {
position: 0,
temperature: chip_temp,
voltage: board.voltage,
frequency: board.frequency,
tuned: Some(true),
working: Some(true),
hashrate: board.hashrate.clone(),
}];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Save thing here, can re-add the check.

Suggested change
board.chips = vec![ChipData {
position: 0,
temperature: chip_temp,
voltage: board.voltage,
frequency: board.frequency,
tuned: Some(true),
working: Some(true),
hashrate: board.hashrate.clone(),
}];
if let Some(chip_data) = chip_data {
board.chips = vec![ChipData {
position: 0,
temperature: chip_temp,
voltage: board.voltage,
frequency: board.frequency,
tuned: Some(true),
working: Some(true),
hashrate: board.hashrate.clone(),
}];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants