A custom component for HomeAssistant
Provides data from Ethermine.org on a specified miner.
If this has been of use, please consider funding my caffeine habit:
- Learn some more Python 🐍
- Make my first tangible code contribution to the HomeAssistant community
- Create sensor items for Ethermine items:
-
Current statistics
✔ Unpaid balance
❌ Unconfirmed balance
✔ Reported hash rate
❌ Average hash rate
✔ Current hash rate
✔ Valid shares
✔ Invalid shares
✔ Stale shares
✔ Active workers
❌ Balance in local currency
-
Payouts
✔ Paid on
✔ Amount
✔ Transaction hash
❌ Value in local currency
-
- I'm new at this, things might not work right away, or at all. Please be kind!
- There are limits on how many requests can be made to Ethermine's API and therefore the data retrieved by EthermineInfo will be updated periodically and may be out of date by the time you look at it.
- Please do not use EthermineInfo in isolation to make decisions about your cryptocurrency holdings.
- EthermineInfo only reads the statistics of the provided miner.
Copy the files in the /custom_components/ethermineinfo/ folder to: [homeassistant]/config/custom_components/ethermineinfo/
HACS users, you know what to do! In case you don't:
- Open HACS from your HomeAssistant sidebar
- Press the "Explore & Add Repositories"
- Enter "EthermineInfo" into the search box
- Press "EthermineInfo"
- Press "Install this repository in HACS"
- Don't forget to complete the configuration before restart HomeAssistant!
To use EthermineInfo, please add the following items to your HomeAssistant configuration.yaml
sensor:
- platform: ethermineinfo
miner_address: (required) the address of your Ethermine miner
currency_name: (required) the currency you would like your unpaid balance to be converted to
Please note that the Ethermine API accepts the address in two formats:
- 42 characters beginning with 0x
- 40 characters with the 0x removed
Both can be configured, but the 42 character options must be encapsulated in quote marks. Failure to do so will just return "unknown" in HomeAssistant.
Examples:
sensor:
- platform: ethermineinfo
miner_address: "0x1234567890123456789012345678901234567890"
currency_name: USD
sensor:
- platform: ethermineinfo
miner_address: "1234567890123456789012345678901234567890"
currency_name: USD
Multiple addresses can be configured.
You can create a template sensor for any of the attributes returned by EthermineInfo. For example:
Stale shares:
{{ states.sensor.ethermineinfo_miner_address.attributes['stale_shares'] }}
Current hashrate:
{{ states.sensor.ethermineinfo_miner_address.attributes['current_hashrate'] }}
Unpaid amount:
{{ states.sensor.ethermineinfo_miner_address.attributes['unpaid'] }}
Pull requests and constructive criticism are always welcome.
@heyajohnny's CryptoInfo from which this component was born.
W3Schools for being an invaluable learning resource.