Author Topic: [Solved] Need LinuxMCE guru for multizone setup  (Read 5934 times)

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
[Solved] Need LinuxMCE guru for multizone setup
« on: November 06, 2008, 08:47:43 am »
I'm currently working on my living room setup (http://wiki.linuxmce.org/index.php/User:ENoodle).

The system itself works perfect, the two additional soundcards are already configured and working as squeezeboxes. This means I have a MD and two squeezeboxes available in my living room. The Receiver is connected to the MD and is controlled using RS232, it is working, but the multizone functionality isn't. This is where I need some hints.

The Yamaha RX-Vx Template (guess it was #1752) has three child templates, one OTA tuner, two output zones. How can I make use of the output zones? The commands are processed by the parent this is clear to me, but there is no way for me, connecting them to one of the squeezeboxes or to assign any other input source. Shouldn't they have inputs, so that I can connect an input source, something like the receiver itself has?

If I can't get this to work, shouldn't the following work for me:

  • [mainzone] Create a template for the receiver, with all the inputs and outputs and the ruby codes only for the mainzone.
  • [zone2] Create a template for an output zone and configure it the same way as the receiver. Then add the ruby codes for zone2.
  • [tone3] Create a second template for the audio zone, this time with the ruby codes for zone 3.

When finished creating all the device templates, I'll add these three devices and connect squeezebox1 to zone2, squeezebox2 to zone3 and the MD stuff to the mainzone. That way all the commands should be routed correctly and I should get perfect audio/video pipes.

What do you guys think, even if this isn't the correct linuxmce way, should this work or are there any other problems (maybe I can't control three devices on one serial port)?

Thanks in advance,
eNoodle
« Last Edit: November 09, 2008, 01:15:03 pm by eNoodle »

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Need LinuxMCE guru for multizone setup
« Reply #1 on: November 06, 2008, 01:21:08 pm »
Hi,

AFAIK, templates for audio receivers are currently not implemented in multiple audio zone scenario of usage....

I did get through this path with Marantz receiver and it kind of works....

Kind of old and not updated description is here in case you'll get some idea...

http://wiki.linuxmce.org/index.php/Marantz_SR5600

What I did in few points is this :
1. enhanced existing Zone device (so it behaves similar to "normal" single zone audio receiver)
2. made receiver as parent of 2 Zone child devices
3. so I connect actual devices to each child Zone device and not to parent Audio receiver device
4. I parse commands that are received on parent device, decide for which zone are they destined and then send appropriate rs232 commands...

I've contributed my changes as Marantz-Multi room template on Mantis, but currently don't know what and when will happen...

But currently there are few problems (if you search for my posts to forums) - the biggest is that LMCE currently doesn't support direct connection of SW Xine player to Audio receiver - it was implemented and meant more for physical audio devices (like HW DVD playr, tuner, etc..).

I'm a bit out of this story at the moment, so I can't remember all the details...

In my setup, I have another sound card, use squeezeslave as SW Squeezebox alternative and it partially works (except my squeezeslave won't start at the boot).... Still couldn't find the problem... This way it's much cheaper than using separate HW Squeezebox player...


HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
Re: Need LinuxMCE guru for multizone setup
« Reply #2 on: November 06, 2008, 02:01:55 pm »
Thanks Bulek.

I read about your changes to Marantz template, I hoped to find it in my template list to have a good starting point, but there is only the old, non-working one.

Having the two soundcards running as seperate xine player (maybe with an additional configuration option to give each player its own alsa device) isn't working for now. I can live with the squeezebox simulation, so this is what I do currently. Both squeezeplayer start at startup and are running as squeezebox, I see them in the squeezecenter. However, i have a decode error, so I tried to start squeezeslave in conjunction with oass, cause I thought the device is in use by an other application and oss can share one audiocard for multiple appplications. I guess, that I get rid of the decode error, so I'll do that, when I've finsihed setting up the multiroom stuff.

BTW this is one of the greatest feature of LinuxMCE, you always have something to do, when you've finished your work... ;)

I'll try to build a seperate zone device template and will test, if this works. If it works, I'll add a master template adding two zone devices. When I got this running, I'll add the tuner. To have it available in a simpler form, I'll try not to execute the child commands on the parent, this should make it easier for me to adjust things as long as I'm testing it.

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
Re: Need LinuxMCE guru for multizone setup
« Reply #3 on: November 09, 2008, 01:14:32 pm »
Thanks for all your help, I finally got it to work :)

Using one MD and one Receiver (Yamaha RX-V1700), I'm currently controlling three rooms. The trick was to divide the old RX-V1x00 template into three seperate templates. Every zone has its one template and the corresponding ruby codes for RS232.

Having that I was able to make use of my two additional soundcards, which are acting as squeezeslaves. Both are physically connected to the receiver. The third soundcard is used for the MD itself and is serving 7.1 sound through SPDIF.

Room #1
--------
MD + Receiver (Mainzone)

Room #2
--------
Squeezeslave #1 + Receiver Zone #2

Room #3
--------
Squeezeslave #2 + Receiver Zone #3

I'll document the setup on my wiki page. However there are some things, that can be optimized, the first soundcard for example can be used as both, 1x digital output for MD and 1x analog ouput for squeezeslave. This will save one pci slot for other stuff, like a tv-card.

you can follow my setup here: http://wiki.linuxmce.org/index.php/User:ENoodle

cesarscav

  • Veteran
  • ***
  • Posts: 55
    • View Profile
Re: [Solved] Need LinuxMCE guru for multizone setup
« Reply #4 on: December 12, 2008, 04:44:05 am »
eNoodle
I'm thinking on doing a similar set up.
I'm in a stage of gathering some info now.
What kind of sound cards are you using?
I have a onkyo reciver that also has multizone capabilities.

Quote
Device Templates

I know have a functional multiroom setup. :) The solution was to split the original RX-V1x00 template into three different templates, because the original template missed the possibility to connect the squeezebox within the connection wizard. So I setuped three different templates for each Zone the Receiver has. Each template is a standard GSD device, containing the Ruby codes for its own zone.

    * Template RX-V1700 (Mainzone) controlling the Mainzone
    * Template RX-V1700 (Zone 2) controlling Zone #2 located in a different room
    * Template RX-V1700 (Zone 3) controlling Zone #3 located in a different room

How did you split the Device template.
Did you create a new device template for each zone? and use the regular template for the main zone?
or
you use the same one three times?

How did you handle the same "COM Port on PC"? for the three

It's possible for you to post your GSD device Ruby codes, the device template data base is broken now and I cannot retrieve the GSD from the database. To start looking at some code.

Thanks.
Cesar

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: [Solved] Need LinuxMCE guru for multizone setup
« Reply #5 on: December 12, 2008, 08:14:33 am »
eNoodle
I'm thinking on doing a similar set up.
I'm in a stage of gathering some info now.
What kind of sound cards are you using?
I have a onkyo reciver that also has multizone capabilities.

Quote
Device Templates

I know have a functional multiroom setup. :) The solution was to split the original RX-V1x00 template into three different templates, because the original template missed the possibility to connect the squeezebox within the connection wizard. So I setuped three different templates for each Zone the Receiver has. Each template is a standard GSD device, containing the Ruby codes for its own zone.

    * Template RX-V1700 (Mainzone) controlling the Mainzone
    * Template RX-V1700 (Zone 2) controlling Zone #2 located in a different room
    * Template RX-V1700 (Zone 3) controlling Zone #3 located in a different room

How did you split the Device template.
Did you create a new device template for each zone? and use the regular template for the main zone?
or
you use the same one three times?

How did you handle the same "COM Port on PC"? for the three

It's possible for you to post your GSD device Ruby codes, the device template data base is broken now and I cannot retrieve the GSD from the database. To start looking at some code.

Thanks.
Cesar
Hi,

I'll try to answer your questions. More info is here, although page is a bit outdated....

http://wiki.linuxmce.org/index.php/Marantz_SR5600

My  pretty well done multizone template for Marantz is somewhere in mantis thread and being commited to sqlcvs, but I don't know if it will enter new release cause of known problems with main database...
I'll try to use template exporter in next few days - maybe that will help you a bit more...

Anyway, my thinking goes like this:
1. I've added needed commands to this device:     Zone #1867 , so now it's fully compatible audio zone (you can also attach pipe to it, it will autoselect input etc...)
2. In device template you can define child devices that will be also added when you add device based on this template :
Device Template Related
#1867    Zone    My Child    Extra    12|2|186|Line Out    Delete
#1867    Zone    My Child    Extra    12|1|186|Zone MultiRoom    Delete
#1867    Zone    My Child    Extra    12|0|186|Zone Main    Delete

3. so now you can connect your players to those zones.

4. you get everything that happens in your main, parent device, so you do all the processing in GSD code for the parent device (that's because child devices don't process DCE if setup properly)...

5. I've organized GSD code in similar manner as in Yamaha template. I have Multizone commands, like :

SendMultiZoneCommand(cmd, ["@SRC:H", "@MSC:H", "@MSC:H"])

that is called for instance when you receive command Inputs #169 AM  and then subroutine decides based on zone what will be sent to rs232. If command is destined to main zone, then "@SRC:H" is sent, if for zone 3, then "@MSC:H" is sent.

I also did some logic, when certain zone is on/off (for instance you cannot send OFF command to rs232 if not all of zones are off, etc..). I also added some volume normalization logic (so at the end volume levels are between 0-100) etc....

HTH,

regards,

Bulek.

Thanks in advance,

regards,

Bulek.

cesarscav

  • Veteran
  • ***
  • Posts: 55
    • View Profile
Re: [Solved] Need LinuxMCE guru for multizone setup
« Reply #6 on: December 12, 2008, 03:45:14 pm »
Hi bulek,

Thanks a lot for you reply, it seams that you make some work here I remember following your wiki and post a time a go and it wasn't near as is now.
It is a little bet confusing for me now because I can't play with the Ruby codes of both devices (onkio and Marratz), I had to reinstall my system last week and I don't have any of my RS232 Devices working properly because of this issue with the main data base, I'm a little bet lazy to start writing all the controls by my self.
Anyway this is a great start for what I want to accomplish. As soon as I put my hands back on the Onkyo template I'll start modification on it to support multizone or at least I try.

Thanks again.

Cesar

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
Re: [Solved] Need LinuxMCE guru for multizone setup
« Reply #7 on: December 12, 2008, 06:25:22 pm »
1.) What kind of sound cards are you using?
2.) How did you split the Device template. Did you create a new device template for each zone? and use the regular template for the main zone? or you use the same one three times?
3.) How did you handle the same "COM Port on PC"? for the three
4.) It's possible for you to post your GSD device Ruby codes, the device template data base is broken now and I cannot retrieve the GSD from the database. To start looking at some code.

Hi cesarscav,

1.) I'm using some budget soundcard (Realtek and NoName). I had some problems using a Creative X-Fi, but all my budget soundcards are working perfectly.
2.) There is a really good Yamaha Template (I guess it was #1751) in the database. However, I wasn't able to use the multizone feature. I couldn't connect audio pipes, the commands weren't sent correctly and so on, so I decided to start setting up a new template. To have a better understanding I didn't try to setup all in one template, instead I setuped three templates (for each zone one template). Have a look at my wiki page (http://wiki.linuxmce.org/index.php/User:ENoodle), esp. at the diagram, from this and from your other posts I assume, that you want to build something similar.
3.) I added one template after the other, all are controlled by MD/Com1 without any problem.
4.) I do not need to handle multiroom feature in Ruby, because I've splitted the template into three parts, so all Ruby codes are normal "Send-Strings".

If you want to start adding multizone support to your template, my opinion is, that it is much easier to setup three different templates, each with its own commands for the appropriate zone. You can then move the templates into their room and use the connection wizard to build the audio/video pipes. That's it, all commands will then be send to the receiver using MD/Com1.

eNoodle