Difference between revisions of "Install AVR 3808 telnet"
From xPL
(→Install xPL audio-video controller) |
(→Ubuntu) |
||
Line 36: | Line 36: | ||
== Ubuntu == | == Ubuntu == | ||
+ | |||
+ | Edit <code>/etc/init/xpl-loungeAvController.conf</code>: | ||
+ | # xPL Denon AVR controller | ||
+ | # | ||
+ | description "xPL lounge audio-video controller" | ||
+ | version "1.0" | ||
+ | author "Francois Corthay" | ||
+ | |||
+ | #------------------------------------------------------------------------------- | ||
+ | # Configuration variables | ||
+ | # | ||
+ | env SCRIPTS_DIR='/home/control/Documents/Controls' | ||
+ | env SCRIPT_NAME='xpl-avController-DenonAVR-telnet.pl' | ||
+ | env PARAMETERS='-n loungeAmp' | ||
+ | |||
+ | #------------------------------------------------------------------------------- | ||
+ | # Start and stop conditions | ||
+ | # | ||
+ | start on xpl-hub_started | ||
+ | stop on shutdown | ||
+ | respawn | ||
+ | setuid control | ||
+ | setgid users | ||
+ | |||
+ | #------------------------------------------------------------------------------- | ||
+ | # Start daemon | ||
+ | # | ||
+ | exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS | ||
+ | |||
+ | Start the screen controller and test it: | ||
+ | su root | ||
+ | service xpl-loungeAvController start | ||
+ | service xpl-loungeAvController status | ||
+ | initctl list | sort | grep xpl | ||
+ | |||
+ | [[Category: install]] [[Category:xPL]] |
Revision as of 17:40, 22 December 2014
The Denon AV receivers can be controlled via a serial port or via Ethernet.
Install xPL audio-video controller
Install CPAN Net::Telnet:
su perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' 2> /dev/null | grep -i telnet apt-get install libnet-telnet-perl
Download the AVR controller script. Move it to xPL scripts directory:
su SCRIPTS_BASE_DIR=/home/control/Documents/Controls mv xpl-avController-DenonAVR-telnet.pl $SCRIPTS_BASE_DIR chown control:users $SCRIPTS_BASE_DIR/*.pl chmod 775 $SCRIPTS_BASE_DIR/*.pl
Monitor xPL messages:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-monitor.pl -vfd
In a second window, test the AVR controller:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-avController-DenonAVR-telnet.pl -v -n loungeAmp
In a 3rd window, test the commands:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -d dspc-ampDenon.loungeAmp -c media.basic mute=on $SCRIPTS_BASE_DIR/xpl-send.pl -d dspc-ampDenon.loungeAmp -c media.basic mute=off
Launch the script at startup
Ubuntu
Edit /etc/init/xpl-loungeAvController.conf
:
# xPL Denon AVR controller # description "xPL lounge audio-video controller" version "1.0" author "Francois Corthay" #------------------------------------------------------------------------------- # Configuration variables # env SCRIPTS_DIR='/home/control/Documents/Controls' env SCRIPT_NAME='xpl-avController-DenonAVR-telnet.pl' env PARAMETERS='-n loungeAmp' #------------------------------------------------------------------------------- # Start and stop conditions # start on xpl-hub_started stop on shutdown respawn setuid control setgid users #------------------------------------------------------------------------------- # Start daemon # exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS
Start the screen controller and test it:
su root service xpl-loungeAvController start service xpl-loungeAvController status initctl list | sort | grep xpl