From dc41e2e3ae3a90494cf319e952fe777ce96ccd14 Mon Sep 17 00:00:00 2001 From: Brian Berg Date: Sun, 12 Jul 2020 22:50:22 +0000 Subject: [PATCH] docs(readme): update installation instructions - update summary - add preview image - list available sensors - improve installation instructions --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++-------- info.md | 57 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 118 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9dd768c..a512432 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,50 @@ [![Discord][discord-shield]][discord] [![Community Forum][forum-shield]][forum] -_Component to integrate with [NiceHash][nicehash]_ +A [Home Assistant][homeassistant] integration that creates a collection of [NiceHash][nicehash] account balance, rig, and individual device sensors. + +![Preview](https://user-images.githubusercontent.com/5121741/87257533-b4135f00-c469-11ea-82ca-e9614ead4e26.png) + +## Available Sensors + - Account Balances (BTC and USD/EUR) + - Total + - Pending + - Available + - Rigs + - Status + - Temperature + - Profitability + - Devices + - Status + - Algorithm + - Speed + - Temperature + - Load + - RPM + - Most Recent Mining Payout + +None of the sensors are added by default. See installation instructions for available configuration options. + ## Installation -1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`). -1. If you do not have a `custom_components` directory (folder) there, you need to create it. -1. In the `custom_components` directory (folder) create a new folder called `nicehash`. -1. Download _all_ the files from the `custom_components/nicehash/` directory (folder) in this repository. -1. Place the files you downloaded in the new directory (folder) you created. -1. Generate [NiceHash][nicehash] API key - - Supported API Permissions - - Wallet Permissions > View balances... - - Mining Permissions > View mining data... - - See this [repository](https://github.com/nicehash/rest-clients-demo) for assistance +### Prerequisites + +These instructions assume you have a [NiceHash][nicehash] account and an API key. + +Supported API permissions and associated sensors + - Wallet Permissions > View balances... + - Account balance sensors + - Mining Permissions > View mining data... + - Rig, device, and payout sensors + +See this [repository](https://github.com/nicehash/rest-clients-demo) for further assistance generating an API key. + +### HACS (recommended) + +1. Open HACS > Integrations +1. Add https://github.com/brianberg/ha-nicehash as a custom repository as Category: Integration +1. Click install under "NiceHash" in the Integrations tab 1. Add `nicehash` to `configuration.yaml` ``` nicehash: @@ -31,6 +61,28 @@ _Component to integrate with [NiceHash][nicehash]_ api_key: # api_secret: # currency: EUR # (default = USD) + balances: true # (default = false) - Enable balance sensors + rigs: true # (default = false) - Enable rig sensors + devices: true # (default = false) - Enable device sensors + payouts: true # (default = false) - Enable payout sensors + ``` +1. Restart Home Assistant + +### Manual + +1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`). +1. If you do not have a `custom_components` directory (folder) there, you need to create it. +1. In the `custom_components` directory (folder) create a new folder called `nicehash`. +1. Download _all_ the files from the `custom_components/nicehash/` directory (folder) in this repository. +1. Place the files you downloaded in the new directory (folder) you created. +1. Add `nicehash` to `configuration.yaml` + ``` + nicehash: + organization_id: # + api_key: # + api_secret: # + currency: EUR # (default = USD) + balances: true # (default = false) - Enable balance sensors rigs: true # (default = false) - Enable rig sensors devices: true # (default = false) - Enable device sensors payouts: true # (default = false) - Enable payout sensors @@ -43,6 +95,7 @@ _Component to integrate with [NiceHash][nicehash]_ If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md) +[homeassistant]: https://github.com/home-assistant/home-assistant [nicehash]: https://nicehash.com [buymecoffee]: https://www.buymeacoffee.com/brianberg [buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge diff --git a/info.md b/info.md index fe5ae79..fec586f 100644 --- a/info.md +++ b/info.md @@ -8,17 +8,39 @@ [![Discord][discord-shield]][discord] [![Community Forum][forum-shield]][forum] -_Component to integrate with [NiceHash][nicehash]_ +A [Home Assistant][homeassistant] integration that creates a collection of [NiceHash][nicehash] account balance, rig, and individual device sensors. +![Preview](https://user-images.githubusercontent.com/5121741/87257533-b4135f00-c469-11ea-82ca-e9614ead4e26.png) +## Sensors + - Account Balances (BTC and USD/EUR) + - Total + - Pending + - Available + - Rigs + - Status + - Temperature + - Profitability + - Devices + - Status + - Algorithm + - Speed + - Temperature + - Load + - RPM + - Most Recent Mining Payout + +None of the sensors are added by default. See installation instructions for available configuration options. {% if not installed %} ## Installation - +### HACS (recommended) +1. Open HACS > Integrations +1. Add https://github.com/brianberg/ha-nicehash as a custom repository as Category: Integration +1. Click install under "NiceHash" in the Integrations tab 1. Generate [NiceHash][nicehash] API key - Supported API Permissions - Wallet Permissions > View balances... @@ -31,10 +53,38 @@ _Component to integrate with [NiceHash][nicehash]_ api_key: # api_secret: # currency: EUR # (default = USD) + balances: true # (default = false) - Enable balance sensors rigs: true # (default = false) - Enable rig sensors devices: true # (default = false) - Enable device sensors payouts: true # (default = false) - Enable payout sensors ``` +1. Restart Home Assistant + +### Manual + +1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`). +1. If you do not have a `custom_components` directory (folder) there, you need to create it. +1. In the `custom_components` directory (folder) create a new folder called `nicehash`. +1. Download _all_ the files from the `custom_components/nicehash/` directory (folder) in this repository. +1. Place the files you downloaded in the new directory (folder) you created. +1. Generate [NiceHash][nicehash] API key + - Supported API Permissions + - Wallet Permissions > View balances... + - Mining Permissions > View mining data... + - See this [repository](https://github.com/nicehash/rest-clients-demo) for assistance +1. Add `nicehash` to `configuration.yaml` + ``` + nicehash: + organization_id: # + api_key: # + api_secret: # + currency: EUR # (default = USD) + balances: true # (default = false) - Enable balance sensors + rigs: true # (default = false) - Enable rig sensors + devices: true # (default = false) - Enable device sensors + payouts: true # (default = false) - Enable payout sensors + ``` +1. Restart Home Assistant {% endif %} @@ -42,6 +92,7 @@ _Component to integrate with [NiceHash][nicehash]_ +[homeassistant]: https://github.com/home-assistant/home-assistant [nicehash]: https://nicehash.com [buymecoffee]: https://www.buymeacoffee.com/brianberg [buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge