Bitcoin Forum
November 25, 2017, 02:42:12 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Rainmeter script for Ethermine pool  (Read 514 times)
CoM1ner
Jr. Member
*
Offline Offline

Activity: 49


View Profile
October 17, 2016, 11:11:44 PM
 #1

Hello Bitcointalk! I wrote a very simple Rainmeter skin to monitor my mining rigs last night from my desktop.

https://www.rainmeter.net/

It utilizes Rainmeter to display the hashrate results of each of my two rigs, the total hashrate and the unpaid balance at Ethermine on my desktop (Windows).

This was made mostly for fun and probably not the most efficient coding but works well for learning and writing in one day. Simply replace the bold values with your thresholds and the value will be green or red according to the reported hashrate. I had problems where 2 of my cards would drop to 7mh/s from 29mh/s and I would have to constantly reset them.


I also wrote a script using Tasker on Android today to poll the Ethermine API every 10 minutes and ensure that the hashrates are above certain levels. A notification is sent to my phone and to my Pebble smartwatch if they fall below my defined threshold where I would use Teamviewer remotely to fix any issues.

I am not a coder by any means but I love making my life easier through the little that I learn when I think of an idea and wanted to help some others! I also have a portfolio widget through Rainmeter that updates your portfolio value and the current prices of coins. The 24 hour price change reflects the color of the text if anyone is interested.

Ignore the coins on there now lol. That isn't my portfolio and was used for testing purposes with the first four coins I could think of off the top of my head.



Quote
[Rainmeter]
Update=1000
AccurateText=2
SkinHeight=400
SkinWidth=400

;========================================

[MeasureSite1]
Measure=Plugin
Plugin=WebParser
URL=http://ethermine.org/api/miner_new/INSERT_MINING_ADDRESS
RegExp=(?siU)worker":"Miner1","hashrate":"(.*) MH/s","validShares"Sad.*),"staleShares"Sad.*),"invalidShares"Sad.*),"workerLastSubmitTime"Sad.*),"invalidShareRatio"Sad.*),"reportedHashRate":"(.*) MH/s"

[MeasureSite2]
Measure=Plugin
Plugin=WebParser
URL=http://ethermine.org/api/miner_new/INSERT_MINING_ADDRESS
RegExp=(?siU)worker":"Miner2","hashrate":"(.*) MH/s","validShares"Sad.*),"staleShares"Sad.*),"invalidShares"Sad.*),"workerLastSubmitTime"Sad.*),"invalidShareRatio"Sad.*),"reportedHashRate":"(.*) MH/s"

[MeasureSite3]
Measure=Plugin
Plugin=WebParser
URL=http://ethermine.org/api/miner_new/INSERT_MINING_ADDRESS
RegExp=(?siU)"unpaid"Sad.*)}

;========================================

[MeasureMiner1]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite1]
StringIndex=7

[MeasureMiner2]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite2]
StringIndex=7

[Measure3]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite3]
StringIndex=1

;========================================

[Measure1]
Measure=Calc
Formula=[MeasureMiner1]
IfAboveValue=CHANGES_COLOR_IF_MINER1_ABOVE_CERTAIN_HASHRATE
IfAboveAction=[!SetOption MeterMiner1 FontColor 0,255,0][!Redraw]
IfBelowValue=CHANGES_COLOR_IF_MINER1_BELOW_CERTAIN_HASHRATE
IfBelowAction=[!SetOption MeterMiner1 FontColor 255,0,0][!Redraw]
DynamicVariables=1

[MeterMiner1Label]
Meter=String
X=5
Y=3R
W=280
H=15
FontSize=20
FontColor=32,178,168
Padding=5,5,5,5
AntiAlias=1
StringStyle=BOLD
Text=Miner 1:

[MeterMiner1]
Meter=String
MeasureName=MeasureMiner1
X=200
Y=0r
W=280
H=15
FontSize=20
Padding=5,5,5,5
StringAlign=Right
AntiAlias=1

;========================================

[Measure2]
Measure=Calc
Formula=[MeasureMiner2]
IfAboveValue=CHANGES_COLOR_IF_MINER2_ABOVE_CERTAIN_HASHRATE
IfAboveAction=[!SetOption MeterMiner2 FontColor 0,255,0][!Redraw]
IfBelowValue=CHANGES_COLOR_IF_MINER2_BELOW_CERTAIN_HASHRATE
IfBelowAction=[!SetOption MeterMiner2 FontColor 255,0,0][!Redraw]
DynamicVariables=1

[MeterMiner2Label]
Meter=String
X=5
Y=3R
W=280
H=15
FontSize=20
FontColor=32,178,168
Padding=5,5,5,5
AntiAlias=1
StringStyle=BOLD
Text=Miner 2:

[MeterMiner2]
Meter=String
MeasureName=MeasureMiner2
X=200
Y=0r
W=280
H=15
FontSize=20
Padding=5,5,5,5
StringAlign=Right
AntiAlias=1

;========================================

[MeasureA]
Measure=Calc
Formula=[MeasureMiner1]+[MeasureMiner2]
Dynamicvariables=1

[MeterMinerALabel]
Meter=String
X=5
Y=3R
W=280
H=15
FontSize=20
Padding=5,5,5,5
AntiAlias=1
FontColor=255,255,255,200
StringStyle=BOLD
Text=Total:

[MeterMinerA]
Meter=String
MeasureName=MeasureA
X=200
Y=0r
W=280
H=15
FontSize=20
Padding=5,5,5,5
FontColor=0,255,0
NumOfDecimals=2
StringAlign=Right
AntiAlias=1


;========================================

[Measure33]
Measure=Calc
Formula=[Measure3]/1000000000000000000
Dynamicvariables=1

[MeterMiner3Label]
Meter=String
X=5
Y=3R
W=280
H=15
FontSize=20
FontColor=255,255,255,200
Padding=5,5,5,5
AntiAlias=1
StringStyle=BOLD
Text=Unpaid:

[MeterMiner3]
Meter=String
MeasureName=Measure33
X=200
Y=0r
W=280
H=15
FontSize=20
Padding=5,5,5,5
FontColor=0,255,0
NumOfDecimals=3
StringAlign=Right
AntiAlias=1
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!