Mosaic & QSYS

I've been working with QSYS for an installation, and have been loving it. They integrate rather well together. Mosaic is completely controlled by QSYS, to the point that the 2 button stations from Mosaic don't even activate anything on Mosaic, they send which button was pressed to QSYS, then it decides what to tell Mosaic to do.

One question I've been wondering as I dabble in Mosaic Scripts, is there a method where I could send a long string of text and Numbers to QSYS based on Mosaic features?

For example, My scripts in QSYS use a central area where currently I type in the Timelines, the Timeline Numbers, Scenes, Scene Numbers, Groups and Group Numbers, and then QSYS references that whenever I use controls.

But what I would like to do is send a command from QSYS to Mosaic asking for a string. This string would ideally include, "Timeline 1 Name, Timeline 1 Number, Timeline 2 Name, Timeline 2 Number, etc for all the Timelines saved on the Mosaic. And being able to do something similar for Scenes and Groups would be phenomenal.

Has anyone done something similar or could point me in a direction that could help accomplish this?

Parents
  • This is doable.  Look in the Help files at the “API v4” section for ways to get the data.

  • So I can see Getting Name for Timelines, Scenes, and Groups, but this would require knowing if the Mosaic has data stored in the number slots.

    What I'm missing then is some way to ask the Mosaic something like:

    get_array_groups()

    Which would return a string with all of the group numbers like,

    1,2,3,4,5,11,12,13,21,22

    Then I could use that string to then ask for names for each group.

  • Something along these lines, but probably cleaner than this:

    local i = 1
    tlCount = 1
    maxTl = 500
    availableTls = {}

    while i <= maxTl do local tl = get_timeline(i)
    if tl ~= nil then
    availableTls[tlCount] = tl
    tlCount = tlCount + 1
    end
    i = i + 1
    end

    //Do whatever you want to get this data out, but here is an example when debugging to log it out

    for
    index = 1, tlCount, 1 do log(availableTls[index].number .. “, “ .. availableTls[index].name
    end
  • Ah that makes sense, check across a range and see if the name field is not nil. that seems like a great method.

Reply Children
  • You are checking to see if data exists for given timeline “i” not if it has a name.

    get_timeline(i) pulls all the data about timeline “i” (see API v4 for all the data)

  • I recently implemented this thanks to your help on the idea of checking the contents of each target, and saving to an array if there was valid data.

    I'll make a longer post in the future detailing how it all works. but thank you again for the help!