[EXAMPLE] Matrix Multi Zone Control Single Page

Discussion in 'C-Bus Automation Controllers' started by Daggo, Feb 26, 2018.

  1. Daggo

    Daggo

    Joined:
    Feb 21, 2018
    Messages:
    13
    Likes Received:
    0
    Another simple example people might like.
    Set up a page with volume, bass, treble, different sources and a toggle object for each zone in the house which sets the zones you want to be linked.

    Below code will go on the volume slider will need to edit for source bass and treble control

    Code:
    -- object mapped to this event must have its data type set
    value = event.getvalue()
    -- Get value of user parameter 'param' on local network
    z1 =  GetUserParam('Local', 'audioz1link')
    z2 =  GetUserParam('Local', 'audioz2link')
    z3 =  GetUserParam('Local', 'audioz3link')
    z4 =  GetUserParam('Local', 'audioz4link')
    z5 =  GetUserParam('Local', 'audioz5link')
    z6 =  GetUserParam('Local', 'audioz6link')
    z7 =  GetUserParam('Local', 'audioz7link')
    
    if (z1 == true) then
      -- Set application 48 group 13 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 13, value, 0)
     
    end
    
    if (z2 == true) then
      -- Set application 48 group 17 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 17, value, 0)
     
    end
    
    if (z3 == true) then
      -- Set application 48 group 0 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 0, value, 0)
     
    end
    
    if (z4 == true) then
      -- Set application 48 group 23 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 23, value, 0)
     
    end
    
    if (z5 == true) then
      -- Set application 48 group 4 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 4, value, 0)
     
    end
    
    if (z6 == true) then
      -- Set application 48 group 7 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 7, value, 0)
     
    end
    
    if (z7 == true) then
      -- Set application 48 group 10 on the local network to same value as volume slider from event.
      SetCBusLevel(0, 48, 10, value, 0)
     
    end 
     
    Daggo, Feb 26, 2018
    #1
  2. Daggo

    Daggo

    Joined:
    Feb 21, 2018
    Messages:
    13
    Likes Received:
    0
    Idea is to select or deselect zones you want to control. Then set volume source etc, which will sync to other zones.
     
    Daggo, Feb 26, 2018
    #2
  3. Daggo

    Daggo

    Joined:
    Feb 21, 2018
    Messages:
    13
    Likes Received:
    0
    Might want to add this to the zone selection button event script so it will adjust the source in the room you select as per the master source button otherwise users might add rooms but not remember to set the master source button again each time.

    Code:
    -- object mapped to this event must have its data type set
    value = event.getvalue()
    -- Get level of the mastersource group in the Audio Control application on the local network
    source = GetCBusLevel('0', '117', '2')
    
    if (value == true) then
      -- Set application audio zone 1 on the local network to same as master source over 0 seconds.
      SetCBusLevel(0, 48, 35, source, 0)
    end
     
    Daggo, Feb 27, 2018
    #3
  4. Daggo

    Daggo

    Joined:
    Feb 21, 2018
    Messages:
    13
    Likes Received:
    0
    Same could be done with the bass and treble but most situations would be best to leave as is.
     
    Daggo, Feb 27, 2018
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.