Skip to content

feat: add NMAxe miner family driver support#15

Open
aetherwraith wants to merge 2 commits into
imlenti:mainfrom
aetherwraith:nmaxe
Open

feat: add NMAxe miner family driver support#15
aetherwraith wants to merge 2 commits into
imlenti:mainfrom
aetherwraith:nmaxe

Conversation

@aetherwraith

Copy link
Copy Markdown

Summary

This PR adds official driver support for the NMAxe family of home miners running the ESP-Miner-NMAxe (AxeOS) firmware (NMAxe, NMAxeGamma, and NMQAxe++).

Key Features Implemented:

  1. Telemetry parsing: Reads /api/system/info which maps nested sub-objects (power, temps, asic, miner, identity, fans, stratum) to the standard MinerSample object.
  2. Frequency and Voltage Control: Support for hot-applying core voltage and frequency settings via /api/setting/mining (asicVcoreReq / asicFreqReq).
  3. Fan Controls: Sets speed percentage and toggles automatic/manual mode via /api/setting/preference for all active fan indexes (single fan on NMAxe/Gamma; dual fans on NMQAxe++).
  4. Pool Configuration: Reads and saves primary/fallback stratum configs via /api/setting/mining (handling full stratum URLs with schemes).
  5. Reboot and Pause/Resume Support: Triggers a graceful reboot via /api/system/restart, and implements runtime pause/resume control via PATCH /api/mining/state (can_pause = True).
  6. Autodetect Discovery: Added NMAxe detection to /api/discovery (classified by the presence of nested identity blocks).
  7. Comprehensive Unit Tests: Added unit tests covering all NMAxe driver behaviors (parsing, controls, pause/resume, and pool config).

Checklist:

  • Compilation sanity checks passed (python -m py_compile ...)
  • No personal credentials or LAN data committed
  • README table and description updated
  • CHANGELOG entry added under [Unreleased]
  • Tested against the full project test suite (all 237 tests pass)

Raw /api/system/info Payload Sample:

{
  "power": {
    "power": 12.5,
    "vbus": 5000,
    "ibus": 2500
  },
  "temps": {
    "vcore": 45.2,
    "asic": 62.7
  },
  "asic": {
    "count": 1,
    "model": "BM1370",
    "vcoreReq": 1200,
    "vcoreReal": 1198,
    "freqReq": 490,
    "smallCoreCnt": 672
  },
  "miner": {
    "state": "running",
    "paused": false,
    "pauseReason": "",
    "hashRate": 720.5,
    "bestDiffEver": "1.23M",
    "bestDiffSession": "456.7K",
    "networkDiff": "88.55T",
    "poolDiff": "65536",
    "lastDiff": "131072",
    "blkhits": 0,
    "freeHeap": 187320,
    "minFreeHeap": 163840,
    "sAccepted": 1024,
    "sRejected": 3,
    "uptimeSeconds": 86400,
    "uptimeEver": 2592000
  },
  "identity": {
    "fwVersion": "v2.9.31",
    "hwModel": "NMAxe",
    "displayName": "NMAxe",
    "hostName": "nmaxe-001",
    "ssid": "MyHomeWifi",
    "rssi": -55,
    "appSha256": "ef970b389312276b"
  },
  "fans": [
    { "id": 0, "speed": 60, "rpm": 2800 }
  ],
  "stratum": {
    "url": "stratum+tcp://pool.example.com:3333",
    "user": "bc1q...xyz.worker1",
    "pwd": "x"
  }
}

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.

1 participant