First you must disable IR remote control in the web tweaks tab and
reboot before proceeding.

Next, install pcp-lircd from the extensions webgui.  Reboot if needed.

Next, ensure squeezelite is stopped.


Code:
--------------------
    sudo /usr/local/etc/init.d/squeezelite stop
--------------------


Plug in your FLIRC and find the name.


Code:
--------------------
    $ cat /proc/bus/input/devices
  
  I: Bus=0003 Vendor=20a0 Product=0001 Version=0101
  N: Name="flirc.tv flirc"
  P: Phys=usb-20980000.usb-1.3/input0
  S: 
Sysfs=/devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:20A0:0001.0001/input/input0
  U: Uniq=
  H: Handlers=sysrq kbd event0 
  B: PROP=0
  B: EV=10001f
  B: KEY=3007f 0 0 0 0 483ffff 17aff32d bf544446 0 0 1 130c13 b17c000 267bfa 
d941dfed e09effdf 1cfffff ffffffff fffffffe
  B: REL=40
  B: ABS=1 0
  B: MSC=10
--------------------


Start inputlircd from the command line while testing.  I've found the
following options work best.

$ sudo /usr/local/sbin/inputlircd -n "flirc.tv flirc" -m 0 -g -r 300 -c

Run irw and press each key. Note with keycode that is generated for
which key.


Code:
--------------------
    $ irw
  29 0 KEY_C /dev/input/event0
  19 0 KEY_P /dev/input/event0{/code]
  
  For example my slimdevices remote PAUSE key sends KEY_C and PLAY sends KEY_P. 
 The codes from your flirc will likely be different as I'm using an old flirc 
config which I created for use with jivelite on my wandboard, since I don't 
want to reprogram my flirc.
  
  Stop irw by pressing control-C
  
  Create a file mapping of the keycode from your remote to a corresponding 
keycode squeezelite operation.
  
  For example:
  
    
Code:
--------------------
        $ cat /home/tc/inputlircd.keymap
    KEY_C = KEY_PAUSE
    KEY_P = KEY_PLAY
--------------------
    
  
  The list of squeezelite IR keycodes can be found 'here' 
(https://github.com/ralph-irving/squeezelite/blob/master/ir.c#L103)
  
  Restart inputlircd from the command line adding the mapping file to test.
  
  sudo /usr/local/sbin/inputlircd -n "flirc.tv flirc" -m 0 -g -r 300 -f -c -t 
/home/tc/inputlircd.keymap
  
  
  Start squeeelite with the -i option and -d ir=debug to test if the keys work. 
 You can ignore the error reading the ir config.  It's not needed for inputlircd
  Note that you need at least squeezelite version 1.9.7-1237 for this to work.
  
    
Code:
--------------------
        $ squeezelite -d ir=debug -i
    [11:28:55.788622] load_lirc:242 loaded liblirc_client.so.0
    [11:28:55.791797] ir_init:261 error reading config: ~/.lircrc
    [11:28:57.951369] ir_thread:199 ir lirc: KEY_PLAY [0] -> 768910ef
    [11:29:05.246239] ir_thread:199 ir lirc: KEY_PAUSE [0] -> 768920df
--------------------
    
  
  
  Once you're happy with the key map file, backup your pcp config and confirm 
the mapping file is in the backup.
  
    
Code:
--------------------
        $ tar -tvf mydata.tgz | grep input
    -rw-r--r-- ralphy/users        35 2020-08-01 11:20:21 
home/tc/inputlircd.keymap
--------------------
    
  
  Now in the webgui.
  
  Put /usr/local/sbin/inputlircd -n "flirc.tv flirc" -m 0 -g -r 300 -c -t 
/home/tc/inputlircd.keymap in one of the user commands and also add -i to 
squeezelite various options field on the squeezelite tab.
  
  Backup your config once more and reboot.



Ralphy

*1*-Touch, *5*-Classics, *3*-Booms, *1*-UE Radio
'Squeezebox client builds'
(https://sourceforge.net/projects/lmsclients/files/) 'donations'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LL5P6365KQEXN&lc=CA&item_name=Squeezebox%20client%20builds&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
always appreciated.
------------------------------------------------------------------------
ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484
View this thread: http://forums.slimdevices.com/showthread.php?t=110640

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to