pputzer wrote:
> Before I start to roll my own (Perl! Oy vey!), is there any third-party
> plugin that allows to send arbitrary commands via IR Blaster (i.e. via
> the menu, not the CLI)? IR Blaster itself can send all defined commands,
> but only recognizes four pre-defined trigger conditions (Power on, Power
> off, Volume +, Volume -).
>
> Usecase: I'd like to send additional commands to the amplifier via the
> GUI so that I don't have to go hunting for the remote control when I'd
> like to switch to the turntable ;-)
Yes, you can send any name defined in an IR blaster conf file.
I use 2 scripts, a tcpserver shell script and an opml menu to control
and stream to sb players from my siriusxm radio, power on, enter the
channel number, power off.
For example, here's my st5c.conf IRB config, minus the raw codes, for
the sxm radio remote.
Code:
--------------------
begin remote
name st5c
flags RAW_CODES
begin raw_codes
name *power*
name *mute*
name up_arrow
name left_arrow
name select
name right_arrow
name down_arrow
name rewind
name play_pause
name fast_forward
name menu
name fm_preset
name volume_up
name band
name memory
name volume_down
name 1
name 2
name *3*
name 4
name 5
name 6
name 7
name 8
name 9
name display
name *0*
name jump
end raw_codes
end remote
--------------------
Script to send single ir key name command
ircmd.sh *power*
ircmd.sh *mute*
Code:
--------------------
#!/bin/bash
MAC=00%3A04%3A20%3A99%3A99%3A99
REMOTE="irblaster send st5c"
SSHOST=localhost
SSTCP="/dev/tcp/$SSHOST/9090"
exec 8<>${SSTCP}
echo -e "$MAC $REMOTE $1\r\nexit\r\n" >&8
RESPONSE=`cat <&8`
--------------------
Script to send multiple remote keys. I only setup it up for the channel
as that's all I needed.
My radio needs a delay between each key command
channel.sh *033*
Code:
--------------------
#!/bin/bash
MAC=00%3A04%3A20%3A99%3A99%3A99
REMOTE="irblaster send st5c"
SSHOST=localhost
SSTCP="/dev/tcp/$SSHOST/9090"
CHANLEN=${#1}
if [ "${CHANLEN}" -ne "3" ]; then
echo "Channel must be 3 digits."
exit
fi
exec 8<>${SSTCP}
echo -e "$MAC $REMOTE select\r\nexit\r\n" >&8
RESPONSE=`cat <&8`
POS=0
while true; do
if [ "${POS}" -ge "${CHANLEN}" ]; then
break;
fi
sleep 0.75
exec 8<>${SSTCP}
echo -e "$MAC $REMOTE ${1:${POS}:1}\r\nexit\r\n" >&8
RESPONSE=`cat <&8`
POS=`expr ${POS} + 1`
done
--------------------
You can use these scripts from any machine, just change SSHOST.
MAC needs to be a uri encoded mac address of the player configured with
irblaster.
Hope that helps.
Ralphy
*1*-Touch, *5*-Classics, *2*-Booms, *1*-Reverted 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=106112
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins