PDA

View Full Version : Zones, Zones, etc, etc.



danward79
September 10th, 2004, 01:48 PM
Hello,

Just got a usb device for stereo output, in addition to my sound card. I have a few spare speakers and a spare amp, so am going to setup a seperate zone.

Just wondering if there are any commands to switch to a specific zone, in JRMC? Also is there a zone toggle?

What other zone commands are there? is there any zone volume controls?

All answers gladly excepted, Thanks!

Dan
:wink:

Jlee
September 10th, 2004, 03:01 PM
There are commands for next and previous zones. I'm not sure if there is a toggle but with a bit of lua you could just make a button toggle between the next and previous actions.

The IR codes are in this document:
http://www.netremote.org/dl/driver_ref.html

I don't do multi-zone but there are plenty that do so check out some of the ccf's in the gallery. I expect Tor will be along before I even finish typing this.

Mastiff
September 10th, 2004, 03:01 PM
Download my CCF, it's totally multi-zone centered. You can see there how it all works. Just remember that you need to choose "Internal volume" under the menu "Player, Volume".

Jlee
September 10th, 2004, 03:05 PM
You see. Now you know that I have hidden psychic powers so beware everyone.

Mastiff
September 10th, 2004, 03:26 PM
Funny! We were actually typing at the same time! Anyway, you don't have to be psychich to know that I'll jump to any message mentioning zones... :D

Jlee
September 11th, 2004, 12:26 AM
Anyway, you don't have to be psychich to know that I'll jump to any message mentioning zones...
We know that but why did you have to tell everyone. I think I could have got away with it.

danward79
September 11th, 2004, 12:29 AM
That seems to happen quite a bit, round here.

Anyway thanks for the answers, I will check out what you were saying today.

Mastiff - from what you were saying, If I set each zone to internal, it should just adjust the volume for that individual zone?

Cool, I plan to set up some lua on the volume buttons, which depending on the zone name does different volume commands. i.e. main sends ir to girder for amp, any other zone sends volume command to JRMC.

Cheers

Dan

danward79
September 11th, 2004, 02:41 AM
Hi

I have got two, zones and made some buttons for my modified JLee's ccf.

Now I am struggling to get this to work.


local zone=NetRemote.GetVariable('MP.Zone');
if (zone == "Bathroom") then
(MP.Zone,Main);
else
(MP.Zone,Bathroom);
end

I set that as the button ir name and this as the code


5001 0000 0000 0002 fc19 0005 0001 0000

The intension is that it looks to find out what zone it is in then switches to the other one, just like a toggle.

I think the basis of the code is right, I think it is how I am trying to do it that is wrong, for NR to understand. (Does that make sense!)

Cheers Dan

Jlee
September 11th, 2004, 03:02 AM
The IR code for a lua button should be
5001 0000 0000 0002 fc19 0007 0000 0000

To set a NR variable in lua you need to use NetRemote.SetVariable so the code should look like this
local zone=NetRemote.GetVariable('MP.Zone');
if (zone == "Bathroom") then
NetRemote.SetVariable('MP.Zone','Main');
else
NetRemote.SetVariable('MP.Zone','Bathroom');
end

Now, because I don't do multi-zone I don't know if you can change the zone by just changing the value of the MP.Zone varaiable. If it doesn't work I suspect you'll need to execute an action to select the next or previous zone depending on what the current zone is. That would look something like this
--Previous zone:
NetRemote.ExecuteAction(-10,2,21);
--or next zone:
NetRemote.ExecuteAction(-10,2,20);


I think that's right, I never tried it.

Keep it up Dan - Whilst my next project will probably be the weather I don't think multi-zone will be too far from my to-do list. It's nice to let someone do all the hard work for a change :D

danward79
September 11th, 2004, 03:28 AM
Keep it up Dan - Whilst my next project will probably be the weather I don't think multi-zone will be too far from my to-do list. It's nice to let someone do all the hard work for a change

Yeah I know the feeling!!

Anyway, back to the problem.

If I have a button with this IR Name, I can set the zone to Bathroom or Main.


MP.Zone,Bathroom or
MP.Zone,Main

So that is what I can do.

Now I just tried your code, both and neither work.... Ummm Should be really simple. Oh well.

On a side note, don't you find it annoying with tonto, how you cannot make the ir name box bigger!

I have also just realised, that I am an idiot, The next zone and previous zone commands just go in a circle round all the zones, so with two zones act as a toggle.

However say that it would be good if we could get this working for future reference.

Dan

Jlee
September 11th, 2004, 03:43 AM
If I have a button with this IR Name, I can set the zone to Bathroom or Main.

MP.Zone,Bathroom
or

MP.Zone,Main

What is the IR code for that button?

danward79
September 11th, 2004, 03:44 AM
The ir code is


5001 0000 0000 0002 fc19 0005 0001 0000

Dan[/quote]

danward79
September 11th, 2004, 03:46 AM
Damn, I missed something you posted.


The IR code for a lua button should beCode:
5001 0000 0000 0002 fc19 0007 0000 0000



:oops: :oops:

Jlee
September 11th, 2004, 03:49 AM
That's just changing the variable so this should work - note the semi-colon after 'end'
local zone=NetRemote.GetVariable('MP.Zone');
if (zone == "Bathroom") then
NetRemote.SetVariable('MP.Zone','Main');
else
NetRemote.SetVariable('MP.Zone','Bathroom');
end;

danward79
September 11th, 2004, 04:53 AM
Hi

That code seems to work, in the standard MC ccf, but not in the modified version of yours!

This is really frustrating. I even copied the button, with a direct cut and paste, compared the code, both are exactly the same but do not work!

Dan