Facility Control

 View Only
  • 1.  Input Query with Dashboard

    Posted 06-08-2020 14:31

    Wasn't sure which forum to put this in:

    I'm using Dashboard to see what input is currently in a keyer, and getting back a true or false response from the Acuity.

    When I'm searching for input 1 (IN:1) inputs 10 through 19 will register as true as well, so I can't really trust that input 1 is active.

    I tried searching for IN:01, but then got false as the response. Is there a way to be more specific when searching for an input?

    Code used:

    <button buttontype="push" height="86" left="537" top="482" width="154">
    <task tasktype="ogscript">function callbackFunction(success, cmd, result, exception)
    {

    ogscript.debug(result.indexOf("IN:1") &gt; -1 );

    }
    rosstalk.sendMessage(%const['hosts']['ACUITY.host']%, %const['hosts']['ACUITY.port']%, "XPT MLE:1:KEY:1:?", callbackFunction);</task>
    </button>



  • 2.  RE: Input Query with Dashboard

    Posted 06-08-2020 15:09

    This I think needs to be in the DashBoard Forum.

    If you send the query request to see what is on ME:1:KEY:1:? you will only get one source returned.

     

    So this has more to do with your code for trying to do something in addition to that and flagging anything that is starting with IN:1

     

    it so you are getting hits for IN:1, IN:1X and probably would get hits for IN:1YY for inputs in the hundreds as well....

     


    #DashBoard


  • 3.  RE: Input Query with Dashboard

    Posted 06-09-2020 09:22

    Thanks Les, I swapped it to the Dashboard forum.

    I would guess so for the hundreds too but didn't really feel like editing the installation fileset to test.


    #DashBoard


  • 4.  RE: Input Query with Dashboard

    Posted 06-09-2020 13:04

    Hi Mark

    I do not have an Acuity right in front of me but if you are specifically looking for IN:1, I'm wondering if it makes sense to use a simple == check instead of checking for indexOf.

    Another option would be to get the input would be to look for "IN:" and use parseInt to grab the numeric part after it:

    <button buttontype="push" height="86" left="537" top="482" width="154">
    <task tasktype="ogscript">function callbackFunction(success, cmd, result, exception)
    {
    var prefix = "IN:";
    var inputNumber = -1;
    var index = result.indexOf(prefix);
    if (index &gt;= 0)
    {
    inputNumber = parseInt(result.substr(index + prefix.length));
    }

    if (inputNumber &gt;= 0)
    {
    ogscript.debug("GOT INPUT: " + inputNumber);
    }
    }
    rosstalk.sendMessage(%const['hosts']['ACUITY.host']%, %const['hosts']['ACUITY.port']%, "XPT MLE:1:KEY:1:?", callbackFunction);</task>
    </button>

     

    Cheers

    James

     


    #DashBoard


  • 5.  RE: Input Query with Dashboard

    Posted 06-09-2020 22:35

    Hi there!

    Is there a way to do this for Graphite and/or carbonite mixers as well in a good way?
    Besides doing a color check for the inputs I mean? One little theme swap and that would be out the door...


    #DashBoard


  • 6.  RE: Input Query with Dashboard

    Posted 06-10-2020 04:33

    <x-zendesk-user data-user-name="Aleksander Stalsberg">372690297731</x-zendesk-user>

    Graphite and Carbonite are native OGP devices.  So you have access to all of this information as OIDs....So being able to check a source on a bus or keyer or anything is really easy since you don't have to query and parse it...All you have to do is access the OID Parameters.

     


    #DashBoard


  • 7.  RE: Input Query with Dashboard

    Posted 06-10-2020 12:11

    Hey James,

    You were right with the ==, I am cycling through an array parameter to check against so it works perfectly with that. There does seem to be an extra space coming from the result. Added a trim to it and works perfectly now.

    Appreciate the help again!

    To Aleksander I think you need to add them to the basic tree as a TCP/IP Dashboard Connect or openGear Device. Then in the panel add from the device from basic tree and choose the device you added.


    #DashBoard