|
|
Line 1: |
Line 1: |
− | 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. | + | The Denon AVR 3808 can be controlled in 2 ways: |
| + | * via a [[Install AVR 3808 serial|serial port]]. |
| + | * via [[Install AVR 3808 telnet|Ethernet]]. |
| | | |
− | = Install xPL serial port =
| + | [[Category: install]] [[Category: xPL]] |
− | | + | |
− | 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 loungeAmp -e '\x0D' /dev/ttyUSB1 baudrate 9600 databits 8 parity none stopbits 1 handshake none
| + | |
− | | + | |
− | Open a 2nd terminal window and view the xPL messages:
| + | |
− | su control
| + | |
− | SCRIPTS_BASE_DIR=/home/control/Documents/Controls
| + | |
− | $SCRIPTS_BASE_DIR/SCRIPTS_BASE_DIR/xpl-monitor.pl -vf
| + | |
− | | + | |
− | Open a 3rd 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.loungeAmp -c serPort.basic command='PWON'
| + | |
− | $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeAmp -c serPort.basic command='PW?'
| + | |
− | $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeAmp -c serPort.basic command='PWSTANDBY'
| + | |
− | $SCRIPTS_BASE_DIR/xpl-send.pl -v -d dspc-serPort.loungeAmp -c serPort.basic command='PW?'
| + | |
− | | + | |
− | = Install xPL screen controller =
| + | |
− | | + | |
− | Download the [http://www.dspc.ch/xPL/Downloads/xpl-avController-DenonAVR.pl AVR controller] script.
| + | |
− | Move it to xPL scripts directory:
| + | |
− | su
| + | |
− | SCRIPTS_BASE_DIR=/home/control/Documents/Controls
| + | |
− | mv xpl-avController-DenonAVR.pl $SCRIPTS_BASE_DIR
| + | |
− | chown control:users $SCRIPTS_BASE_DIR/*.pl
| + | |
− | chmod 775 $SCRIPTS_BASE_DIR/*.pl
| + | |
− | | + | |
− | Test the AVR controller:
| + | |
− | su control
| + | |
− | SCRIPTS_BASE_DIR=/home/control/Documents/Controls
| + | |
− | $SCRIPTS_BASE_DIR/xpl-avController-DenonAVR.pl -v -n loungeAmp -s loungeAmp
| + | |
− | | + | |
− | Open a 3rd terminal window and 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 scripts at startup =
| + | |
− | | + | |
− | == Ubuntu ==
| + | |
− | | + | |
− | Edit <code>/etc/init/xpl-loungeAvControllerSerialPort.conf</code>:
| + | |
− | # xPL serial port for Denon AV receiver
| + | |
− | #
| + | |
− | description "xPL lounge audio-video controller 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 loungeAmp -e '\x0D' /dev/ttyUSB1 baudrate 9600 databits 8 parity none stopbits 1 handshake none'
| + | |
− |
| + | |
− | #-------------------------------------------------------------------------------
| + | |
− | # Start and stop conditions
| + | |
− | #
| + | |
− | start on xpl-hub_started
| + | |
− | stop on shutdown
| + | |
− | respawn
| + | |
− | setuid control
| + | |
− | setgid dialout
| + | |
− |
| + | |
− | #-------------------------------------------------------------------------------
| + | |
− | # Startup signalling
| + | |
− | #
| + | |
− | post-start script
| + | |
− | sudo initctl emit xpl-loungeAvControllerSerialPort_started
| + | |
− | end script
| + | |
− |
| + | |
− | #-------------------------------------------------------------------------------
| + | |
− | # Start daemon
| + | |
− | #
| + | |
− | exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS
| + | |
− | | + | |
− | Start the serial port and test it:
| + | |
− | su root
| + | |
− | service xpl-loungeAvControllerSerialPort start
| + | |
− | service xpl-loungeAvControllerSerialPort status
| + | |
− | initctl list | grep xpl
| + | |
− | | + | |
− | 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-serial_port.pl'
| + | |
− | env PARAMETERS='-n loungeAmp -s loungeAmp'
| + | |
− |
| + | |
− | #-------------------------------------------------------------------------------
| + | |
− | # Start and stop conditions
| + | |
− | #
| + | |
− | start on xpl-loungeAvControllerSerialPort_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 | 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]] | + | |