LIRC Client

Questions and comments specific to a particular plugin should go here.

Re: LIRC Client

Postby jinxdone » Tue Jun 02, 2009 6:46 am

Hello and thanks for bringing up this issue.

Could you try this version? Just replace the EventGhost\plugins\Lirc\__init__.py with this one and restart EG. I suspect it's simply because lirc might be using another kind of row delimeter on the data it sends.

If it does not help could you do the following to help me understand what the problem is:

1. Try telnetting to the lirc -server. do you see the button press events there? Do you get a listing if type "LIST" and press enter in the telnet window?
2. If possible can you capture the traffic going between EG and your Lirc server and post me the results?

-jinxdone
Attachments
__init__.py
Test version
(24.76 KiB) Downloaded 222 times
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: LIRC Client

Postby cnm_mike » Wed Jun 03, 2009 9:46 pm

Howdy,

First of all I want to thank you and the other people that has made all of this possible. Having said that I have an interesting problem that hopefully you can help me with.

I am trying to run Mediamonkey using an serial IR (via winlirc) and a USB soundcard. Everything works fine until I hit play and the player starts, then I get no response from the remote until I manually stop the player. The Winlirc icon doesn't even show getting a signal. When I use the internal soundcard, everything works, it's only when I am using the USB soundcard. I have tried this with two different laptops (one being an old 500Mhz PIII and the other being a Core2) and they both act the same. I have tried setting different priority levels. I am using the latest EventGhost release.

thx,
Mike
cnm_mike
 
Posts: 4
Joined: Sat May 30, 2009 1:08 pm

Re: LIRC Client

Postby jinxdone » Thu Jun 04, 2009 7:37 am

Sounds like the problem is in winlirc, the icon should blink when it's correctly receiving ir.

The thing is WinLirc is very time critical, the process can not wait to be executed for too long. If it does have to wait for it may get the timing wrong for the ir pulses -> they dont match your winlirc configuration anymore -> no ir received. I would guess the USB-soundcard is doing something with higher priority that overrides winlirc and stops it from working properly. The only thing you could do about it is try adjusting the winlirc configuration, but it will probably not work flawlessly under load even if you do get it to recognize the distorted codes again.

I think you might have to get one of the USB IR-receivers for example, they don't have these issues because the pulse detection is done on separate hardware rather than the CPU of your computer.
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: LIRC Client

Postby cnm_mike » Thu Jun 04, 2009 2:15 pm

Thanks for your reply. I also feel that the usb is taking priority over the serial port. What items in the Winlirc config file should I play with?

thx,
Mike
cnm_mike
 
Posts: 4
Joined: Sat May 30, 2009 1:08 pm

Re: LIRC Client

Postby jinxdone » Thu Jun 04, 2009 3:13 pm

Take a look at the 'raw codes' in winlirc and see if they correspond to your .conf file when the player is running, perhaps they are just a bit off?

From lirc faq:
If decoding of IR commands does not work reliably you can try to modify the eps and aeps values in the lircd config file to adjust the tolerance of signal lengths. aeps is an absolute value while eps is a relative value expressed in percent.

Those for example are obivious values to tinker with, perhaps some of the other settings too. Check the lirc docs if you are interested in the details, it's probably a better source of information than I am. :)

-jinxdone
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: LIRC Client

Postby cnm_mike » Thu Jun 04, 2009 7:07 pm

Thanks, playing with the two codes has me up and working with the usb soundcard.

thanks for your time.
Mike
cnm_mike
 
Posts: 4
Joined: Sat May 30, 2009 1:08 pm

Re: LIRC Client

Postby hesl » Wed Jul 15, 2009 9:18 pm

Hello, I have the same problem as liquidx had.

I have replaced the __init__.py as instructed but to no avail.

error: uncaptured python exception, closing channel <PluginModule.Lirc.Lirc_Reader connected at 0x20b0e90> (<type 'exceptions.IndexError'>:list index out of range [asyncore.pyc|read|74] [asyncore.pyc|handle_read_event|413] [C:\Program Files\EventGhost\plugins\Lirc\__init__.py|handle_read|265])
No remotes found! (bad lirc configuration?)
C:\Program Files\EventGhost\eg\Classes\ActionThread.py:80: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
Disconnected from the LIRC server!

I can Telnet to the Lirc server and I see my key presses:

Code: Select all
0000000000001790 00 Vol+ Hauppauge_350
                                      0000000000001790 01 Vol+ Hauppauge_350
                                                                            0000
000000001790 02 Vol+ Hauppauge_350
                                  0000000000001790 00 Vol+ Hauppauge_350
                                                                        00000000
00001790 01 Vol+ Hauppauge_350
                              0000000000001790 02 Vol+ Hauppauge_350
                                                                    000000000000
1782 00 2 Hauppauge_350
                       0000000000001782 01 2 Hauppauge_350
                                                          0000000000001782 02 2
Hauppauge_350

But I cannot type LIST and press enter, as soon as I press the letter L the Telnet program exits.

The lirc server runs on Debian Lenny.

Any ideas?
I really do like EventGhost!

Greetz,
Hein
hesl
 
Posts: 7
Joined: Wed Jul 15, 2009 8:59 pm

Re: LIRC Client

Postby hesl » Wed Jul 15, 2009 9:53 pm

-Update-

When I use Telnet on the server and type "list" I get this:
Code: Select all
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
list
BEGIN
list
ERROR
DATA
1
"nknown directive: "list
END

The key presses look like this:
Code: Select all
Connected to localhost.
Escape character is '^]'.
0000000000001790 00 Vol+ Hauppauge_350
0000000000001790 01 Vol+ Hauppauge_350
0000000000001790 02 Vol+ Hauppauge_350
0000000000001791 00 Vol- Hauppauge_350
0000000000001791 01 Vol- Hauppauge_350
0000000000001791 02 Vol- Hauppauge_350
0000000000001790 00 Vol+ Hauppauge_350
0000000000001790 01 Vol+ Hauppauge_350
0000000000001790 02 Vol+ Hauppauge_350
0000000000001791 00 Vol- Hauppauge_350
0000000000001791 01 Vol- Hauppauge_350
0000000000001791 02 Vol- Hauppauge_350

Hein
hesl
 
Posts: 7
Joined: Wed Jul 15, 2009 8:59 pm

Re: LIRC Client

Postby jinxdone » Wed Jul 15, 2009 11:27 pm

Hi hesl,

Does it work if you turn off the checkbox "list remotes from the lirc-server" in the configuration dialog?

I've been meaning to get to the bottom of it but at the moment I'm a bit short on people willing to test it for me. Perhaps I might set up a test installation of lirc on a linux so I could debug it, but that means extra work setting it up. :(
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: LIRC Client

Postby hesl » Thu Jul 16, 2009 9:34 am

Hello jinxdone,

I just tried your suggestion and it works! :D
If you want to test something maybe I can help..

Greetz,
Hein
hesl
 
Posts: 7
Joined: Wed Jul 15, 2009 8:59 pm

Re: LIRC Client

Postby jinxdone » Thu Jul 16, 2009 11:16 am

I just updated the plugin and I'm hoping it fixes the issue permanently. It'd be great if you can test it. :) Please turn the list remotes checkbox on-off and test both states.

New version at the svn.

As usual, replace the __init__.py with the new one and restart eg.

-jinxdone
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: LIRC Client

Postby hesl » Thu Jul 16, 2009 2:58 pm

Code: Select all
Lirc Client: No remotes found! (bad lirc configuration?)
Lirc Client: Received a malformed response from the LIRC-server

So a get a warning but the plugin keeps working.
What does the "List remotes" option do exactly ?
hesl
 
Posts: 7
Joined: Wed Jul 15, 2009 8:59 pm

Re: LIRC Client

Postby jinxdone » Sat Jul 18, 2009 8:11 pm

Hi again,

New version at the svn.

- Added a new feature that will try to (re)connect to the LIRC server a number of times. (+ settings in the config dialog)
- The LIST feature should work in the background and not cause the EG window to block while it waits for a response.
- Improved error handling
- Changed the way the plugin outputs messages
- Changed descriptions to rst format

Because of the changes everybody upgrading will have to open the config dialog and press ok to update their config tree with the new settings. (you will be getting a warning about wrong number of parameters during startup otherwise)

Overall I think it should work pretty smoothly now, provided that it works as intended with a *nix version :)


@hesl
Could you try the new version again and report back if you spot any problems?

In your case if your server always gives an error for the list it should output something like:
Code: Select all
LIRC Client: Received an erroneous response from the LIRC-server
Message data: ['unknown directive: LIST']
LIRC Client: No remotes found!
LIRC Client: You can disable sending LIST on connect if it does not work on your setup

Could you also try the new retry connection feature? Unplug the network cable (or otherwise kill the tcp/ip connection) to simulate a break in the connection.

-jinxdone
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: LIRC Client

Postby hesl » Sun Jul 19, 2009 9:09 pm

Almost right, with "list remotes" disabled I get:
Code: Select all
LIRC Client: Auto-connected successfully after 0 attempts
error: uncaptured python exception, closing channel <PluginModule.Lirc.Lirc_Reader connected at 0x1fe8e40> (<type 'exceptions.IndexError'>:list index out of range [asyncore.pyc|read|74] [asyncore.pyc|handle_read_event|413] [C:\Program Files\EventGhost\plugins\Lirc\__init__.py|handle_read|290])
LIRC Client: Disconnected from the LIRC server!
LIRC Client: Auto-connected successfully after 1 attempts
error: uncaptured python exception, closing channel <PluginModule.Lirc.Lirc_Reader connected at 0x1fe8ee0> (<type 'exceptions.IndexError'>:list index out of range [asyncore.pyc|read|74] [asyncore.pyc|handle_read_event|413] [C:\Program Files\EventGhost\plugins\Lirc\__init__.py|handle_read|290])
LIRC Client: Disconnected from the LIRC server!
LIRC Client: Auto-connected successfully after 2 attempts
error: uncaptured python exception, closing channel <PluginModule.Lirc.Lirc_Reader connected at 0x3c404e0> (<type 'exceptions.IndexError'>:list index out of range [asyncore.pyc|read|74] [asyncore.pyc|handle_read_event|413] [C:\Program Files\EventGhost\plugins\Lirc\__init__.py|handle_read|290])
LIRC Client: Giving up reconnection after 3 failed retries
LIRC Client: Disconnected from the LIRC server!
-Hein
hesl
 
Posts: 7
Joined: Wed Jul 15, 2009 8:59 pm

Re: LIRC Client

Postby jinxdone » Sun Jul 19, 2009 9:31 pm

Oops, I forgot to change that line back to what it was supposed to be, sorry about that. (This is what you get when you do too many changes.. start to forget things..)

Could you try now?

-jinxdone
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 2 guests