Author Topic: Dusky Sky Controller  (Read 7776 times)

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Dusky Sky Controller
« on: October 16, 2008, 09:50:41 am »
Hi all,
ref  www.dusky-control.com
I've been playing with this for some time from the cli,and would really like to be able to use it in LMCE,

I know that TotallyMaxed and his team have done some work in this area , so the question is , does anyone have a working template/gsd that I could beg,  borrow, steal, or..... (takes deep breath)   buy ?

Before I get slapped, I know  ideally I should do this myself but having looked into it previously, I 've realised how limited my abilities are !!

regards,

Ian

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #1 on: January 10, 2009, 12:48:07 pm »
bump

(sorry)

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Dusky Sky Controller
« Reply #2 on: January 10, 2009, 01:35:48 pm »
Hi all,
ref  www.dusky-control.com
I've been playing with this for some time from the cli,and would really like to be able to use it in LMCE,

I know that TotallyMaxed and his team have done some work in this area , so the question is , does anyone have a working template/gsd that I could beg,  borrow, steal, or..... (takes deep breath)   buy ?

Before I get slapped, I know  ideally I should do this myself but having looked into it previously, I 've realised how limited my abilities are !!

regards,

Ian

Hi,

We have this working now. But its not packaged up in a way that I can provide it too you right now. We use our DCEwhisperer and a new SkyControl device to implement it... The DCEwhisperer is a Bash interface to DCE...which we also use in our Bash-DCE-KNX device... see here http://wiki.linuxmce.org/index.php/Bash_dce_knx.

So if you can wait a short while (a few weeks is my best estimate...) then we will clean it up and write some docs and get it up on the Wiki for you and others to improve ;-)

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

ajward

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Dusky Sky Controller
« Reply #3 on: January 10, 2009, 09:25:40 pm »
Hi there.

I've been playing in this area too (controlling a Sky box from LinuxMCE with the Dusky Control device). Not sure whether to post this as a new topic, but since I'm trying to do the same thing as you are, I thought I'd do it this way.

I have the dusky-control device working (couldn't get it working reliably on IR).

I've had a MythTV setup for a while, so I thought I'd have a go with LinuxMCE.

I'm a competent C++ programmer, and various other relevant things besides, so I thought it would be straightforward (As straightforward as anything is - don't forget I've compiled MythTv from sources, and upgraded about the last 6 releases).

I could use the Linux command line tool, but that only provides channel changing (I'd like to use the LinuxMCE pass-through capabilities to get to the on-demand and programme guide stuff sometimes). Still, I thought I'd try the Ruby snippet approach, just to get it going. Boy, was that a mistake.

Is it me, or is the LinuxMCE Wiki seriously out of step with the code? I thought I could figure most things out from a good worked example, but I can't seem to get to any existing Ruby snippets.

For example, I tried http://wiki.linuxmce.org/index.php/GSD_-_Ruby_codes, but it doesn't tell me where to put the fragments. It's something to do with Ruby internal commands, but it isn't clear where you put the cmd = Command.new( <device from>, <device to>, <priority>, <type>, <id>)

I thought I'd try following the instructions here...

Quote
For Generic Serial Devices the architecture allows implementing the commands directly from the LinuxMCE Admin Web Page, using Advanced/Device Templates. After picking the device template, select ruby codes and add the command groups that you want to implement (should be supported by the devices for which you want to create the template)

...but if you try that, there's no help on the syntax of what you can put in there. OK, I went googling, and worked out that you put it as a series of bytes in <>. But then I've got to reverse engineer Ruby to work out how to extract (say) the channel number digits that come in cmd.params_["ProgramID"]. No help on that anywhere I can find.

So then, I thought I'd have a look at a non-trivial example elsewhere, and I found this on the Wiki http://wiki.linuxmce.org/index.php/Control_A/V_equipment_with_RS232/USB/Ethernet. It suggests that if you
Quote
Click Advanced, Device Templates, Manufacturer: Denon, Category: A/V - Amps/receivers, Model: AVC-A1SRA (RS232), and click "Edit". Under "Infrared Groups", click the "Edit Commands" next to "Denon AVR/AVC protocol #1300"
...those instructions seem to be wrong. I think it's...
Quote
Click Advanced, Configuration, Device Templates, Manufacturer: Denon, Category: A/V - Amps/receivers, Model: AVC-A1SRA (RS232), and click "Pick Device Template" (there is no "Edit"). Under "Infrared Groups", click the "Edit Commands" next to "Denon AVR/AVC protocol #1300"

...there is no InfraRed Groups, there is no Edit commands button next to "Denon AVR/AVC protocol #1300". Either I'm doing something wrong, or the Wiki is seriously out of step with the Admin site.

One final try with a worked example. Oh, here's another one that looks tantalising.... http://wiki.linuxmce.org/index.php/Here_is_a_detailed_example_of_how_to_add_Clipsal_Interface_using_Generic_Serial_Device. Unfortunately, although it goes much further discussing the uses of the Ruby internal commands (Private Method Listing et al), there is no Clipsal implementation example in the standard implementation. So I'm still stuck with instructions that don't quite fit the software.

I gave up on the Ruby snippet approach at that point.

The Dusky source code makes it apparent that the Dusky USB control device is a HID USB implementation, not serial. The C# examples make it clear what the code would look like in Linux/C++.

Frankly, I have some experience of USB programming, and HID devices are only "simple" in the sense that they don't require device driver debugging. In every other way, they're a bewildering maze of compexity. I think it's unlikely I can get a HID device to work without C++ code.

OK, so let's try the C++ approach. Define the device template, and using the instructions here http://wiki.linuxmce.org/index.php/Cpp. The instructions say...

Quote
To create your C++ project, run DCEGen, which will be in /usr/pluto/bin on Linux or \pluto\bin on Windows. Add a -d [device template id] parameter. Your device template id is shown after the description input box.

...so off we go, create the Dusky device, and run DCEGen. I get an error saying it can't find any of the templates. It seems to be looking in the filesystem for them, but I would expect it to look in the pluto_main database.

Clearly I've got a lot to learn, and clearly I'm not going to learn it from the documentation! If any of this rambling contains any obvious errors, please someone let me know otherwise I'm going to be stumbling around for a while.

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #4 on: January 10, 2009, 10:46:17 pm »
Hi Andrew, ajward,

Brilliant news andrew,
                a) does this also imply that sky-plugin will then be integrated into vdr/lmce ? (as opposed to the "liveTV" setup I'm using at present)
                b) will this be in 0810 releases ? (as and when... ;)   )   
 
I'm really looking forward to this,....MANY thanks for your (& your team's ?) efforts.


@ ajward ,



I could use the Linux command line tool, but that only provides channel changing (I'd like to use the LinuxMCE pass-through capabilities to get to the on-demand and programme guide stuff sometimes).


......have you seen this,  /www.dusky-control.com/sky-control-codes.shtml      ,which gives all the extra codes (tho I've only used channel changing thro' cli )
 I'm really sorry I can't be of  any real use ,(unless you want "hello world")  on  the programming, but  I'd be very happy  to test (given clear instructions) or possibly type up your notes/docs (from sound files ?)

FWIW it may be more productive to post seperate specific queries,I'm sure you'll get plenty of support , given  your talents and obvious efforts,

best regards,
Ian





ajward

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Dusky Sky Controller
« Reply #5 on: January 11, 2009, 01:07:17 am »
Hi Ian,

I hadn't seen the additional codes, but there's no reason why the LinuxMCE device can't support them. I was just planning to use the codes from the Windows SkyController executable from Dusky Control. The button names and function names are actually supplied by an XML file, button.xml (and that only gives the functions of the standard Sky Remote).

Of course, untested code is useless code, and I don't have a sky navigator so don't assume all those extra codes will work!

My interpretation of totallymaxed's post is that his effort is concentrated on the diademo sky controller device rather than the dusky device (I could be wrong). If he's planning to support the Dusky device (or the diademo device is the Dusky device badged), we're duplicating effort (although his approach seems to be via a shell script wrapper, rather than C++).

Personally, I'm planning to use MythTV rather than VDR. Since the C++ device should end up as a shared library (.so), there should be a way to make it known to an existing (710) installation, and support VDR as well. I'm not plugged into the LinuxMCE developer community yet, so this is me working on my own for the moment.

Just as a bit of background, plans are well advanced to build my own house in Hampshire UK, and I plan to use LinuxMCE as the automation system. Since I'll probably end up putting all the wiring and plumbing in myself, a few device handlers isn't too much of a challenge!

Cheers,
Andy Ward

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #6 on: January 11, 2009, 08:15:12 am »
Hi Andy,
LMAO at "plumbing/event handlers"..........exactly what I thought when I first saw GSD on wiki and apparent ease of implementation....
Good luck with the house......different project ...similar heartache ;)

Can I ask why Myth ? just familiarity  ?     I followed  conventional wisdom  that VDR is more suited to DVB,plus the multi recording from different muxes, which myth doesn't appear to implement.

As for developers, as an avid reader of all posts ,it strikes me that ALL of them are very helpfull, cryptic  maybe, ascerbic sometimes ,but not much seems to pass un noticed, so I'd urge you to post if and when you get stuck, just try to avoid the call for popcorn  ;D ;D

As for the extra codes, I'l try these out  and let you know,

regards ,
Ian

EDIT
Andy, codes appear to work ok   BUT output 1 on the dusky is actually "--box 0" in format below,still 1 in short format,
linuxmce@dcerouter:~$ sky-control --controller 0 --box 0 0C03 0C05 0C06
linuxmce@dcerouter:~$ sky-control --controller 0 --box 0 0C7D
linuxmce@dcerouter:~$ sky-control --controller 0 --box 0 0CF5
linuxmce@dcerouter:~$ sky-control --controller 0 --box 0 020C
linuxmce@dcerouter:~$ sky-control --controller 0 --box 0 020C

I've tried all interactive codes and they (sky+ codes only) are ok  ,no idea  how to test in ASCII/ binary as stumbling block  is lack of knowledge on how to  determine which USB port, and how to address it ,
regards,
Ian
« Last Edit: January 11, 2009, 10:38:24 am by maybeoneday »

ajward

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Dusky Sky Controller
« Reply #7 on: January 11, 2009, 06:37:50 pm »
Hi Ian,

Quote
Can I ask why Myth ? just familiarity  ?     I followed  conventional wisdom  that VDR is more suited to DVB,plus the multi recording from different muxes, which myth doesn't appear to implement.

Well, first of all, I started with just an NTL cable box (no DVB). And a lot of the other stuff MythTv uses (transcode, xine, xmltv, ...) I'd played with before. In the UK digital TV can most easily be handled through a cheap set top box, and then MythTV is fine. So just horses for courses I suppose.

I got involved in the Sky stuff because we can't get cable out here - I'm surrounded by fields: 3 miles from the nearest village, 1 1/2 miles from the nearest neighbour. Took me long enough just to get ADSL working!

Quote
I've tried all interactive codes and they (sky+ codes only) are ok  ,no idea  how to test in ASCII/ binary as stumbling block  is lack of knowledge on how to  determine which USB port, and how to address it.

USB might be the logical successor to RS232, but it's a couple of orders of magnitude more complicated. The software that gets written behind the scenes just to have it plug in and work you would not believe. The HID standard is intended for things like mice and keyboard originally, and just to get a simple exchange of a few bytes needs a lot of setup. Just take a look at the C# code for the Windows sky controller (skyController.cs, HID.cs, API.cs) - C# isn't too frightening if you've ever seen object-oriented languages before.

As I say, I will take a stab at this, and at least in Linux I can find any amount of USB and LinuxMCE HID source code examples.

Cheers,
Andy ward.

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #8 on: January 11, 2009, 07:14:49 pm »
Andy ,
thanks for response,
if I can make any contribution , with legwork research    ...whatever
just shout

regards,
Ian

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Dusky Sky Controller
« Reply #9 on: January 11, 2009, 07:42:37 pm »
Hi Ian,

I hadn't seen the additional codes, but there's no reason why the LinuxMCE device can't support them. I was just planning to use the codes from the Windows SkyController executable from Dusky Control. The button names and function names are actually supplied by an XML file, button.xml (and that only gives the functions of the standard Sky Remote).

Of course, untested code is useless code, and I don't have a sky navigator so don't assume all those extra codes will work!

My interpretation of totallymaxed's post is that his effort is concentrated on the diademo sky controller device rather than the dusky device (I could be wrong). If he's planning to support the Dusky device (or the diademo device is the Dusky device badged), we're duplicating effort (although his approach seems to be via a shell script wrapper, rather than C++).

Personally, I'm planning to use MythTV rather than VDR. Since the C++ device should end up as a shared library (.so), there should be a way to make it known to an existing (710) installation, and support VDR as well. I'm not plugged into the LinuxMCE developer community yet, so this is me working on my own for the moment.

Just as a bit of background, plans are well advanced to build my own house in Hampshire UK, and I plan to use LinuxMCE as the automation system. Since I'll probably end up putting all the wiring and plumbing in myself, a few device handlers isn't too much of a challenge!

Cheers,
Andy Ward

Hi Andy/Ian,

Our Sky Control device is a DCE device that actually talks to a Dusky (or Dusky's in fact)... so it might be better to call it a Dusky Device really. We currently have it installed in customer installations currently controlling upto 2 SkyHD boxes (its compatible with all the codes the Dusky's support... ie the Sky+ & Sky DigiBox too), capturing the video ouput using a capture card and either routing those as mpeg2 streams around the network and then using the IPtv vdr plugin to receive them (each Skybox appears as a 'channel' in the vdr channel list in this config).

A second config is also supported; in this config we use Component or HDMI matrix switchers (IP controllable) to route the video over dedicated dual CAT5  runs to the screens around the house. In this configuration the MD's are all racked and we use HDMI-CAT5 Transmitters/Receivers to get the video signal out to the screen and another CAT5 to extend a USB connection out to the screen so that we only have IR Tranceivers, Keyboards and other devices in the room with the Screen - NO MD. These video matrix configs support upto 16 remotely located screens with all MD's centrally racked.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #10 on: January 11, 2009, 08:02:09 pm »
Andrew,
all this sounds amazing, and tbh I'm not fully taking it in,  NO MD's   ?? 
if I can 'push' a little,
will this be part of 0810? i.e not only Dianemo systems,  (get back to work, devs  ;D ),

what hardware/capture cards are required?

many thanks,(we are not worthy  ;D )

regards,
Ian



ajward

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Dusky Sky Controller
« Reply #11 on: January 11, 2009, 09:08:45 pm »
Hi Andrew/Ian,

Quote
will this be part of 0810? i.e not only Dianemo systems,  (get back to work, devs  Grin ),

what hardware/capture cards are required?

Ian: not much of what Andrew's talking about has to be done through Diademo equipment. So it should be possible on 810 with or without Andrew's Company. On the other hand, the Diademo stuff looks pretty good. Why not?

Andrew: thanks for the summary. I've rummaged through your site, and the components you offer are IMHO well put together for LinuxMCE. I know your bias is the total home solution, and I think that combined with substantially better value for money than the AMD/Crestron/Clipsal approach is a winning combination.

I haven't decided whether to go centralised or distributed yet, but I'm leaning towards distributed.

Routing HDMI over dual-CAT-5 is expensive, and not very flexible it seems to me. I can see why you have to offer it - it's about the only way to offer the ultimate HD multi-room experience without clutter.

Sky-HD is a pain in the butt: the only decent HD source, and it requires the box to see the TV directly over HDMI. Awkward (but not impossible) to put something like LinuxMCE in the way.

To be honest, HD is an awful lot of money for very little improvement in the viewing experience.

IPTv seems like a good solution, as long as we don't run out of bandwidth. VideoLan showed me how capable that approach could be.

Can't do that for HD, though.

Roll on 50Mbit ISPs and TV-over-internet I say.

Cheers,
Andy Ward