Author Topic: Need help writing a driver for a multizone amplifier for LinuxMCE  (Read 1559 times)

domanows

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Folks,

I want to try and contribute back to the LinuxMCE project, but I need a little push in getting going.  I found a great multizone amplifier to push audio throughout my house from Home Theater Direct (http://www.htd.com/s.nl/it.A/id.632/.f)  They sent me the Serial SDK.  It looks like I should be able to write a perl wrapper for it, but I have never programmed any serial control devices.  I have done a lot with XML and EDI, so this doesn't look more difficult, just different.  My biggest issue is determining what the input and output should look like.  I am a little confused on the checksums and TX versus RX. Additionally, is there any caveats to opening and closing the serial port.  Can anyone give me some advice on how to get started? 

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 884
  • Living with LMCE
    • View Profile
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #1 on: March 28, 2009, 12:49:54 am »
Hi,

search Wiki and forum for Marantz GSD code. If I remember right, Hari did GSD for Marantz as single zone device, and I did GSD code for Marantz as 2-zone amplifier (it's somewhere on older Mantis as contributed enhancement). I also did GSD for ESS speaker selector (posted on wiki). I guess your device is something like "Marantz + ESS".

I see that MC-66 is pretty close to ESS device. MCA-66 is more like addition of amplifier - like Marantz... What I did with ESS is to make template for generic audio zone (with source selection and volume controls) and then created parent device as DCE container (all DCE messages will arrive there) and as many zone children as there are in your device. Then you connect all your audio sources to separate child zones, while you do all DCE-GSD processing in parent device and send proper sequences over rs232 to actual device. I think this is pretty sound approach for all multizone/multisource devices...

Regards,

Bulek.
« Last Edit: March 28, 2009, 12:58:09 am by bulek »
Thanks in advance,

regards,

Bulek.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2925
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #2 on: March 28, 2009, 10:28:21 am »
Also, eNoodle did a multiroom setup and iirc he did document his findings in the wiki as well.
eNoodles user page
« Last Edit: March 28, 2009, 09:37:49 pm by posde »

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 884
  • Living with LMCE
    • View Profile
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #3 on: March 28, 2009, 07:50:40 pm »
Also, eNoodle did a multiroom setup and iirc he did document his findings in the wiki as well.
[urlhttp://wiki.linuxmce.org/index.php/User:ENoodle][/url]
I've read it. I personally think that doing parent device and zone children devices is a bit better approach, cause it's scalable to multiple zones.... At the end, you end up writing custom Ruby code for your device, but that is solely done in parent device.

It would be nice to have some discussion about this, cause we can prepare things already in 8.10 for such setups...

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

domanows

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #4 on: March 30, 2009, 07:43:12 pm »
Thanks for all the input.  I looked at the Marantz code.  It looks like I am going to need to learn Ruby.  I am not averse to using Ruby if that is the LinuxMCE standard, but does anyone use perl for these types of drivers?

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2925
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #5 on: March 30, 2009, 07:54:12 pm »
domanows,

the Generic Serial Device, which is used to control devices, uses Ruby. We have no equivalent in Perl. You will get the hang of Ruby fairly fast, and in contrast to what some people say about Perl (it being a write-only language :) ), Ruby can be quite beautiful to read ;)

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #6 on: March 31, 2009, 05:24:00 pm »
That is a nice price for a mulit-room control/amp, I will be very interested to see how this progresses along. (I have a manual push button one currently and it kind of defeats the whole HA theme I am going with)

domanows

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #7 on: April 01, 2009, 05:45:14 pm »
Looking into Ruby.  I'll keep you posted

rlb2

  • Regular Poster
  • **
  • Posts: 16
    • View Profile
Re: Need help writing a driver for a multizone amplifier for LinuxMCE
« Reply #8 on: April 03, 2009, 09:55:18 pm »
I would be interested in it as well.  I'll keep checking back on this thread.  THANKS!  Rob