lirc plugin doesn't work with inputlirc

Bug #588804 reported by Jonathan Rauprich on 2010-06-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Elisa Media Center
Undecided
Unassigned

Bug Description

inputlirc is a simplified LIRC daemon which works just for input devices. see: http://www.realh.co.uk/dvbhowto/ar01s08.html

when i use inputlirc with elisa, and pressing any key it doesn't do anything, but throws an exception like that:

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 84, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 69, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/gtk2reactor.py", line 264, in _doReadOrWrite
    why = source.doRead()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 460, in doRead
    return self.protocol.dataReceived(data)
  File "/usr/lib/python2.6/dist-packages/twisted/protocols/basic.py", line 251, in dataReceived
    why = self.lineReceived(line)
  File "/home/joni/playground/elisa/elisa-plugins/elisa/plugins/lirc/lirc_input.py", line 56, in lineReceived
    self.callback(*args)
  File "/home/joni/playground/elisa/elisa-plugins/elisa/plugins/lirc/lirc_input.py", line 146, in _got_event
    elapsed_since_first_event = now - self._first_event_time
exceptions.TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

comparing the output of irw when running inputlirc and lirc shows a little difference:

inputlirc: cf 0 KEY_PLAY pci-0000:00:0b.1-event-ir
lirc: 00000000800100cf 00 KEY_PLAY devinput

the lines always look like: HEX_KEY REPEAT KEY_VALUE REMOTE
in this example HEX_KEY and REMOTE are different, but that doesn't matter, since these values can be configured in the remote.map, the issues is the REPEAT value in inputlirc its 0 and in lirc its 00

in lirc_input.py at line 144: http://bazaar.launchpad.net/~elisa-developers/elisa/1.0/annotate/head%3A/elisa-plugins/elisa/plugins/lirc/lirc_input.py#L144

repeat is compared to '00', that fails with inputlirc. solution would be converting repeat to integer and comparing it to 0

i'm gonna upload a patch soon

dino99 (9d9) wrote :

The latest free moovida 1.09 does not get any maintenance since a while. Now moovidadb.com is supporting Linux and support can be found at : http://www.fluendo.com/faq/

Changed in elisa:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers