Bitcoin Forum
December 08, 2016, 04:29:59 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Help with BTCGuild Rainmeter script  (Read 1405 times)
tito13kfm
Jr. Member
*
Offline Offline

Activity: 42



View Profile
June 04, 2011, 06:27:14 AM
 #1

I switched out of Slush's pool for a number of reasons.  The API wasn't at a level I wanted it to be, I don't like the forced fee, etc etc...

So I made a Rainmeter addon for monitoring my mining.

Here's a picture.



The bar meters are my current Hash Rates as reported by BTCGuild so I can see if there is a problem with 1 of my cards at a glance.

There's only one problem.  I have it hard coded for 3 workers, as that is what I have at this exact moment.  If I want to add more, I need to physically add them.  If I take one away, the regexp just craps itself and returns invalid results.

Any rainmeter/regexp experts out there want to help?

Here's the source http://pastebin.com/ZtbXWvd6

Here's the regular expression:

Code:
RegExp="(?siU)confirmed_rewards":(.*),".*unconfirmed_rewards":(.*),".*estimated_rewards":(.*),".*payouts":(.*)},".*tito13kfm_(.*)",".*hash_rate":(.*),".*round_stales":(.*),".*"total_stales":(.*),".*tito13kfm_(.*)",".*hash_rate":(.*),".*round_stales":(.*),".*"total_stales":(.*),".*tito13kfm_(.*)",".*hash_rate":(.*),".*round_stales":(.*),".*"total_stales":(.*),"

I just found the closest text surrounding the data I wanted and used
Code:
(.*)
to store what is between them.  My problem comes with if I add another worker, then I need to add on to it, and then it changes the stringindex locations.  My calculations are missing a worker.  I need to set up a new graph, etc, etc etc.

As you can tell by my beautiful code, I am an extremely talented coder (LOL)... Anybody have any advice, or inspiration in how I could get this to work with scalability?

Or if anybody wants to take this admittedly horrible code, clean it up, then ask for donations from people, be my guest.  Just let me be the first to buy Smiley

1481171399
Hero Member
*
Offline Offline

Posts: 1481171399

View Profile Personal Message (Offline)

Ignore
1481171399
Reply with quote  #2

1481171399
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481171399
Hero Member
*
Offline Offline

Posts: 1481171399

View Profile Personal Message (Offline)

Ignore
1481171399
Reply with quote  #2

1481171399
Report to moderator
lemosax
Newbie
*
Offline Offline

Activity: 21


View Profile
June 08, 2011, 09:27:27 PM
 #2

Thanks for this.  I had no trouble at all modifying it to monitor 8 workers and I tweaked the title into 2 lines.  Still doesn't scale but it serves my limited needs... until I bring some more workers online and have to tweak it again.  Smiley
tito13kfm
Jr. Member
*
Offline Offline

Activity: 42



View Profile
June 08, 2011, 09:52:28 PM
 #3

I have one for BTCGuild as well if you ever switch pools.  It also show real time stale % from each miner and an estimated worth of your current balance at BTCGuild.

The source is just as messy and unmaintainable as my first one.  Lol

Edit:  Slush modified the API data a bit, so that original script might tend to show lots of blank results and leave tons of errors in your log.  Here is a modified one with a few more fun things incorporated.

http://pastebin.com/HxzdffnY

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!