lcdproc-ruby-newcomers Mailing List for LCDProc-Ruby
Status: Beta
Brought to you by:
fangiotophia
You can subscribe to this list here.
2009 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Topher F. <tf...@fr...> - 2009-03-23 13:54:18
|
Hi Sascha, I'll look into this when I go home for lunch. I haven't ever seen it steal all of the CPU, so it might be a bit hard to debug. Can you tell me exactly which process is using the CPU (I assume it's irb but you never know...). Also, after you create your client, can you type c.messages and send me the output? Hopefully that will tell me what state the client is in and if there were any errors when connecting. Since the method that it died in when you hit Ctrl-C was "get_response" my guess is that it is simply waiting for a response from the server and it did not get one. This could mean that you aren't actually connected to the server, but I'm pretty sure it throws some errors if there isn't a valid connection. I need to put a timeout period in there, but regardless it shouldn't steal all of the CPU, it should be sleeping for most of the time (therefore not processing anything). Just a note, you must be running LCDd in the background on the default port for your code to work. Also, what OS/LCDd version are you running? Topher -----Original Message----- From: Sascha [mailto:sas...@gm...] Sent: Sunday, March 22, 2009 9:09 AM To: Topher Fangio Subject: Re: [Lcdproc] LCDproc Digest, Vol 7, Issue 12 Am Freitag 27 Februar 2009 20:50:32 schrieben Sie: > Hi Sascha, > > Assuming you have Ruby installed, CD into the LCDProc-Ruby directory > where you extracted the download and type: > > ruby script/console.rb > > This will open an interactive console that you can use to play with > the library. You can look at some of the examples to see how they > work, but basically, you create a client, attach a screen and attach > widgets. > > c = Client.new(:host => "localhost", :name => "test"); > s = Screen.new("test_screen") > w = Widget.new( :string ) > > c.attach(s) > s.add_widget(w) > > > This should create a basic screen that has the word "Hello" at the top > left (it defaults to hello, you can pass any string you want). You can > debug a bit by typing > > c.messages > > and see basically a log of everything you have done. > > > You may also be interested in running the tests: > > CD into the LCDProc-Ruby directory and type: > > rake -T > > to see the tests, or > > rake test:basic > > to run the basic tests. Just go to http://www.rubygems.org/ and > download the latest version for your OS. Then run > > gem install rake > > Also, the online documentation is below. It's not complete, but it should > get you started. > > http://lcdproc-ruby.sourceforge.net/index.html > > Let me know if you need anything else! I'll be glad to help. > > P.S. I'm forwarding this to the LCDProc-Ruby list in case anyone else > has similar questions. > > Topher Hi, It took a long time to figure out my problem, why the console from LCDProc-Ruby did not start. I had to create a link: "ln -s /usr/bin/irb1.8 /usr/bin/irb" The console starts, but if I want to create a new screen my, top shows 100% cpu load. # ruby1.9 script/console.rb Loading LCDProc Console Environment >> c = Client.new(:host => "localhost", :name => "test"); ?> s = Screen.new("test_screen") ^CIRB::Abort: abort then interrupt!! from /home/Linux_Packages/lcd/LCDProc- Ruby/lib/lcdproc/client.rb:354:in block in get_response\' from /home/Linux_Packages/lcd/LCDProc- Ruby/lib/lcdproc/client.rb:350:in get_response\' from /home/Linux_Packages/lcd/LCDProc- Ruby/lib/lcdproc/client.rb:282:in initialize\' from (irb):1:in <main>\' # ruby1.8 script/console.rb Loading LCDProc Console Environment >> s = Screen.new("test_screen") => #<LCDProc::Screen:0x00000000fb22c8 @id="test_screen", @client=nil, @widgets=[], @key_events=[], @priority=:info, @lcdproc_attributes={:heartbeat=>:open}> >> c = Client.new(:host => "localhost", :name => "test"); ?> s = Screen.new("test_screen") ^CIRB::Abort: abort then interrupt!! from /home/Linux_Packages/lcd/LCDProc- Ruby/lib/lcdproc/client.rb:354:in block in get_response\' from /home/Linux_Packages/lcd/LCDProc- Ruby/lib/lcdproc/client.rb:350:in get_response\' from /home/Linux_Packages/lcd/LCDProc- Ruby/lib/lcdproc/client.rb:282:in initialize\' from (irb):2:in <main>\' I now have my PC working again and hopefully I can respond faster to your next answers. Regards, Sascha > -----Original Message----- > From: Sascha [mailto:sas...@gm...] > Sent: Friday, February 27, 2009 11:47 AM > To: Topher Fangio > Subject: Re: [Lcdproc] LCDproc Digest, Vol 7, Issue 12 > > Am Mittwoch 25 Februar 2009 15:38:48 schrieben Sie: > > Hi Sascha, > > > > Sourceforge says that the perl-LCDd library works with LCDproc 0.4. I > > think there have been quite a few differences in the 0.5 branch. The last > > update was 19 Feb, 2003, so I would guess that it's not being actively > > developed. There may be another library that I don't know about, but I > > figured that's probably the one in which you were interested. > > > > About 8 months ago I wrote a Ruby library that interacts with the 0.5 > > server. It's not quite in "active" development, but that's because the > > project on which I was using it got scrapped. If there is interest, I can > > definitely get back into it and fix some bugs/add more features. If I > > remember correctly, there is support for the backlight and it would be > > super simple to create a client (in Ruby) that turned the backlight on > > and off at whatever times you wanted. > > > > You can check out the library at > > http://sourceforge.net/projects/lcdproc-ruby/. There's a mailing list if > > you have any questions specific to the library and I will most likely get > > back to you the same day (depends on weekends and whatnot). > > > > I would love some feedback and since I'm going to be getting back into > > Ruby for some web development, I'll have my environment setup anyway. > > > > Hope you find what you are looking for :-) > > > > Topher > > Hi, > I tried to get this running, but I don't know how. I am familar with perl, > php but I havn't read about ruby. Do you have a Howto to get this working? > > Regards Sascha > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.0.237 / Virus Database: 270.11.3/1970 - Release Date: 02/27/09 > 07:05:00 > > CONFIDENTIALITY NOTICE: This email message and any attachments hereto are > intended only for use by the addressee(s) named herein and may contain > information which is legally privileged, confidential and/or exempt from > disclosure under applicable law. If you are not the intended recipient, or > an authorized representative of the intended recipient, of this email > message, you are hereby notified that any review, dissemination, > distribution, copying, or use (including any reliance thereon) of this > email message, and/or any attachment hereto, is strictly prohibited. > > Although this transmission and any attachments are believed to be free of > any virus or other defect that might affect any computer system into which > it is received and opened, it is the responsibility of the recipient to > ensure that it is free from virus or other defect and no responsibility is > accepted by the sending company, its subsidiaries and affiliates, as > applicable, for any loss or damage arising in any way from its use. > > If you have received this email message in error, please immediately notify > the sender by return email and permanently delete from your system, the > original and any copies of this email and any attachments hereto and any > printout hereof. Unauthorized interception of this email is a violation of > federal criminal law. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.238 / Virus Database: 270.11.24/2018 - Release Date: 03/23/09 06:52:00 CONFIDENTIALITY NOTICE: This email message and any attachments hereto are intended only for use by the addressee(s) named herein and may contain information which is legally privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, or an authorized representative of the intended recipient, of this email message, you are hereby notified that any review, dissemination, distribution, copying, or use (including any reliance thereon) of this email message, and/or any attachment hereto, is strictly prohibited. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is free from virus or other defect and no responsibility is accepted by the sending company, its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you have received this email message in error, please immediately notify the sender by return email and permanently delete from your system, the original and any copies of this email and any attachments hereto and any printout hereof. Unauthorized interception of this email is a violation of federal criminal law. |
From: Topher F. <tf...@fr...> - 2009-02-27 20:18:59
|
Hi Sascha, Assuming you have Ruby installed, CD into the LCDProc-Ruby directory where you extracted the download and type: ruby script/console.rb This will open an interactive console that you can use to play with the library. You can look at some of the examples to see how they work, but basically, you create a client, attach a screen and attach widgets. c = Client.new(:host => "localhost", :name => "test"); s = Screen.new("test_screen") w = Widget.new( :string ) c.attach(s) s.add_widget(w) This should create a basic screen that has the word "Hello" at the top left (it defaults to hello, you can pass any string you want). You can debug a bit by typing c.messages and see basically a log of everything you have done. You may also be interested in running the tests: CD into the LCDProc-Ruby directory and type: rake -T to see the tests, or rake test:basic to run the basic tests. Just go to http://www.rubygems.org/ and download the latest version for your OS. Then run gem install rake Also, the online documentation is below. It's not complete, but it should get you started. http://lcdproc-ruby.sourceforge.net/index.html Let me know if you need anything else! I'll be glad to help. P.S. I'm forwarding this to the LCDProc-Ruby list in case anyone else has similar questions. Topher -----Original Message----- From: Sascha [mailto:sas...@gm...] Sent: Friday, February 27, 2009 11:47 AM To: Topher Fangio Subject: Re: [Lcdproc] LCDproc Digest, Vol 7, Issue 12 Am Mittwoch 25 Februar 2009 15:38:48 schrieben Sie: > Hi Sascha, > > Sourceforge says that the perl-LCDd library works with LCDproc 0.4. I think > there have been quite a few differences in the 0.5 branch. The last update > was 19 Feb, 2003, so I would guess that it's not being actively developed. > There may be another library that I don't know about, but I figured that's > probably the one in which you were interested. > > About 8 months ago I wrote a Ruby library that interacts with the 0.5 > server. It's not quite in "active" development, but that's because the > project on which I was using it got scrapped. If there is interest, I can > definitely get back into it and fix some bugs/add more features. If I > remember correctly, there is support for the backlight and it would be > super simple to create a client (in Ruby) that turned the backlight on and > off at whatever times you wanted. > > You can check out the library at > http://sourceforge.net/projects/lcdproc-ruby/. There's a mailing list if > you have any questions specific to the library and I will most likely get > back to you the same day (depends on weekends and whatnot). > > I would love some feedback and since I'm going to be getting back into Ruby > for some web development, I'll have my environment setup anyway. > > Hope you find what you are looking for :-) > > Topher Hi, I tried to get this running, but I don't know how. I am familar with perl, php but I havn't read about ruby. Do you have a Howto to get this working? Regards Sascha No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.3/1970 - Release Date: 02/27/09 07:05:00 CONFIDENTIALITY NOTICE: This email message and any attachments hereto are intended only for use by the addressee(s) named herein and may contain information which is legally privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, or an authorized representative of the intended recipient, of this email message, you are hereby notified that any review, dissemination, distribution, copying, or use (including any reliance thereon) of this email message, and/or any attachment hereto, is strictly prohibited. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is free from virus or other defect and no responsibility is accepted by the sending company, its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you have received this email message in error, please immediately notify the sender by return email and permanently delete from your system, the original and any copies of this email and any attachments hereto and any printout hereof. Unauthorized interception of this email is a violation of federal criminal law. |