GithubHelp home page GithubHelp logo

baby636 / ethermineinfo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomasprior/ethermineinfo

1.0 0.0 0.0 616 KB

Provides data from Ethermine.org on a specified miner.

License: GNU General Public License v3.0

Python 100.00%

ethermineinfo's Introduction

EthermineInfo

hacs_badge

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:

Functionality

  • Create sensor items for Ethermine items:
    • Current statistics

      ✔ Unpaid 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

Things you should know about EthermineInfo

  • The Ethermine API has been subject to change - there may be occaisions where a code change is required before the component will work again.
  • 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.

Pre-requisite knowledge

Before downloading and configuring EthermineInfo, please ensure you are familiar with the following items:

  • HomeAssistant's configuration file LINK
  • YAML syntax LINK
  • Installation of custom components via:
    • HACS LINK
    • Manual custom component installation
  • Adding template sensors to your configuration LINK

Installation

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:

  1. Open HACS from your HomeAssistant sidebar
  2. Press the "Explore & Add Repositories"
  3. Enter "EthermineInfo" into the search box
  4. Press "EthermineInfo"
  5. Press "Install this repository in HACS"
  6. Don't forget to complete the configuration before restart HomeAssistant!

Configuration

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 
    name_override: (optional) name to identify your wallet instead of your miner address.

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
sensor:
  - platform: ethermineinfo
    miner_address: "1234567890123456789012345678901234567890"
    currency_name: USD
    name_override: "wallet name"

Multiple addresses can be configured.

Templates

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'] }}

How does it look?

image

Some rather pretty graphs are possible with the mini-graph-card:

image

Discussion

Talk about EthermineInfo here

Post issues with EthermineInfo here

Issues should be posted with logs and relevant, redacted excerpts from your configuration.yaml file to ensure that help can be given most effectively.

Pull requests and constructive criticism are always welcome.

Credits

@heyajohnny's CryptoInfo from which this component was born.

W3Schools for being an invaluable learning resource.

ethermineinfo's People

Contributors

thomasprior avatar scribblrsam avatar

Stargazers

kristof kaehler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.