[Custom Integration] "Avalon Nano 3s" ASIC-Home-Miner

“Avalon Nano 3S” Integration for Home Assistant!


Home Assistant hacs_badge Release License Donate BTC Donate ⚡ stars

Avalon Nano 3S is a Home Assistant integration for the Canaan Avalon Nano 3S ASIC miner.

  • 230 sensors (approx. 60 active)
  • Workmode control (Low / Mid / High)
  • Control LED color, brightness and effects
  • Reboot button
  • Change pool configuration data (password required!)

Version: 1.0.0.0

Tested so far:

  • Avalon Nano 3S (Firmware 25061101_97e23a6)

Note:

This integration may also be compatible with other firmware versions — unfortunately I cannot test this without additional hardware, so feedback is welcome!

With the “Avalon Nano 3”, only sensors work using this integration — workmode control does NOT.


Overview

This integration allows full monitoring and control of the Avalon Nano 3S Miner directly from Home Assistant.

Features:

  • Live miner statistics (temperature, fan, hashrate, power consumption)
  • LED control (RGB colors, brightness, effects)
  • Mining workmode selection (Low, Mid, High)
  • Reboot button directly from Home Assistant
  • Enter/change pool data via the GUI Config Flow

Pool Configuration Notes

To change pool data from Home Assistant, the miner login password must be provided during installation or later in the integration options.

The password is ONLY required for pool configuration changes.

If you do not plan to modify pool data via Home Assistant, no password is required.

Warning: After changing any pool entry, the miner will automatically reboot!


more Infos:

Feel free to give positive or negative feedback!

Thanks!

Greetz Jinx

3 Likes

Amazing, works great with Avalon Nano 3.
Would it (or even is it) possible to add fan control and change target temp?

Thanks! Yes, it was a tough piece of work.

The fan can only be controlled via the app, which would technically be possible by extracting the auth web key from the browser.
That was actually my first approach for creating a Home Assistant integration. However, since that isn’t very user-friendly,
I solved it through the API instead. The downside is that the API does not provide control over the fan or Night Mode.
But if you take a look at how the fan RPM behaves when changing the work mode, you’ll notice that separate fan control isn’t really necessary.

You can create an automation with a helper in Home Assistant — for example, call it “Night Mode”. When activated, it sets the work mode to “Low” and turns the LED off. (Work Mode “Low” = 550 RPM fan speed.)

The target temperature cannot be changed; it’s a fixed hardcoded value.

If you want to regulate your room temperature, you’ll also need to create an automation: Temperature reached → set Work Mode to “Mid” → if the temperature keeps rising, switch to “Low”, and vice versa.

PS: I would leave the fan at 100% all the time — this significantly increases the miner’s lifespan!

This worked with my Avalon Q as well, I have been using some custom code I found when I googled, can we get the standby option added? I wonder if it would work with the 3s's as well? Thank you for doing this!

I don't take credit for this but this is what is in the code for the custom yaml I'm using?

Credit given where it is due it's from here GitHub - c7ph3r10/ha_avalonq: Home Assistant template definition to monitor and control a Canaan Avalon Q Home Miner. · GitHub

# wake up miner from standby and continue with latest workmode
avalonq_set_softon: >-
  /bin/bash -c "echo 'ascset|0,softon,1:$(( $(date +%s) + 5 ))' | nc -w 2 192.168.3.128 4028"

# send miner to standby
avalonq_set_softoff: >-
  /bin/bash -c "echo 'ascset|0,softoff,1:$(( $(date +%s) + 5 ))' | nc -w 2 192.168.3.128 4028"

If I can get an Avalon Q at a good price (under 1000 Euro), I'd like to add some features. But without hardware, it's difficult and takes a lot of time.