Monitor your cryptocurrency mining on Ethermine, Flexpool and 2miners!

For the time being EthermineInfo only supports ETH. What would you like to see added?

If you’d like to fork the project and adapt it to your needs I’d be happy to share my experiences with you.

I have a few coins I mine, I wanted to create a global earning vs money spent analysis. I bought an Emporia V2 electric panel monitor which I want to add to this as well.

So far I got:
CKB
KDA
STC
ETH
HNT (I got this one already into hassio)

If they’re mined via a pool and that pool has an API, you should be able to reverse engineer this with only a little knowledge of python.

that’s the issue, I have no clue where to start when it comes to integrating an api into hassio…never did that.

Presently I scrape info from their sites via selenium into an Excel file, I wanted to get all this data into hassio so I can access it on the go.

Are these coins mined via a pool like Ethermine or Flexpool? If not then the only thing I’ve seen people do is pull info from mining rigs into sensors in Home Assistant.

Yes pools: 2miners and poolflare

The poolflare site isn’t working for me (DNS resolution failure) but 2miners has an API with seemingly decent docs.

Assuming you’re a little familiar with Python:

First thing you’ll want to do is work out what parts of the API have the things you want (Stats has all the statistics, Payments carries all of the payment info).

Then it should just be a case of reverse engineering this component, seeing what you can keep and what you can change. There will be lots of trial and error here, but the approach will be the same for each pool/component you want to work with.

If you’re not familiar with Python yet I can personally recommend Codecademy to get familiar with the basics

1 Like

I can code, i just have a hard time understanding how to get the code into ha environment. Where to store the code, how to get the variables into sensors etc…

Have to admit it wasn’t very straightforward for me either. Here’s a breakdown of what goes where:

Files go in config/custom_components/EthermineInfo

sensor.py contains the main code, including fetching the data and assigning the data to various attribute you end up seeing in homeassistant.

manifest.json contains all the info about the project and it’s maintainers

const.py contains the config items we need to ask users to set in their configuration.yaml and also defines the attributes we want to assign to the sensor.

This article goes more in depth about the structure, but with that you should now know which files perform certain functions

1 Like

Nice this is very helpful! Thanks for sharing!

So managed to replicate my excel vba into appdeamon python…

Now I want to calculate the ROI (money earned - (money spent + power consumption))

2 Likes

This may be a silly question but is there a way to return data in more readable format? Might be just a task I haven’t needed to accomplish until now. For example, hashrate returns a pretty lengthy number that I’d prefer to translate to mH.

This component returns the values as the API reports them. If you want to change the values to your liking you can do so with a template sensor.

1 Like

Did some digging and figured it out. As suspected it was just something I hadn’t done before. Found this link from another user that did most of the work I needed already. Thank you for the prompt reply!

https://community.home-assistant.io/t/how-to-ethereum-mining-dashboard-hiveos-ethermine-pool-crypto-prices-and-db-historical-data-statistics/310991

1 Like

No worries, if you have any other issues or questions feel free to drop me another message. Happy mining!

1 Like

Hi @thomasprior ,
like other users i’ve the unknow issue on sensors.
I’ve followed all steps but i don’t know why this integration doesn’t work :frowning:

This is my conf:

Cattura1

my_wallet_address is with “”
I’ve tried both sequences with 40 and 42 characters.

This is all sensors:

Any help is apreciated.
Regards,

Alessandro

The only instance I’ve been made aware of in which null values have been returned for everything was when no mining activity had ever taken place on the address configured.

To clarify,
the api code is this:

I’m not familiar with the site in the screenshot, but I’m sure that’s not Ethermine.org.

Can you see your stats on ethermine.org?

Here is my problem.
My referral site is this: https://the.hiveos.farm/

I’m not registered on Ethermine.org :upside_down_face: