Author

Topic: Display your cgminer Stats on a small LCD Display (cgminerLCDStats) (Read 10723 times)

hero member
Activity: 714
Merit: 500
Are ฿itcoins Radioactive?
With the end of MtGox, is there a new version of cgminerLCDStats that could get the price of the BTC at other exchange?

Many thanks in advance.
Any news about this?

mine is displaying bitstamp. do a search on minepeon forums. i got mine there.
Many thanks, yslyung.
legendary
Activity: 1500
Merit: 1002
Mine Mine Mine
With the end of MtGox, is there a new version of cgminerLCDStats that could get the price of the BTC at other exchange?

Many thanks in advance.
Any news about this?

mine is displaying bitstamp. do a search on minepeon forums. i got mine there.
hero member
Activity: 714
Merit: 500
Are ฿itcoins Radioactive?
With the end of MtGox, is there a new version of cgminerLCDStats that could get the price of the BTC at other exchange?

Many thanks in advance.
Any news about this?
legendary
Activity: 1288
Merit: 1004
I had $13 in ebay credit so I got one ordered.
I am looking forward to this.

This would be a great addition to the Dragon Miners that come without the LCD's.  Has anyone tried to add one to them?

hey mane,

been seeing your post on the threads i read lol .... yeah i think some dragon miners dont have lcd. i think as long as it is runnin on a rpi it "should" work. grab 1 & try it out.
legendary
Activity: 1288
Merit: 1004
HI,
Thanks I do get around on here I think.
I have a Dragon at my house right now I am testing for a review on CCN.  My article list is here.  http://www.cryptocoinsnews.com/author/scott-fargo/
I will see if I can get one of these in time to test on it.
That will be interesting.
It does run cgminer 3.9+

This would be a great addition to the Dragon Miners that come without the LCD's.  Has anyone tried to add one to them?

hey mane,

been seeing your post on the threads i read lol .... yeah i think some dragon miners dont have lcd. i think as long as it is runnin on a rpi it "should" work. grab 1 & try it out.
legendary
Activity: 1500
Merit: 1002
Mine Mine Mine
This would be a great addition to the Dragon Miners that come without the LCD's.  Has anyone tried to add one to them?

hey mane,

been seeing your post on the threads i read lol .... yeah i think some dragon miners dont have lcd. i think as long as it is runnin on a rpi it "should" work. grab 1 & try it out.
legendary
Activity: 1288
Merit: 1004
This would be a great addition to the Dragon Miners that come without the LCD's.  Has anyone tried to add one to them?
legendary
Activity: 1500
Merit: 1002
Mine Mine Mine
display arrived. managed to get it installed but then the display works & switches to a screen that says "error check miner [error 5] input/output"
running on minepeon 0.2.4.4 cgminer 3.12.3 mining on OSM boards.
installed using this guide : http://minepeon.com/forums/viewtopic.php?f=23&t=636

i think i may have "fixed" the problem !

plugged the usb cable from display directly to rpi usb & it works pretty normal now.

many thx to OP & the community that wrote & contributed to this.
legendary
Activity: 1500
Merit: 1002
Mine Mine Mine
display arrived. managed to get it installed but then the display works & switches to a screen that says "error check miner [error 5] input/output"
running on minepeon 0.2.4.4 cgminer 3.12.3 mining on OSM boards.
installed using this guide : http://minepeon.com/forums/viewtopic.php?f=23&t=636
legendary
Activity: 1500
Merit: 1002
Mine Mine Mine
total noob on *nix ! but i still ordered the display & a Rpi. many questions to be asked for sure when both of them arrives. currently running on windows. can it work on windows ? yeah also the mtgox"ed" ticker, how to change that to other exchanges ?

awesome scrypt & idea. thx for sharing  Cool
legendary
Activity: 1018
Merit: 1001
Hi, my display is on the way....  Grin was shipped from HK yesterday but i have to wait 20~30 days before it will be in my hand  Cry .

newbie
Activity: 57
Merit: 0
This is cool. How did I not see this months ago?
newbie
Activity: 11
Merit: 0
Is that possible only tour recommended LCD display?
I've other 320*240 resolution one.
 Huh
Thanks for your great info.
hero member
Activity: 714
Merit: 500
Are ฿itcoins Radioactive?
With the end of MtGox, is there a new version of cgminerLCDStats that could get the price of the BTC at other exchange?

Many thanks in advance.
sr. member
Activity: 281
Merit: 250
Would be awsome. Smiley Have one of these displays collecting dust, and would be fun to actualy use it too. I have never in my life touched linux, and wont try either.
newbie
Activity: 56
Merit: 0
Is there any chance of getting this to work in windows??

I actually wrote a Windows version similar to this a few months back. Runs on Windows 7, 8 and 8.1 currently for BFGminer and CGminer.

If there's an interest in it, I'll upload the code to Github.
sr. member
Activity: 294
Merit: 250
This is really sweet guys! I'm SO please y'all are finding a use for my little script, and making so many cool changes to it.

This has been a long tough today - it means a lot to check this thread and see people getting use from my small effort. Awesome!

BTW, that router hack is extra cool! I love this forum Smiley
newbie
Activity: 6
Merit: 0
Looks awesome! I think I might order one of those LCDs and see if I can get it up and running for myself. Great work
legendary
Activity: 1795
Merit: 1208
This is not OK.
Mixed mine up a bit.
Changed the format of the uptime
Split the hash rate and blocks found and added colour (red if hash rate too low)
Added temp (displays highest temp) with colour (green -> yellow -> red)
Added colour to MtGOX text too.

sr. member
Activity: 281
Merit: 250
Is there any chance of getting this to work in windows??
legendary
Activity: 1795
Merit: 1208
This is not OK.
Noticed that you're using 'stats' just to get the elapsed time... It's a HUGE transfer and elapsed time is already available in the 'summary' data.
legendary
Activity: 1795
Merit: 1208
This is not OK.
Took a little work, but got it running on my router:

sr. member
Activity: 294
Merit: 250
My display arrived early this week.  I have it monitoring both cgminer instances with this quick-and-dirty shell script that just alternates between the two:

Code:
#!/bin/sh
while [ 1 == 1 ]
do
  python cgminerLCDStats.py -d 15 &
  sleep 10
  kill $(ps auxw | grep cgminerLCDStats.py | grep -v grep | awk '{print $2}') 
  python cgminerLCDStats.py -d 15 -p 4029 &
  sleep 10
  kill $(ps auxw | grep cgminerLCDStats.py | grep -v grep | awk '{print $2}') 
done

Port 4028 (the default) is an scrypt mining instance with a Radeon 6870 and a Radeon 7750.  Port 4029 is an SHA-256 mining instance with a couple of BFL Jalapeños.  Every 10 seconds, it reads one and displays it.  The running instance is then killed and the other one is started.

The only real downside is that the display is cleared once every 10 seconds.  I'm also not sure that more information (as from two miners at once) could be displayed without some lower-level mucking around in the display software to make the text smaller.  Perhaps rendering text (in a smaller font) to an image and uploading that to the display would work.

Very, VERY cool Smiley It's nice to see people getting some use out of this!

Yeah, the text size isn't something you can set, at least with the library code I've looked at. As you say, the next best bet would be to render up an image in the background and then display it. Kinda old school style Wink

As for the screen blanking every time it's restarted - you could try commenting out line 341 in cgminerLCDStats.py:
  #   display.clear_lines(TextLines.ALL, BackgroundColours.BLACK)

Not sure that will work as expected, but it's worth a try.

Thanks for sharing your tip for monitoring multiple instances. I'll try and add that to the readme.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
My display arrived early this week.  I have it monitoring both cgminer instances with this quick-and-dirty shell script that just alternates between the two:

Code:
#!/bin/sh
while [ 1 == 1 ]
do
  python cgminerLCDStats.py -d 15 &
  sleep 10
  kill $(ps auxw | grep cgminerLCDStats.py | grep -v grep | awk '{print $2}') 
  python cgminerLCDStats.py -d 15 -p 4029 &
  sleep 10
  kill $(ps auxw | grep cgminerLCDStats.py | grep -v grep | awk '{print $2}') 
done

Port 4028 (the default) is an scrypt mining instance with a Radeon 6870 and a Radeon 7750.  Port 4029 is an SHA-256 mining instance with a couple of BFL Jalapeños.  Every 10 seconds, it reads one and displays it.  The running instance is then killed and the other one is started.

The only real downside is that the display is cleared once every 10 seconds.  I'm also not sure that more information (as from two miners at once) could be displayed without some lower-level mucking around in the display software to make the text smaller.  Perhaps rendering text (in a smaller font) to an image and uploading that to the display would work.
legendary
Activity: 1795
Merit: 1208
This is not OK.
Awesome! Just wish I had a spare USB port free. Would look great sitting on my router Smiley
sr. member
Activity: 1316
Merit: 254
Sugars.zone | DatingFi - Earn for Posting


Sweet. glad you got it working. I really need to take the time and examine the exact differences between the API's.

Sorry I've been away from the thread a while. I'm glad y'all got your problems sorted. Yeah, opening a new putty window works well to run the script. That's usually what I do. Or you could have it auto start.

southerngentuk - Glad you discovered how to set it up to auto start. I'm been meaning to add a tutorial for that, but it varies for different Linux flavors. Maybe I'll do one that covers the versions I know.
Thank you for this great project.

Maybe add a link to the git pointing to  mineforemans forum. That seems to have a lot of good information also.

sr. member
Activity: 294
Merit: 250
Hi im  trying to get this screen to work with bfgminer but i think there is some difference between it and cgminer and a it just hangs at what looks like getting the api info anyone have any idea what need changing ?

Hi,

I haven't tested with bfgminer at all, and I'm not very familiar with it. I  think the API is similar, so it may work. You'll need to make sure bfgminer is listening for API call. I think you need something like this in the bfgminer config file:

"api-listen" : true,
"api-port" : "4028",

I hope this helps. Let me know if you get it working, or if I can be of further help.

Implemented a quick dirty fix which gets it working with bfgminer

changed CgminerRPCClient.py

Code:
# loop until a zero byte indicates we got all the data
            data = ""
            while True:
                buffer = s.recv(65535)
                if '\x00' in buffer:
                    data += buffer # keep the buffer and bail from the loop - we got all t$
                    break # zero found, so we must have all the data TODO break in loop is$
                else:
                    data += buffer # No zero found yet, append current buffer to data and $

            s.close() # close the socket

To

 # loop until a zero byte indicates we got all the data
            data = ""
            while True:
                buffer = s.recv(65535)
                if buffer:
                    data += buffer # keep the buffer and bail from the loop - we got all t$
                 # zero found, so we must have all the data TODO break in loop is ugly    $
                else:
                      s.close() # close the socket
                break

Sweet. glad you got it working. I really need to take the time and examine the exact differences between the API's.

Sorry I've been away from the thread a while. I'm glad y'all got your problems sorted. Yeah, opening a new putty window works well to run the script. That's usually what I do. Or you could have it auto start.

southerngentuk - Glad you discovered how to set it up to auto start. I'm been meaning to add a tutorial for that, but it varies for different Linux flavors. Maybe I'll do one that covers the versions I know.
sr. member
Activity: 336
Merit: 250
Turns out the one I got was a dud, the USB connecter is broken and only receives power, no data. Time to open it up and see what I can see!

EDIT: working now. Just hit the USB connector with my rework station and all is working.

Cheers for a great little script OP!

Sweet! Congrats on the repair.

I'm kinda noobie to Linux - but I have a question:

I use SSH to access my rPi and I can get it running easily. However - is there a way so i can still sudo screen -r on cgminer so I can monitor the miner when I am on my other computer?

Any way around this?

I answered this myself - I'm an idiot. Just duplicated the session in putty and entered the cgminerLCDStats.py command.
sr. member
Activity: 1316
Merit: 254
Sugars.zone | DatingFi - Earn for Posting

Implemented a quick dirty fix which gets it working with bfgminer

changed CgminerRPCClient.py



Your my Hero. This Works for BFGMiner. I now at last have a stable Minepeon Build.

How to get the screen to run on boot?

Edit  : found the answer on minepeon forums

All is right with the world once again.
full member
Activity: 158
Merit: 100
Hi im  trying to get this screen to work with bfgminer but i think there is some difference between it and cgminer and a it just hangs at what looks like getting the api info anyone have any idea what need changing ?

Hi,

I haven't tested with bfgminer at all, and I'm not very familiar with it. I  think the API is similar, so it may work. You'll need to make sure bfgminer is listening for API call. I think you need something like this in the bfgminer config file:

"api-listen" : true,
"api-port" : "4028",

I hope this helps. Let me know if you get it working, or if I can be of further help.

Implemented a quick dirty fix which gets it working with bfgminer

changed CgminerRPCClient.py

Code:
# loop until a zero byte indicates we got all the data
            data = ""
            while True:
                buffer = s.recv(65535)
                if '\x00' in buffer:
                    data += buffer # keep the buffer and bail from the loop - we got all t$
                    break # zero found, so we must have all the data TODO break in loop is$
                else:
                    data += buffer # No zero found yet, append current buffer to data and $

            s.close() # close the socket

To

 # loop until a zero byte indicates we got all the data
            data = ""
            while True:
                buffer = s.recv(65535)
                if buffer:
                    data += buffer # keep the buffer and bail from the loop - we got all t$
                 # zero found, so we must have all the data TODO break in loop is ugly    $
                else:
                      s.close() # close the socket
                break
sr. member
Activity: 434
Merit: 250
Pretty sweet, thanks for sharing.
sr. member
Activity: 336
Merit: 250
Turns out the one I got was a dud, the USB connecter is broken and only receives power, no data. Time to open it up and see what I can see!

EDIT: working now. Just hit the USB connector with my rework station and all is working.

Cheers for a great little script OP!

Sweet! Congrats on the repair.

I'm kinda noobie to Linux - but I have a question:

I use SSH to access my rPi and I can get it running easily. However - is there a way so i can still sudo screen -r on cgminer so I can monitor the miner when I am on my other computer?

Any way around this?
sr. member
Activity: 294
Merit: 250
Turns out the one I got was a dud, the USB connecter is broken and only receives power, no data. Time to open it up and see what I can see!

EDIT: working now. Just hit the USB connector with my rework station and all is working.

Cheers for a great little script OP!

Sweet! Congrats on the repair.
sr. member
Activity: 336
Merit: 250
Turns out the one I got was a dud, the USB connecter is broken and only receives power, no data. Time to open it up and see what I can see!

EDIT: working now. Just hit the USB connector with my rework station and all is working.

Cheers for a great little script OP!
sr. member
Activity: 294
Merit: 250
Hi im  trying to get this screen to work with bfgminer but i think there is some difference between it and cgminer and a it just hangs at what looks like getting the api info anyone have any idea what need changing ?

Hi,

I haven't tested with bfgminer at all, and I'm not very familiar with it. I  think the API is similar, so it may work. You'll need to make sure bfgminer is listening for API call. I think you need something like this in the bfgminer config file:

"api-listen" : true,
"api-port" : "4028",

I hope this helps. Let me know if you get it working, or if I can be of further help.
full member
Activity: 158
Merit: 100
Hi im  trying to get this screen to work with bfgminer but i think there is some difference between it and cgminer and a it just hangs at what looks like getting the api info anyone have any idea what need changing ?
sr. member
Activity: 294
Merit: 250
This display would be perfect for the GPU/ASIC rig I just spun up...will probably have to roll my own software to poll two cgminer instances and two CryptoSwitcher instances, but the pointer to a suitable display is useful info.

The Python code should be a good starting point for that. It already supports being pointed to an arbitrary cgminer instance. You would just have to add code to poll the two separately.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
This display would be perfect for the GPU/ASIC rig I just spun up...will probably have to roll my own software to poll two cgminer instances and two CryptoSwitcher instances, but the pointer to a suitable display is useful info.
sr. member
Activity: 336
Merit: 250
Does it need to be connected directly to the Pi and not via USB hub? I'm having issues getting it to be seen when running the  sudo python2 cgminerLCDStats.py" command.  Angry

No, it should work fine when connected to a hub. I've seen a number of these units with defective USB cables, unfortunately. They tend to fit very loosely at the connection near the display. Does the Display work for any of the demos?

What specific error are you getting? I'm assuming one about "not being able to claim the device". It's usually either a bad USB cable, or not running the script as root. (that does not seem to be you problem)

It powers up, but using the command lsusb doesn't bring it up.

Next time I am back home, I will try another USB cable and actually try it with the default software. Will get back to you.
sr. member
Activity: 294
Merit: 250
Does it need to be connected directly to the Pi and not via USB hub? I'm having issues getting it to be seen when running the  sudo python2 cgminerLCDStats.py" command.  Angry

No, it should work fine when connected to a hub. I've seen a number of these units with defective USB cables, unfortunately. They tend to fit very loosely at the connection near the display. Does the Display work for any of the demos?

What specific error are you getting? I'm assuming one about "not being able to claim the device". It's usually either a bad USB cable, or not running the script as root. (that does not seem to be you problem)
sr. member
Activity: 294
Merit: 250
In the title.
"Re: Display your gcminer Stats on a small LCD Display (cgminerLCDStats)"
Should be
"Re: Display your cgminer Stats on a small LCD Display (cgminerLCDStats)"

Just a heads up.

LOL! Thanks. I can't tell you how many times I've made that typo :/
sr. member
Activity: 282
Merit: 250
hero member
Activity: 630
Merit: 501
Miner Setup And Reviews. WASP Rep.
In the title.
"Re: Display your gcminer Stats on a small LCD Display (cgminerLCDStats)"
Should be
"Re: Display your cgminer Stats on a small LCD Display (cgminerLCDStats)"

Just a heads up.
full member
Activity: 142
Merit: 100
Just ordered one. Can't wait to get it going. Smiley
sr. member
Activity: 336
Merit: 250
Does it need to be connected directly to the Pi and not via USB hub? I'm having issues getting it to be seen when running the  sudo python2 cgminerLCDStats.py" command.  Angry
hero member
Activity: 490
Merit: 501
that is pretty sweet. Smiley
sr. member
Activity: 294
Merit: 250
A little bump to make sure everyone gets a chance to see this...
sr. member
Activity: 294
Merit: 250
Hi Everyone,

I like to take a minute to introduce a new monitor app for cgminer. This simple script will get data from the cgminer API and display mining statistics on a small LCD screen attached to your computer or Raspberry Pi. It's a great addition to most unix based mining setups, and includes a handy MtGox ticker and clock display as well. It's been verified to work with most Linux distributions, Apple OS X, and as I said, works great on the Pi.

The project website is here:
http://cardcomm.github.io/cgminerLCDStats/

The code can be downloaded here:
https://github.com/cardcomm/cgminerLCDStats

Here is a screen shot of the display in action:



You can order the specific LCD screen needed for this app from the ColdTears Electronics ebay store:
(Note that I am IN NO WAY connected with ColdTears electronics, nor am I endorsing this ebay seller. I've personally ordered and received two units, and I know several others have purchased them as well.)
http://www.ebay.com/itm/USB-2-8-TFT-LCD-module-LCD-sys-info-display-temperature-fan-AIDA64-LCD-Smartie-/121004607232?pt=LH_DefaultDomain_0&hash=item1c2c6fc700

I first heard of this display in a post on the MinePeon forum. There are quite a few posts in that thread discussing the LCD display and this project.
BTW, the code to support the LCD display is rolled in to the current release of MinePeon.
https://bitcointalksearch.org/topic/m.2844656
Jump to: