Anybody used lirc?
#1
I haven't successfully, frankly.  I've had IR on a couple of laptops before but gave up.  What I want it for is that I think I should be able to back up my IR remotes like for TVs.  When they die, and I've seen a few do that, I'll have the codes I need to program a universal remote.  I think lirc will give me an ASCII value for each key on the remote that I press, I just need to take careful notes of what button gives what code.

I did a quick search for infrared on this board and the only thing it turned up was something about the IR sensor not being connected until you. plug a jumper in or something like that.  Except I'm not getting far enough to scan for devices.  By its man page lirc-setup should:
Quote:       A  simple  GUI  tool which creates a lirc configuration after some user
       dialogs which  defines  driver,  device,  modprobe  actions,  etc.  The
       results  are  written  as  separate files in the output directory which
       defaults to lirc-setup.conf.d

Here's what I see:

Code:
apt-get install lirc
---------
rock64# lirc-setup
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Traceback (most recent call last):
 File "/usr/bin/lirc-setup", line 10, in <module>
   import mvc_control
 File "/usr/lib/aarch64-linux-gnu/python3/dist-packages/lirc/mvc_control.py", line 15, in <module>
   import mvc_model
 File "/usr/lib/aarch64-linux-gnu/python3/dist-packages/lirc/mvc_model.py", line 13, in <module>
   import yaml
ImportError: No module named 'yaml'

----------------

rock64# dpkg-query -l | grep yaml
ii  libyaml-0-2:arm64                                      0.1.7-2                           arm64        Fast YAML 1.1 parser and emitter library
ii  python-yaml                                            3.12-1                            arm64        YAML parser and emitter for Python

------------
ps ax | grep lirc
8719 ?        Ss     0:00 /usr/sbin/lircd --nodaemon
8754 ?        Ss     0:00 /usr/sbin/lircmd --nodaemon
8774 ?        Ss     0:00 /usr/bin/irexec /etc/lirc/irexec.lircrc
8789 ?        Ss     0:00 /usr/sbin/lircd-uinput
9008 pts/0    S+     0:00 grep lirc

I think the import error comes from something Python.  "pip install yaml" didn't get me anywhere.  lirc goes back at least 10 years, maybe it's not maintained anymore.  By the ps ax lircd is running.  So it's maybe-broken hardware and newbie user who should have RTFMed better.

pip install mvc_control and mvc_model both get "not found" errors.

Code:
rock64# apropos lirc
irdb-get (1)         - list, search and download lirc configuration files.
irpipe (1)           - tool to send data to lircd over /dev/irpipe kernel dev...
irrecord (1)         - IR-codes recording tool for usage with LIRC
irsend (1)           - basic LIRC program to send infra-red commands
lirc-config-tool (1) - tool to scan and generate lirc config files
lirc-lsplugins (1)   - Print dynamic modules info
lirc-lsremotes (1)   - parse lirc configuration files.
lirc-make-devinput (1) - create a devinput.lircd.conf for the local site.
lirc-setup (1)       - Interactive lirc setup tool
lircd (8)            - Decode infrared signals and provide them on a socket.
lircd-setup (8)      - Run setup commands in lirc_options.conf
lircd-uinput (8)     - Forward lirc button presses as uinput events
lircd.conf (5)       - lirc main configuration file
lircmd (8)           - Translate infrared signals into mouse events.
lircrc (5)           - application-specific remotes signals configuration
lircrcd (8)          - Synchronize lircrc state among client applications.
pronto2lirc (1)      - convert pronto-encoded data to lircd.conf format
rock64#
Juicy tidbits
  Reply
#2
On a Pi I did apt-get install lirc and it wanted to install: libftdi1-2 liblirc0 lirc python3-yaml

Tried apt-get install that string on the Rock64 and it didn't have python3-yaml, everything else was here.

So now I get:
Code:
rock64# lirc-setup
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Traceback (most recent call last):
 File "/usr/bin/lirc-setup", line 10, in <module>
   import mvc_control
 File "/usr/lib/aarch64-linux-gnu/python3/dist-packages/lirc/mvc_control.py", line 16, in <module>
   import mvc_view
 File "/usr/lib/aarch64-linux-gnu/python3/dist-packages/lirc/mvc_view.py", line 12, in <module>
   gi.require_version('Vte', '2.91')
 File "/usr/lib/python3/dist-packages/gi/__init__.py", line 118, in require_version
   raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Vte not available

I don't like Python much or have much patience with it, it's always whining about something.  It's probably not part of lirc proper, somebody just wrote a setup wizard in it.  So now it wants mvc-python or python-mvc.  Except neither of those worked, or pip install mvc.  Or pip install mvc_view..
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)