gitwtfhub

wtf is ha-tna-os-canaan?

c0r391/ha-tna-os-canaan — explained in plain English

Analysis updated 2026-05-18

3PythonAudience · generalComplexity · 3/5Setup · moderate

TL;DR

An independent Home Assistant integration that connects to Canaan Bitcoin miners (Avalon Nano 3s, Avalon Q) to show live mining sensors and let you control fan, voltage, and power settings.

Mindmap

mindmap
  root((tna-os-canaan))
    What it does
      Miner sensors
      Fan and voltage control
      Reboot and reset buttons
    Tech stack
      Python
      Home Assistant
      HACS
    Use cases
      Monitor mining hardware
      Remote miner control
      Home automations
    Audience
      Home Assistant users
      Bitcoin miner owners

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Monitor a Canaan Bitcoin miner's hashrate, temperature, power draw, and pool status from a Home Assistant dashboard.

REASON 2

Adjust a miner's ASIC frequency, core voltage, or fan speed, or reboot it, directly from Home Assistant.

REASON 3

Build automations that react to miner conditions, such as turning off the hashboard if temperatures get too high.

What's in the stack?

PythonHome AssistantHACS

How it stacks up

c0r391/ha-tna-os-canaan0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity3/52/55/5
Audiencegeneralgeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a compatible Canaan miner on the local network, the miner's API has no authentication so network isolation is strongly advised.

No license is stated in the README.

Wtf does this do

This is a custom integration for Home Assistant, the popular home automation platform, that lets it talk to Bitcoin mining hardware made by Canaan running firmware called TNA-OS-CANAAN, such as the Avalon Nano 3s and Avalon Q. It is an independent project not made or endorsed by the people behind that mining firmware. Once installed, it connects to a miner over the local network and pulls in a large set of live readings as Home Assistant sensors: hashrate over several time windows, power draw, temperatures, fan speed, voltage and current, pool connection status, WiFi and Ethernet signal quality, and uptime. It also exposes controls, letting a user adjust the ASIC frequency, core voltage, and fan speed from Home Assistant, plus buttons to reboot the miner or reset its hashboard, and a switch to turn the hashboard on or off entirely. The README is upfront that this is alpha quality software, tested live against one specific miner model and one firmware version, though it also follows the newer public API documentation for a later firmware release. It is installed either through HACS, the Home Assistant Community Store, as a custom repository, or by manually copying a folder into the Home Assistant configuration directory. There is a clear security warning: the mining firmware's API has no authentication at all, so anyone who can reach the miner on the local network can read its data or change its settings. The README strongly advises against exposing the miner or this integration to the public internet without extra protection like a VPN, since some of the exposed controls, like turning off the hashboard or rebooting the device, are meant to be treated as sensitive administrative actions. Some advanced and safety sensitive settings, such as editing mining pools or thermal limits, are deliberately left out of this version.

Yoink these prompts

Prompt 1
Walk me through installing this Home Assistant integration via HACS for my Avalon Nano 3s miner.
Prompt 2
What security precautions should I take before exposing this miner integration on my home network?
Prompt 3
Explain what each sensor entity from this integration represents, like hash_efficiency versus efficiency.
Prompt 4
Help me write a Home Assistant automation that turns off the hashboard switch if the miner overheats.

Frequently asked questions

wtf is ha-tna-os-canaan?

An independent Home Assistant integration that connects to Canaan Bitcoin miners (Avalon Nano 3s, Avalon Q) to show live mining sensors and let you control fan, voltage, and power settings.

What language is ha-tna-os-canaan written in?

Mainly Python. The stack also includes Python, Home Assistant, HACS.

What license does ha-tna-os-canaan use?

No license is stated in the README.

How hard is ha-tna-os-canaan to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ha-tna-os-canaan for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.