Author

Topic: Help with BTCGuild Rainmeter script (Read 1683 times)

newbie
Activity: 42
Merit: 0
June 08, 2011, 04: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
newbie
Activity: 21
Merit: 0
June 08, 2011, 04: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
newbie
Activity: 42
Merit: 0
June 04, 2011, 01: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
Jump to: