Author Topic: Dusky Sky Controller  (Read 34847 times)

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dusky Sky Controller
« Reply #15 on: June 14, 2011, 04:27:21 pm »
Thanks Andrew!

Back to things lmce - how have you the dusky devices integrated in the systems you supply?

thanks,
-Coley.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Dusky Sky Controller
« Reply #16 on: July 04, 2011, 02:18:18 pm »
Thanks Andrew!

Back to things lmce - how have you the dusky devices integrated in the systems you supply?

thanks,
-Coley.

We use our DCEwhisperer API for all our devices and that applies to the Dusky too. We have a Sky remote screen and we treat Sky boxes (and other devices like BluRay players) as 'External Devices' that accessible from the main menu screen.

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

uplink

  • Administrator
  • Guru
  • *****
  • Posts: 192
  • Linux and LinuxMCE witchdoctor
    • View Profile
Re: Dusky Sky Controller
« Reply #17 on: July 12, 2011, 04:28:56 pm »
We can't easily port the Dusky control from Dianemo to LinuxMCE, since we diverged from the standard way of doing things. It's not easy mainly because I have no idea how this is properly done (and hence the reason why Dianemo diverged :P)

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #18 on: January 17, 2012, 12:38:39 am »
Hi all,

I've tried to get this working for the past 2 years as a gsd, and have picked it up again a couple of days ago.The furthest I've got is a template which  registers but will not work because "no com port specified".wether ComPortOnPc is used as a device data field or not

Udevadm info reports it as ....../hiddev0

After an intense  weekend of research, I contacted J. Heenan ,the manufacturer, who has kindly provided the following 

Quote
""
Hi Ian,

Right, I think I'm starting to understand a bit.

The basic issue is that the 'Generic Serial Device' driver in Lmce is intended only to talk to serial devices (or, oddly, network connections), and the USB dusky is not a serial device. It doesn't even pretend to be a serial device (lots of usb devices are actually serial devices with a usb <-> serial converter built in, but not the dusky).

The USB dusky is based around a PIC16C745 - it doesn't present anything like a serial interface, it is (in USB terms) a 'HID' device. You talk to it by providing binary packets of data to the linux USB HID subsystem.

There's probably 3 approaches that might work:

1) (Easiest) Swap your USB dusky for a serial model. That should then be directly possible to use with the GSD

2) Write a network listener that accepts commands from the lmce GSD and calls 'sky-control' to pass them to the sky box. It's probably still quite a lot of work though, I don't really fully understand what would be necessary and it's probably not a very clean solution.

3) (Hardest, I think) write a lmce 'device driver' that talks directly to the USB dusky, reusing the 'sky library' code that's used in sky-control.

Hope that helps!

Cheers,

Joseph
"
End Quote

SO......can anyone suggest a workaround without me having to learn C++?
           or would anyone of you beautiful genii  hazard an estimate for writing the driver ?
                    tho I must say  it's unlikelythat I could afford this option on my own--- any other USB Dusky owners willing to chip in?


          .can anyone direct me to  a good beginners book on C++  ?
           does anyone have any experience with the PIC16C745...?
          can anyone suggest  a similar/any lmce device that has a  C driver, so I can study it's code?


regards

Ian












                     

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Dusky Sky Controller
« Reply #19 on: January 17, 2012, 01:36:40 am »
We all can help you write the driver, the first place to start, is to read the Developing a DCE page in the wiki; to get a development environment started.

Where is this library he is talking about? I would like to look at the API, I can guide you a bit.

-Thom

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #20 on: January 17, 2012, 02:57:39 am »
Hi thom
thanks for the response,

library, and other software at http://www.dusky-control.com/docs.shtml


regards

Ian
« Last Edit: January 17, 2012, 02:59:38 am by maybeoneday »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Dusky Sky Controller
« Reply #21 on: January 17, 2012, 05:05:55 am »
Basically the C library needs to be taken and put into a DCE C++ device. Each command stub made by DCEGen needs to call an equivalent function inside the aforementioned C library to do the right thing.

-Thom

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #22 on: January 17, 2012, 05:25:53 am »
Hi Thom,
many thanks for speedy response,

so , and forgive a complete (pre-)Newbie  programmer if I'm spouting gibberish...but is this a reasonable
 plan ?

       1......set up dev environment as per wiki
       2.......generate  basic driver 
       3........examine existing code  and newly generated (would Doxygen be helpfull ?)
       4.........translate c to c++ functions
       5.........have a nervous breakdown

do you honestly think this is achievable for a complete novice, given that I have a fair amount of free time ?


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Dusky Sky Controller
« Reply #23 on: January 17, 2012, 05:29:36 am »
Yes, it is. Just be patient, and take it one step at a time.

If you wish, you can stop by #linuxmce-devel on IRC (server irc.freenode.net), as I tend to hang out there with the other developers, and can help you there, much more quickly.

-Thom

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #24 on: January 17, 2012, 01:16:09 pm »
I am pleased to announce the birth of a little code  !!!! ;D ;D ;D ;D ;D
.........concieved in trepidation at 05:50  (first install of 10.04)...
..........birthed by DCEGen at  11:45 today,
...........fathered by my "hunt and peck" right index finger

     ..........midwifery duties  most excellently performed by  the developers and contributors (forums and wiki).....thank you all.


Many thanks  for the encouragement thom, have you any suggestions regarding a "simple"  IDE   ?

BTW   I'm taking notes on every step for a wiki entry,

If any other " novice" would like to make this a joint project  SHOUT NOW  please,

regards,
Ian




coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dusky Sky Controller
« Reply #25 on: January 17, 2012, 02:05:01 pm »
Ian,
Suppose I should dust off my lmce hat and get stuck back in here!!
As you gather from the thread I have one of these devices too.
I had started a C++ dce device but lost the hd and lmce install that was on :(

Does your Dusky device control just the one sky box? or has it more than one o/p?

-Coley.

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #26 on: January 17, 2012, 03:22:38 pm »
Hi coley

2 ports ,on mine,........ but from what I've managed to pick up so far that shouldn't be a prob,

........you're not a closet coder by any chance ?

Ian

edit ...coley what you doing here ,you've a little girl,  ;D ;D ;D  congrats

« Last Edit: January 17, 2012, 03:53:09 pm by maybeoneday »

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dusky Sky Controller
« Reply #27 on: January 17, 2012, 03:42:51 pm »
;D never been referred to as a closet coder, but yep can code have the t-shirt!
-Coley.

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Dusky Sky Controller
« Reply #28 on: January 17, 2012, 04:04:08 pm »
 ;D ;D  ;D

coley

 are you on 810   or 1004 ?
are you up for making it a collaborative effort, or  do you prefer to be alone in your closet ? 
          (bear in mind that I'm on a VERY steep learning precipice here, so altho I've got time ,I'm  gonna be slow SOoh slow     :(

Ian

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Dusky Sky Controller
« Reply #29 on: January 17, 2012, 04:14:48 pm »
I run 1004 but can have either 810 or 1004 as a VM for testing.
Collaboration is good, I'm up for it.
Hopefully I can make more time for this than I have been doing.

-Coley.