Facility Control

 View Only
  • 1.  Get status from KiPro

    Posted 01-17-2017 19:19
    Hi all,

    I'm currently working on a Custom Panel to control or AJA Ki Pro decks, and have sending commands working, but would like to be able to get staus back from the deck.

    Everything on the Ki Pro works as a HTTP Post, so if I use this command:

    ogscript.asyncPost('http://(KI PRO IP HERE)/config?action=set&paramid=eParamID_TransportCommand&value=3&configid=0',null,null);

    it will start recording.

    What I need to do is get the status back from the Ki Pro, so if I send this post using my browser:
    http://(KI PRO IP HERE)/config?action=get&paramid=eParamID_TransportState

    The Ki Pro will respond with:
    {"paramid":"2097217802","name":"eParamID_TransportState","value":"1","value_name":"Idle"} The problem is, I am having trouble getting that string back from the asyncPost command. It always returns 'undefined'. Any ideas?


  • 2.  RE: Get status from KiPro

    Posted 01-18-2017 15:58

    asyncPost has not return as it runs the command in a separate thread (to avoid blocking the user interface while it is making a request).

    The information returned from the call is passed to your callback function (which you currently have set to null).

    ogscript.asyncPost('http://(KI PRO IP HERE)/config?action=set&paramid=eParamID_TransportComman d&value=3&configid=0',null,function(result)
    {
      ogscript.debug('GOT: ' + result);
    });

    #DashBoard


  • 3.  RE: Get status from KiPro

    Posted 01-18-2017 16:00

    Also, if you require the result immediately and don't mind your user interface being unresponsive while the call is being made, you can swap asyncPost for post:

    var result = ogscript.post('http://(KI PRO IP HERE)/config?action=set&paramid=eParamID_TransportComman d&value=3&configid=0', null);
    
    ogscript.debug('GOT: ' + result);

    #DashBoard