Difference between revisions of "Install AVR 3808"
(Created page with " ::<html> <a title="By Dsmurat (+) [LGPL (http://www.gnu.org/licenses/lgpl.html)], via Wikimedia Commons" href="http://commons.wikimedia.org/wiki/File%3AUnder_construction_ico...") |
|||
| Line 3: | Line 3: | ||
<a title="By Dsmurat (+) [LGPL (http://www.gnu.org/licenses/lgpl.html)], via Wikimedia Commons" href="http://commons.wikimedia.org/wiki/File%3AUnder_construction_icon-blue.svg"><img width="512" alt="Under construction icon-blue" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Under_construction_icon-blue.svg/512px-Under_construction_icon-blue.svg.png"/></a> | <a title="By Dsmurat (+) [LGPL (http://www.gnu.org/licenses/lgpl.html)], via Wikimedia Commons" href="http://commons.wikimedia.org/wiki/File%3AUnder_construction_icon-blue.svg"><img width="512" alt="Under construction icon-blue" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Under_construction_icon-blue.svg/512px-Under_construction_icon-blue.svg.png"/></a> | ||
</html> | </html> | ||
| + | |||
| + | The [http://www.denon.co.uk/uk/product/pages/product-detail.aspx?catid=hometheatre&subid=avreceivers&productid=avr3808 Denon AV receivers] can be controlled via a serial port or via Ethernet. | ||
| + | |||
| + | = Install xPL serial port = | ||
| + | |||
| + | Install the [[Install serial port#CPAN serial port module|serial port driver]]. | ||
| + | |||
| + | Download the [http://www.dspc.ch/xPL/Downloads/xpl-serial_port.pl serial port xPL device] script. | ||
| + | Move it to xPL scripts directory: | ||
| + | su | ||
| + | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
| + | mv xpl-serial_port.pl $SCRIPTS_BASE_DIR | ||
| + | chown control:users $SCRIPTS_BASE_DIR/*.pl | ||
| + | chmod 775 $SCRIPTS_BASE_DIR/*.pl | ||
| + | |||
| + | Test the serial port device: | ||
| + | su control | ||
| + | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
| + | ll /dev/tty* | ||
| + | $SCRIPTS_BASE_DIR/xpl-serial_port.pl -v -n loungeScreen -b '\x02' -e '\x03' /dev/ttyUSB0 baudrate 9600 databits 8 parity none stopbits 1 handshake none | ||
| + | |||
| + | Open a 2nd terminal window and test the xPL RS-232 control: | ||
| + | su control | ||
| + | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
| + | $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeScreen -c serPort.basic command=POF | ||
| + | $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeScreen -c serPort.basic command=PON | ||
| + | |||
| + | = Install xPL screen controller = | ||
| + | |||
| + | Download the [http://www.dspc.ch/xPL/Downloads/xpl-screen-pana.pl screen controller] script. | ||
| + | Move it to xPL scripts directory: | ||
| + | su | ||
| + | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
| + | mv xpl-screen-pana.pl $SCRIPTS_BASE_DIR | ||
| + | chown control:users $SCRIPTS_BASE_DIR/*.pl | ||
| + | chmod 775 $SCRIPTS_BASE_DIR/*.pl | ||
| + | |||
| + | Test the serial port device: | ||
| + | su control | ||
| + | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
| + | ll /dev/tty* | ||
| + | $SCRIPTS_BASE_DIR/xpl-screen-pana.pl -v -n loungeScreen -s loungeScreen | ||
| + | |||
| + | Open a 3rd terminal window and test the screen control: | ||
| + | su control | ||
| + | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
| + | $SCRIPTS_BASE_DIR/xpl-send.pl -d dspc-scrPana.loungeScreen -c screen.basic power=off | ||
| + | $SCRIPTS_BASE_DIR/xpl-send.pl -d dspc-scrPana.loungeScreen -c screen.basic power=on | ||
| + | |||
| + | = Launch the scripts at startup = | ||
| + | |||
| + | == Ubuntu == | ||
| + | |||
| + | Edit <code>/etc/init/xpl-loungeScreenSerialPort.conf</code>: | ||
| + | # xPL serial port for Panasonic screen | ||
| + | # | ||
| + | description "xPL lounge screen serial port" | ||
| + | version "1.0" | ||
| + | author "Francois Corthay" | ||
| + | |||
| + | #------------------------------------------------------------------------------- | ||
| + | # Configuration variables | ||
| + | # | ||
| + | env SCRIPTS_DIR='/home/control/Documents/Controls' | ||
| + | env SCRIPT_NAME='xpl-serial_port.pl' | ||
| + | env PARAMETERS='-n loungeScreen -b \\x02 -e \\x03 /dev/ttyUSB0 baudrate 9600 databits 8 parity none stopbits 1 handshake none' | ||
| + | |||
| + | #------------------------------------------------------------------------------- | ||
| + | # Start and stop conditions | ||
| + | # | ||
| + | start on (filesystem and net-device-up) | ||
| + | #start on xpl-hub_started | ||
| + | stop on shutdown | ||
| + | respawn | ||
| + | setuid control | ||
| + | setgid dialout | ||
| + | |||
| + | #------------------------------------------------------------------------------- | ||
| + | # Startup signalling | ||
| + | # | ||
| + | post-start script | ||
| + | sudo initctl emit xpl-loungeScreenSerialPort_started | ||
| + | end script | ||
| + | |||
| + | #------------------------------------------------------------------------------- | ||
| + | # Start daemon | ||
| + | # | ||
| + | exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS | ||
| + | |||
| + | Start the serial port and test it: | ||
| + | su root | ||
| + | service xpl-loungeScreenSerialPort start | ||
| + | service xpl-loungeScreenSerialPort status | ||
| + | initctl list | grep xpl | ||
| + | |||
| + | Edit <code>/etc/init/xpl-loungeScreen.conf</code>: | ||
| + | # xPL Panasonic screen controller | ||
| + | # | ||
| + | description "xPL lounge screen screen controller" | ||
| + | version "1.0" | ||
| + | author "Francois Corthay" | ||
| + | |||
| + | #------------------------------------------------------------------------------- | ||
| + | # Configuration variables | ||
| + | # | ||
| + | env SCRIPTS_DIR='/home/control/Documents/Controls' | ||
| + | env SCRIPT_NAME='xpl-serial_port.pl' | ||
| + | env PARAMETERS='-n loungeScreen -s loungeScreen' | ||
| + | |||
| + | #------------------------------------------------------------------------------- | ||
| + | # Start and stop conditions | ||
| + | # | ||
| + | start on xpl-loungeScreenSerialPort_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-loungeScreen start | ||
| + | service xpl-loungeScreen status | ||
| + | initctl list | grep xpl | ||
| + | |||
| + | == Mac OS == | ||
| + | |||
| + | Check the serial port device name: | ||
| + | ll /dev/tty.* | ||
| + | |||
| + | Edit <code>/Library/LaunchDaemons/xpl-loungeAvControllerSerialPort.plist</code>: | ||
| + | <?xml version="1.0" encoding="UTF-8"?> | ||
| + | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| + | <plist version="1.0"> | ||
| + | <dict> | ||
| + | <key>Label</key> | ||
| + | <string>xPL Lounge audio/video controller serial port</string> | ||
| + | <key>OnDemand</key> | ||
| + | <false/> | ||
| + | <key>UserName</key> | ||
| + | <string>control</string> | ||
| + | <key>ProgramArguments</key> | ||
| + | <array> | ||
| + | <string>/Users/control/Documents/Controls/xpl-serial_port.pl</string> | ||
| + | <string>-n</string> | ||
| + | <string>loungeAmp</string> | ||
| + | <string>-e</string> | ||
| + | <string>\x0D</string> | ||
| + | <string>/dev/tty.PL2303-0021111D</string> | ||
| + | <string>baudrate</string> | ||
| + | <string>9600</string> | ||
| + | <string>databits</string> | ||
| + | <string>8</string> | ||
| + | <string>parity</string> | ||
| + | <string>none</string> | ||
| + | <string>stopbits</string> | ||
| + | <string>1</string> | ||
| + | <string>handshake</string> | ||
| + | <string>none</string> | ||
| + | </array> | ||
| + | </dict> | ||
| + | </plist> | ||
| + | |||
| + | Edit <code>/Library/LaunchDaemons/xpl-loungeAvController.plist</code>: | ||
| + | <?xml version="1.0" encoding="UTF-8"?> | ||
| + | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| + | <plist version="1.0"> | ||
| + | <dict> | ||
| + | <key>Label</key> | ||
| + | <string>xPL Lounge audio/video controller</string> | ||
| + | <key>OnDemand</key> | ||
| + | <false/> | ||
| + | <key>UserName</key> | ||
| + | <string>control</string> | ||
| + | <key>ProgramArguments</key> | ||
| + | <array> | ||
| + | <string>/Users/control/Documents/Controls/xpl-avController-DenonAVR.pl</string> | ||
| + | <string>-n</string> | ||
| + | <string>loungeAmp</string> | ||
| + | <string>-v</string> | ||
| + | <string>loungeAmp</string> | ||
| + | </array> | ||
| + | </dict> | ||
| + | </plist> | ||
| + | |||
| + | Load the daemons: | ||
| + | launchctl load /Library/LaunchDaemons/xpl-loungeAvControllerSerialPort.plist | ||
| + | launchctl load /Library/LaunchDaemons/xpl-loungeAvController.plist | ||
| + | launchctl list | grep -i xpl | ||
| + | ps ax | grep -i xpl | grep -v grep | ||
| + | |||
| + | [[Category:xPL]] | ||
Revision as of 17:09, 20 November 2014
The Denon AV receivers can be controlled via a serial port or via Ethernet.
Contents
Install xPL serial port
Install the serial port driver.
Download the serial port xPL device script. Move it to xPL scripts directory:
su SCRIPTS_BASE_DIR=/home/control/Documents/Controls mv xpl-serial_port.pl $SCRIPTS_BASE_DIR chown control:users $SCRIPTS_BASE_DIR/*.pl chmod 775 $SCRIPTS_BASE_DIR/*.pl
Test the serial port device:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls ll /dev/tty* $SCRIPTS_BASE_DIR/xpl-serial_port.pl -v -n loungeScreen -b '\x02' -e '\x03' /dev/ttyUSB0 baudrate 9600 databits 8 parity none stopbits 1 handshake none
Open a 2nd terminal window and test the xPL RS-232 control:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeScreen -c serPort.basic command=POF $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeScreen -c serPort.basic command=PON
Install xPL screen controller
Download the screen controller script. Move it to xPL scripts directory:
su SCRIPTS_BASE_DIR=/home/control/Documents/Controls mv xpl-screen-pana.pl $SCRIPTS_BASE_DIR chown control:users $SCRIPTS_BASE_DIR/*.pl chmod 775 $SCRIPTS_BASE_DIR/*.pl
Test the serial port device:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls ll /dev/tty* $SCRIPTS_BASE_DIR/xpl-screen-pana.pl -v -n loungeScreen -s loungeScreen
Open a 3rd terminal window and test the screen control:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -d dspc-scrPana.loungeScreen -c screen.basic power=off $SCRIPTS_BASE_DIR/xpl-send.pl -d dspc-scrPana.loungeScreen -c screen.basic power=on
Launch the scripts at startup
Ubuntu
Edit /etc/init/xpl-loungeScreenSerialPort.conf:
# xPL serial port for Panasonic screen # description "xPL lounge screen serial port" version "1.0" author "Francois Corthay" #------------------------------------------------------------------------------- # Configuration variables # env SCRIPTS_DIR='/home/control/Documents/Controls' env SCRIPT_NAME='xpl-serial_port.pl' env PARAMETERS='-n loungeScreen -b \\x02 -e \\x03 /dev/ttyUSB0 baudrate 9600 databits 8 parity none stopbits 1 handshake none' #------------------------------------------------------------------------------- # Start and stop conditions # start on (filesystem and net-device-up) #start on xpl-hub_started stop on shutdown respawn setuid control setgid dialout #------------------------------------------------------------------------------- # Startup signalling # post-start script sudo initctl emit xpl-loungeScreenSerialPort_started end script #------------------------------------------------------------------------------- # Start daemon # exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS
Start the serial port and test it:
su root service xpl-loungeScreenSerialPort start service xpl-loungeScreenSerialPort status initctl list | grep xpl
Edit /etc/init/xpl-loungeScreen.conf:
# xPL Panasonic screen controller # description "xPL lounge screen screen controller" version "1.0" author "Francois Corthay" #------------------------------------------------------------------------------- # Configuration variables # env SCRIPTS_DIR='/home/control/Documents/Controls' env SCRIPT_NAME='xpl-serial_port.pl' env PARAMETERS='-n loungeScreen -s loungeScreen' #------------------------------------------------------------------------------- # Start and stop conditions # start on xpl-loungeScreenSerialPort_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-loungeScreen start service xpl-loungeScreen status initctl list | grep xpl
Mac OS
Check the serial port device name:
ll /dev/tty.*
Edit /Library/LaunchDaemons/xpl-loungeAvControllerSerialPort.plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>xPL Lounge audio/video controller serial port</string> <key>OnDemand</key> <false/> <key>UserName</key> <string>control</string> <key>ProgramArguments</key> <array> <string>/Users/control/Documents/Controls/xpl-serial_port.pl</string> <string>-n</string> <string>loungeAmp</string> <string>-e</string> <string>\x0D</string> <string>/dev/tty.PL2303-0021111D</string> <string>baudrate</string> <string>9600</string> <string>databits</string> <string>8</string> <string>parity</string> <string>none</string> <string>stopbits</string> <string>1</string> <string>handshake</string> <string>none</string> </array> </dict> </plist>
Edit /Library/LaunchDaemons/xpl-loungeAvController.plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>xPL Lounge audio/video controller</string> <key>OnDemand</key> <false/> <key>UserName</key> <string>control</string> <key>ProgramArguments</key> <array> <string>/Users/control/Documents/Controls/xpl-avController-DenonAVR.pl</string> <string>-n</string> <string>loungeAmp</string> <string>-v</string> <string>loungeAmp</string> </array> </dict> </plist>
Load the daemons:
launchctl load /Library/LaunchDaemons/xpl-loungeAvControllerSerialPort.plist launchctl load /Library/LaunchDaemons/xpl-loungeAvController.plist launchctl list | grep -i xpl ps ax | grep -i xpl | grep -v grep