
Installation - Dusky Control linux command line app
===================================================

Hardware install (USB)
----------------

Connect the sky control device to a free usb port.

Connect the RF2 output on the sky/sky+ box to one of the RF connectors on
the sky control.

(Ensure that any aerial amplifiers you have connected between the sky box
and the sky control device are 'magic eye' compatible, or they will block
the remote control signal.)

Pre-requisites (linux)
--------------
You need to have the 'libusb-dev' package installed. (On systems that use
rpm, this may instead be called 'libusb-devel'.)

Pre-requisites (Mac OS X)
--------------

You need to install the  xcode developer tools from apple which includes gcc.
Goto:

http://connect.apple.com

you need to register and login, then go to:

Downloads
Developer tools 
xcode developer tools. 

libusb for Mac OS X is available here:

http://www.ellert.se/PKGS/libusb-2008-09-27/

Details on use with EyeTV and SerialChannelSky are here:

http://www.cooldvr.com/Skybox.html

To build
--------

Run the command 'make'.

To install
----------

Run the command 'make install' as user 'root'.

Example commands (USB controllers only)
---------------------------------------

switch sky digibox on and send channel '105' (channel five):

sky-control --sky --channel 105


switch sky+ on and send channel '105' (channel five):

sky-control --sky+ --channel 105

switch sky+hd on and send channel '105' (channel five):

sky-control --sky+hd --channel 105


send channel 123 to sky digibox on controller 0, output 1:
sky-control --controller 0 --output 1 0001 0002 0003

send channel 356 to sky+ on controller 0, output 2:
sky-control --controller 0 --output 2 0C03 0C05 0C06


Example commands (RS232/Serial controllers only)
------------------------------------------------

send channel 123 to sky+ digibox on output 0 on a controller connected to
/dev/ttyS0:
./sky-control --scontroller /dev/ttyS0 --sky+ --channel 123


Full list of remote codes
-------------------------

http://www.dusky-control.com/sky-control-codes.shtml


Integrating to mythtv
---------------------

To integrate with mythtv, run 'make install', then setup mythtv:

Set the external channel changing command (in the 'input connections'
settings) to:

    /usr/local/bin/sky-control --output 1 --sky --channel

(Change --sky to --sky+ or --sky+hd as required.)

Then when setting up channels, set the 'frequency id' to be the three digit
sky channel number.


Using feedback from the sky box
-------------------------------

If you connect a standard serial cable from the sky box RS-232 port to a
serial port on your PC, you can make sky-control wait for confirmation
from the sky box that the channel has been successfully selected.

To do this, add the --feedback option, specifying the relevant serial port.

For example:

./sky-control --sky+ --feedback /dev/ttyS0 --channel 106

If the channel change fails, the exit code will be non-zero.


Advanced usage
--------------

If you want to try tuning the controller to send key presses faster, please
look at send_setup_command() in sky-control.c and tweak the first two
values in that function. Then run make and sky-control --setup. Note
that any setup will be lost as soon as the controller is unplugged from usb
or the PC switched off.

Please note that the default settings were carefully chosen to ensure that
no commands are ever ignored or dropped when sent to a variety of sky
digiboxes. If your sky controller becomes unreliable, please go back to the
default settings.


Credits
-------

Thanks to:

Neale Swinnerton for providing the code for the --channel option.
Alan Murphy for providing the code for incorporating s/d/x into the
channel strings.

LICENSE
-------

Copyright (C) 2005-2008 Joseph Heenan. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


-- 
joseph@dusky-control.com
