Bitcoin Forum
April 25, 2024, 06:45:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help with BTCGuild Rainmeter script  (Read 1658 times)
tito13kfm (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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.

https://i.imgur.com/xD93o.jpg

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
1714027519
Hero Member
*
Offline Offline

Posts: 1714027519

View Profile Personal Message (Offline)

Ignore
1714027519
Reply with quote  #2

1714027519
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
lemosax
Newbie
*
Offline Offline

Activity: 21
Merit: 0


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 (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!