Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Setting host and zone

  1. #1
    Join Date
    Mar 2005
    Posts
    29

    Default Setting host and zone

    I have the codes to cycle through hosts and zone in NR (fff6 0002 0012-0014 per NRPro.ccf) but is there a way to set the host/zone to a given value (previously stored) without having to cycle through and check if I've got to where I want to be? I also found values of 10 and 11 used in NRMC19.ccf for host manipulation (although they appeared noops for me) so I'm guessing there are a number of options but I'm not sure what they all are.

    Thanks

  2. #2
    Join Date
    Jul 2001
    Location
    Risør - Norway
    Posts
    5,305

    Default

    IR code for host 10: 5001 0000 0000 0002 fff6 0000 0010 0000
    IR code for host 11: 5001 0000 0000 0002 fff5 0000 0010 0000
    IR code for host 12: 5001 0000 0000 0002 fff4 0000 0010 0000
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

  3. #3
    Join Date
    Mar 2005
    Posts
    29

    Default

    I'm missing something here. What defines host 10 ,11, 12 - in terms of relationship to host names?

  4. #4
    Join Date
    May 2002
    Location
    CT
    Posts
    6,559

    Default

    Hi Simon,
    The numbers Mastiff refers to are plugin instance numbers (he's using 10,11, and 12).

    Instead of using fff6, substitute the plugin instance number.

    An easy way to do the hex conversion is to open calculator, and switch to scientific mode.

    Do 65536 - [instance id] =

    Now hit the "hex" radio button, which will show fff6.

  5. #5
    Join Date
    Mar 2005
    Posts
    29

    Default

    Quote Originally Posted by Ben S
    Hi Simon,
    The numbers Mastiff refers to are plugin instance numbers (he's using 10,11, and 12).

    Instead of using fff6, substitute the plugin instance number.
    Ah! -
    BUT, when I create new instances for mediabridge they get created with numbers over 1000 and there doesn't seem to be any obvious sequence. Is there a magic function to take a host name and return the instance number?

    On the issue of setting zones I found this in another thread with Mastiff (http://www.promixis.com/phpBB2/viewtopic.php?t=10197)

    Quote Originally Posted by Ben S
    Please try the following:

    Code:
    NetRemote.ExecuteAction(-10,2,255,'S MP.ZONE Stua',1);
    The reason the first doesn't work is that the 2,255 command allows you to issue a MediaBridge protocol command directly. This protocol has been documented (though not revised recently), but is not (currently) available to the public. Let me talk to the guys about whether this information is okay to full release.
    I tried that using the following code but it has no effect
    Code:
    function OnPanelLoad()
    	local device = NetRemote.GetVariable('NR.DeviceName');
    
    	if (device == 'JRMC1') then
          if (GSPZone~="") then NetRemote.ExecuteAction(-10,2,255,'S MP.ZONE '..GSPZone,1) end
          NetRemote.SetVariable( 'ZoneA', GSPZone );
    
       else
          if (remoteZone~="") then NetRemote.ExecuteAction(-10,2,255,'S MP.ZONE '..remoteZone,1) end
          NetRemote.SetVariable( 'ZoneB', remoteZone );
    
       end
    end;
    The SetVariable is so I can see that the fields have the value expected. The idea is to have two different (sets of) panels that display different information for two zones - just in case you were wondering!

    Thanks

    Simon

  6. #6
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Quote Originally Posted by simonh
    Is there a magic function to take a host name and return the instance number?
    I'd like to second the request for a function to lookup a plugin instance number from a plugin name and hostname. That would certainly simplify some of the things I want to do in LDJ. Or failing that, how about a way of iterating through the plugins and accessing their properties?
    --Rob

  7. #7
    Join Date
    Jul 2001
    Location
    Risør - Norway
    Posts
    5,305

    Default

    Click an instance and hold it, and one of the options you get is change ID. So if you've got two 1000-instances after 10, change them to 11 & 12.
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

  8. #8
    Join Date
    Mar 2005
    Posts
    29

    Default

    Thanks Mastiff - that's a bit of interface black magic I'd never have guessed! That would at least enable me to hard code the host switching - but I'd still prefer to be able to get to the desired host from the hostname - since that is what is available from the mediabridge interface - unless there is a MP.InstanceNumber (or somesuch) variable hidden somewhere alongside MR.HostName?

  9. #9
    Join Date
    Mar 2005
    Posts
    29

    Default

    Concerning zone switching:

    - it's a case of don't believe everything Ben says - or at least not exactly in the form he writes it!

    When he said: NetRemote.ExecuteAction(-10,2,255,'S MP.ZONE Stua',1);

    what he actually meant was: NetRemote.ExecuteAction(-10,2,255,'S MP.Zone Stua',1);

    (of course) :wink:

  10. #10
    Join Date
    May 2002
    Location
    CT
    Posts
    6,559

    Default

    Oops!

    Unfortunately right now there isn't an easy way to get the host info back out except for the current host.

    If this can wait for a bit, I currently have a few things on the book that should make something like this easier.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •