HACS integration to monitor and control your NerdQAxe+ Bitcoin Miner in Home Assistant.
If this integration is useful to you, you can support its development with a Bitcoin donation:
πͺ Bitcoin Address: bc1qhe4ge22x0anuyeg0fmts6rdmz3t735dnqwt3p7
Your contributions help me continue improving this project and adding new features. Thank you! π
This custom integration allows you to integrate your NerdQAxe+ miner into Home Assistant. It automatically creates sensors to monitor performance, temperature, power consumption, and more.
Integration type: Custom Component HACS (not a Docker addon)
The NerdQAxe+ firmware already exposes a complete REST API (no firmware modifications needed):
Available endpoints:
GET /api/system/info- Complete system informationGET /api/system/asic- ASIC informationGET /api/swarm/info- Swarm informationPATCH /api/system- Modify configurationPOST /api/system/restart- Restart the miner
Data returned by /api/system/info:
{
"hashRate": 1200.5,
"hashRate_1m": 1185.2,
"hashRate_1h": 1150.8,
"temp": 65.3,
"vrTemp": 58.7,
"power": 15.2,
"voltage": 12.1,
"current": 1.25,
"fanspeed": 75,
"fanrpm": 4500,
"sharesAccepted": 1234,
"sharesRejected": 5,
"isStratumConnected": true,
"deviceModel": "NerdQAxePlus",
"hostname": "nerdqaxe-123",
"version": "2.0.3"
}custom_components/nerdqaxe/
βββ __init__.py # Initialization and coordinator
βββ manifest.json # Integration metadata
βββ const.py # Constants
βββ config_flow.py # UI configuration
βββ sensor.py # Sensors (hashrate, temp, power, etc.)
βββ binary_sensor.py # Binary sensors (stratum connected)
βββ button.py # Restart button
βββ number.py # Number controls (frequency, voltage)
βββ update.py # Firmware update entity
The integration automatically creates the following sensors:
sensor.nerdqaxe_hashrate- Current hashrate (GH/s)sensor.nerdqaxe_hashrate_1m- 1-minute average hashrate (GH/s)sensor.nerdqaxe_hashrate_10m- 10-minute average hashrate (GH/s)sensor.nerdqaxe_hashrate_1h- 1-hour average hashrate (GH/s)sensor.nerdqaxe_hashrate_1d- 1-day average hashrate (GH/s)
sensor.nerdqaxe_temperature- Chip temperature (Β°C)sensor.nerdqaxe_vr_temperature- Voltage regulator temperature (Β°C)
sensor.nerdqaxe_power- Power consumption (W)sensor.nerdqaxe_voltage- Voltage (V)sensor.nerdqaxe_current- Current (A)sensor.nerdqaxe_core_voltage- Core voltage (mV)
sensor.nerdqaxe_fan_speed- Fan speed (%)sensor.nerdqaxe_fan_rpm- Fan RPM
sensor.nerdqaxe_shares_accepted- Accepted sharessensor.nerdqaxe_shares_rejected- Rejected sharessensor.nerdqaxe_best_difficulty- Best difficulty foundsensor.nerdqaxe_best_session_difficulty- Best session difficultysensor.nerdqaxe_found_blocks- Blocks found (current session)sensor.nerdqaxe_total_found_blocks- Total blocks foundbinary_sensor.nerdqaxe_stratum_connected- Pool connection status
sensor.nerdqaxe_device_model- Device modelsensor.nerdqaxe_hostname- Miner hostnamesensor.nerdqaxe_wifi_rssi- WiFi signal strength (dBm)sensor.nerdqaxe_frequency- ASIC frequency (MHz)sensor.nerdqaxe_version- Firmware version
button.nerdqaxe_restart- Button to restart the minernumber.nerdqaxe_asic_frequency- ASIC frequency control (400-575 MHz)number.nerdqaxe_core_voltage- Core voltage control (1000-1300 mV)update.nerdqaxe_firmware_update- Firmware update entity (automatically checks for new versions on GitHub)
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the 3 dots in the top right β "Custom repositories"
- Add URL:
https://github.com/foXaCe/homeassistant-nerdqaxe-addon - Category: "Integration"
- Click "Add"
- Search for "NerdQAxe+" and install
- Restart Home Assistant
- Download the
custom_components/nerdqaxefolder - Copy to
<config>/custom_components/nerdqaxe - Restart Home Assistant
- Go to Settings β Devices & Services
- Click + Add Integration
- Search for "NerdQAxe+"
- Enter your miner's IP address (e.g.,
192.168.1.100) - The integration will connect and automatically create all sensors
After installation, you can configure:
- Scan interval: Update interval in seconds (5-300, default: 30)
To modify options:
- Go to Settings β Devices & Services
- Find "NerdQAxe+ Miner"
- Click Options
type: entities
title: NerdQAxe+ Miner
entities:
- entity: sensor.nerdqaxe_hashrate
name: Hashrate
- entity: sensor.nerdqaxe_hashrate_1h
name: Hashrate 1h
- entity: sensor.nerdqaxe_temperature
name: Temperature
- entity: sensor.nerdqaxe_power
name: Power
- entity: sensor.nerdqaxe_shares_accepted
name: Accepted Shares
- entity: binary_sensor.nerdqaxe_stratum_connected
name: Pool Connectedtype: vertical-stack
cards:
- type: entities
title: NerdQAxe+ Miner
entities:
- entity: sensor.nerdqaxe_hashrate_1h
name: Hashrate 1h
- entity: sensor.nerdqaxe_temperature
- entity: sensor.nerdqaxe_power
- entity: binary_sensor.nerdqaxe_stratum_connected
- type: history-graph
title: Hashrate
hours_to_show: 24
entities:
- entity: sensor.nerdqaxe_hashrate_1h
- type: history-graph
title: Temperature
hours_to_show: 24
entities:
- entity: sensor.nerdqaxe_temperatureautomation:
- alias: "High Miner Temperature Alert"
trigger:
- platform: numeric_state
entity_id: sensor.nerdqaxe_temperature
above: 80
action:
- service: notify.mobile_app
data:
message: "β οΈ High miner temperature: {{ states('sensor.nerdqaxe_temperature') }}Β°C"
title: "NerdQAxe+ Alert"automation:
- alias: "Pool Disconnected Alert"
trigger:
- platform: state
entity_id: binary_sensor.nerdqaxe_stratum_connected
to: "off"
for: "00:05:00"
action:
- service: notify.mobile_app
data:
message: "β οΈ NerdQAxe+ miner disconnected from pool for 5 minutes"automation:
- alias: "Low Hashrate Alert"
trigger:
- platform: numeric_state
entity_id: sensor.nerdqaxe_hashrate_1h
below: 1000
for: "00:10:00"
action:
- service: notify.mobile_app
data:
message: "β οΈ Low hashrate: {{ states('sensor.nerdqaxe_hashrate_1h') }} GH/s"The restart button is available in the interface:
type: button
entity: button.nerdqaxe_restart
name: Restart Miner
icon: mdi:restartOr in an automation:
automation:
- alias: "Auto Restart if Pool Disconnected"
trigger:
- platform: state
entity_id: binary_sensor.nerdqaxe_stratum_connected
to: "off"
for: "00:15:00"
action:
- service: button.press
target:
entity_id: button.nerdqaxe_restart
- service: notify.mobile_app
data:
message: "π Restarting miner due to prolonged pool disconnection"Control your miner's performance by adjusting frequency and core voltage:
In Lovelace:
type: entities
title: Miner Performance Control
entities:
- entity: number.nerdqaxe_asic_frequency
name: ASIC Frequency
- entity: number.nerdqaxe_core_voltage
name: Core Voltage
- entity: sensor.nerdqaxe_power
name: Current Power
- entity: sensor.nerdqaxe_temperature
name: TemperatureVia Automation:
automation:
- alias: "Reduce Power on High Temperature"
trigger:
- platform: numeric_state
entity_id: sensor.nerdqaxe_temperature
above: 75
action:
- service: number.set_value
target:
entity_id: number.nerdqaxe_asic_frequency
data:
value: 450
- service: notify.mobile_app
data:
message: "β οΈ Temperature high, reducing frequency to 450 MHz"The update.nerdqaxe_firmware_update entity automatically checks for new versions on GitHub:
Display in Lovelace:
type: update
entity: update.nerdqaxe_firmware_update
show_title: true
show_current_version: true
show_latest_version: trueInstalling an Update:
The update entity automatically appears in the Home Assistant dashboard when a new version is available. Simply click "Install" to download and flash the new version directly from GitHub.
Important note: The miner will automatically restart after the update installation.
Main file that:
- Initializes the integration
- Creates the
DataUpdateCoordinatorto manage updates - Configures platforms (sensor, binary_sensor, button, update)
NerdQAxeDataUpdateCoordinator Class:
- Connects to
http://<host>/api/system/infoevery X seconds - Parses JSON data
- Distributes data to sensors via the Coordinator pattern
Handles UI configuration:
- Validates miner connection
- Configures scan interval
- Automatic detection of hostname and model
Defines all sensors:
- Uses
CoordinatorEntityfor automatic updates - Appropriate device classes for Energy Dashboard
- State classes for long-term statistics
Binary sensor for Stratum pool connection status.
Defines the restart button:
- Calls the miner's
POST /api/system/restartAPI - Restarts the miner instantly
Number entities for performance control:
- ASIC frequency control (400-575 MHz)
- Core voltage control (1000-1300 mV)
- Calls the miner's
POST /api/system/asicAPI - Automatically refreshes coordinator after changes
Firmware update entity:
- Automatically checks GitHub releases
- Compares installed version with latest available version
- Filters pre-releases and RC versions
- Downloads and installs firmware directly from GitHub
- Uses the
POST /api/system/OTA/githubendpoint with firmware URL - Displays release notes in Home Assistant
- Checks for updates every 6 hours
- In
const.py, add the constant:
ATTR_NEW_FIELD = "newField"- In
sensor.py, add to theentitieslist:
NerdQAxeSensor(
coordinator,
"new_sensor",
"Sensor Name",
ATTR_NEW_FIELD,
icon="mdi:icon-name",
unit="unit",
device_class=SensorDeviceClass.XXX,
state_class=SensorStateClass.MEASUREMENT,
),- Copy
custom_components/nerdqaxeto your HA config - Restart HA
- Add the integration via UI
- Check logs: Settings β System β Logs
Enable debug logs in configuration.yaml:
logger:
default: info
logs:
custom_components.nerdqaxe: debug- Miner restart button
- Update entity with automatic GitHub version checking
- Firmware version sensor
- HA Energy Dashboard integration (power, voltage, current sensors)
- Uptime sensors (via 1d hashrate)
- Periodic update checks (every 6 hours)
- Number entities to dynamically modify frequency/voltage
- WebSocket support for real-time hashrate updates
- Multi-miner support (multiple devices in one integration)
- Network auto-discovery of miners (mDNS)
- Pre-configured Lovelace dashboard with all cards
- Pool difficulty sensor
- Configurable alerts via UI
- Update available notifications
- Miner configuration backup/restore
- Add Home Assistant services to control the miner
- Support multiple miners with a single entry
- Integrated performance graphs
- Configurable push notifications via UI
- Support for NerdAxeGamma boards and other variants
Contributions are welcome! Feel free to:
- Open an issue for a bug or feature request
- Submit a pull request
- Improve documentation
MIT
- NerdQAxe+ Firmware: https://github.com/shufps/ESP-Miner-NerdQAxePlus
- NerdQAxe+ Hardware: https://github.com/shufps/qaxe
- BitAxe devs: @skot (ESP-Miner), @ben, @jhonny
- NerdAxe dev: @BitMaker
- HA Integration Issues: GitHub Issues
- Firmware Issues: ESP-Miner-NerdQAxePlus Issues
- NerdMiner Discord: