I have been able to script jivelite navigation using 'evemu' (https://github.com/freedesktop/evemu.git). The attached script searches for the Beatles artist and navigates to the album list.
Evemu has the ability to create a virtual keyboard device, but I'll leave that for someone else to work out. For my example, you have to have a keyboard attached to the pi. I use 'this one' (https://www.ebay.ca/i/142562501687?chn=ps&dispItem=1). SSH into pcp, download and install the evemu extension. Code: -------------------- ceo wget http://ralph-irving.users.sourceforge.net/pico/evemu.tcz.md5.txt wget http://ralph-irving.users.sourceforge.net/pico/evemu.tcz md5sum -c evemu.tcz.md5.txt # verify the download was ok evemu.tcz: OK tce-load -i evemu -------------------- Determine the device name of your keyboard. Mine is event0 Select the device and describe will list all the keys supported and can be used in scripts. Code: -------------------- evemu-describe Available devices: /dev/input/event0: Smart Smart Wireless Device /dev/input/event1: Smart Smart Wireless Device /dev/input/event2: Smart Smart Wireless Device /dev/input/event3: FT5406 memory based driver /dev/input/event4: lircd-uinput Select the device event number [0-4]: 0 .. snip .. -------------------- Copy the attached script to the pi and make it executable chmod u+x search.sh Update the device= in the script for your kbd. Run it ./search.sh Code: -------------------- #!/bin/sh # Navigate Jivelite menus # Requires a keyboard device be attached. device="/dev/input/event0" function press { evemu-event ${device} --type EV_KEY --code $1 --value 1 --sync evemu-event ${device} --type EV_KEY --code $1 --value 0 --sync sleep 0.2 } # Start from a known menu postion (home) press KEY_H sleep 1 # Search press KEY_SLASH sleep 1 press KEY_B press KEY_E press KEY_A press KEY_T press KEY_L # Typo! press KEY_I press KEY_E # Let's fix that press KEY_BACKSPACE press KEY_BACKSPACE press KEY_E press KEY_S press KEY_ENTER sleep 1 # My Music (go) press KEY_L sleep 0.5 # Artists (go) press KEY_L # List Artist (go) press KEY_L -------------------- For the keypress to jivelite action mappings can be found 'here' (https://github.com/ralph-irving/tcz-lirc/blob/master/jivekeys.csv). Note that the LIRC key symbols may not be the same as those listed from the evemu-describe output. My script is based on the details described 'here' (https://fedoramagazine.org/simulate-device-input-evemu/). To have the evemu.tcz load at boot add it to onboot.lst Code: -------------------- ce echo "evemu.tcz" >> onboot.lst -------------------- +-------------------------------------------------------------------+ |Filename: search.sh.txt | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=25924| +-------------------------------------------------------------------+ 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¤cy_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=109686 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
