Cryptocurrencies and crypto mining has, once again, been all the rage for the last couple of years. Thus, it should come as no surprise that Thomas Prior has developed a custom integration for Home Assistant that pulls information from the Ethereum mining pool ethermine.org and exposes it as a sensor to our favourite home automation tool. Ever wanted to recreate Gilfoyle’s alert for when it isn’t profitable to mine crypto, while simultaneously driving your co-workers mad? Now you can.
While I do consider myself technically well-versed, I can’t claim to know much about cryptocurrencies. Mainly because I am firmly in the anti-crypto camp. While I favour the decentralized aspect, I do not appreciate the killing the planet part of crypto mining (before you even think about it, there is no way of convincing me otherwise using dodgy statistics).
Installing the EthermineInfo custom integration
As with most other custom integration, and I’m starting to sound a lot like a broken record at this point, the EthermineInfo Home Assistant integration is best installed using HACS (Home Assistant Community Store). If you haven’t added it to your Home Assistant yet, I highly suggest you do so by following the steps described on the website. Especially, if you are using any custom integration, unofficial Lovelace cards, or themes. HACS will take care of keeping everything up to date. Simply add the following repository to HACS and you are ready to go:
Configuring the EthermineInfo custom integration
Once installed, you can enter the following YAML to set up a new sensor using the EthermineInfo custom integration:
sensor: - platform: ethermineinfo miner_address: currency_name: name_override:
The miner address, which is the address of your ethermine.org miner, is a string of 42 characters (beginning with 0x) or 40 characters (with the 0x removed). The currency name dictates the currency you would like your unpaid balance to be converted to. This can be ETH (Etherium), USD (United States Dollar), BTC (Bitcoin), EUR (Euro), CNY (Chinese Yuan), or RUB (Russian Ruble). The final parameter, which is optional, can be set to override the miner’s address with any string, for easy identification.
What the EthermineInfo custom integration tracks
Ther EthermineInfo custom integration can track the following data using the etherinfo.org API: Unpaid balance, unconfirmed balance, reported hash rate, average hash rate, current hash rate, valid shares, invalid shares, stale shares, active workers, and balance in local currency. It also monitors the following data on payouts: Paid on, amount, transaction hash, value in local currency.
This data is, in my opinion, best displayed in the form of a graph. You could use the default History Graph Card, but if you have any sense of style, you will want to configure your Home Assistant dashboard using the Mini Graph Card or ApexCharts Card.