LinuxMCE Forums

General => Developers => Topic started by: domanows on March 27, 2009, 07:13:56 pm

Title: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: domanows on March 27, 2009, 07:13:56 pm
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? 
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: bulek 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.
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: Marie.O 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 (http://wiki.linuxmce.org/index.php/User:ENoodle)
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: bulek 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.
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: domanows 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?
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: Marie.O 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 ;)
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: krys 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)
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: domanows on April 01, 2009, 05:45:14 pm
Looking into Ruby.  I'll keep you posted
Title: Re: Need help writing a driver for a multizone amplifier for LinuxMCE
Post by: rlb2 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