Skip to content

Built a NiceHash API in C# to control my main PC via console and Elgato Stream Deck

License

Notifications You must be signed in to change notification settings

jernejk/NiceHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NiceHash

With GPU prices rising and with no apparent end to be able to get a cost effective GPU for foreseeable future, using your existing GPU seems to be one of the few way how to patch the gap.

There a few goals for this project:

  • Control NiceHash miner
  • Get real-time power usage
  • Get basic stats about the wallet/miner
  • Allow controlling miner

One of the long term goals is to run the miner when the electric grid isn't at peak capacity to reduce the stress on electric grid.

This project is not a fork of official NiceHash GitHub repos and was written for .NET developers in mind.

Usage

Atm, you can use NiceHash.Cmd to control it as command line or NiceHash.Core if you're more interested in using it directly in C#. It will require .NET 6 SDK to compile the project. (you'll need Visual Studio 2022+, VS Code or Jetbrains Rider)

I'm also working on Elgato Stream Deck support so that I can control it faster.

Console application

Duplicate appsettings.json as appsettings.Local.json and replace variables with API values from NiceHash portal to avoid accidental commits.

Console application examples

Elgato Stream

Install:

  1. Have .NET 6 SDK
  2. Open src\NiceHash.ElgatoStreamDeck with Windows Terminal or PowerShell
  3. Run dotnet build
  4. Run .\RegisterPluginAndStartStreamDeck.ps1

Currently supported buttons:

  • Wallet + Rigs control
    • Show NiceHash wallet balance and rigs status
    • Tap - Update wallet balance
    • Long press - Start/Stop rig
  • Start rig - on tap start rig
  • Stop rig - on tap stop rig

image

Figure: Various buttons in Stream Deck.

image

Figure: Show wallet balance and rig status.

TIP: You can use Stream Deck Multi Action to stop rigs and start a game.

image

Figure: Different games which are Multi Actions.

image

Figure: Rigs are stopped before running the game.

Resources

About

Built a NiceHash API in C# to control my main PC via console and Elgato Stream Deck

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published