Facility Control

 View Only
  • 1.  How to create Start/Stop Encoding Streams macro button in Panelbuilder

    Posted 20 days ago

    Is there a way to create a macro button that can start/stop multiple encoding streams? This is for an Ultritouch Panel

    Encoders are Cobalt 9992-ENC OG Cards. There's 2 cards and each card has 3 encoding streams.

    There's also an "Apply" button that needs to be triggered in order for the parameter changes to take effect.

    I'm still new at Community and Panelbuilder so let me know if i should provide any more info. Thanks!

    Here's my code:

    <abs name="STREAM CONTROL" virtualheight="250" virtualwidth="1916">
    <split bottom="0" left="0" orientation="horizontal" right="0" top="0">
    <abs style="bg-u:IMAGES/85814.jpg;bg-fill:horizontal;" virtualheight="250" virtualwidth="947" weight="0.5">
    <table bottom="0" left="0" right="0" style="font:bold;" top="0">
    <tr>
    <label colspan="1" fill="both" header="true" height="20" name="PRIMARY YOUTUBE" pheight="20" pwidth="316" rowspan="1" style="txt-align:center;bg#434A567F;bdr:line;font:bold;" weightx="1.0" width="316"/>
    <label colspan="1" fill="both" header="true" height="20" name="PRIMARY SNAPSTREAM PGM" pheight="20" pwidth="316" rowspan="1" style="txt-align:center;font:bold;bg#434A567F;" weightx="1.0" width="316"/>
    <label colspan="1" fill="both" header="true" height="20" name="PRIMARY SNAPSTREAM CLN" pheight="20" pwidth="316" rowspan="1" style="txt-align:center;bg#434A567F;bdr:line;font:bold;" weightx="1.0" width="316"/>
    </tr>
    <tr>
    <simplegrid colspan="1" contexttype="opengear" fill="both" objectid="10006212054&lt;br&gt;Slot 5&lt;br&gt;9992-ENC" objecttype="9992-ENC" pheight="230" pwidth="316" rows="1" rowspan="1" style="bdr:line;" weightx="1.0" weighty="1.0">
    <param element="0" expand="true" oid="0x2054" showlabel="false" widget="9"/>
    <param element="0" expand="true" oid="0x207E" showlabel="false" widget="12"/>
    </simplegrid>
    <simplegrid colspan="1" contexttype="opengear" fill="both" objectid="10006212054&lt;br&gt;Slot 5&lt;br&gt;9992-ENC" objecttype="9992-ENC" pheight="230" pwidth="316" rows="1" rowspan="1" style="bdr:line;" weightx="1.0" weighty="1.0">
    <param element="0" expand="true" oid="0x2448" showlabel="false" widget="9"/>
    <param element="0" expand="true" oid="0x2472" showlabel="false" widget="12"/>
    </simplegrid>
    <simplegrid colspan="1" contexttype="opengear" fill="both" objectid="10006212054&lt;br&gt;Slot 5&lt;br&gt;9992-ENC" objecttype="9992-ENC" pheight="230" pwidth="316" rows="1" rowspan="1" style="bdr:line;" weightx="1.0" weighty="1.0">
    <param element="0" expand="true" oid="0x283C" showlabel="false" widget="9"/>
    <param element="0" expand="true" oid="0x2866" showlabel="false" widget="12"/>
    </simplegrid>
    </tr>
    </table>
    </abs>
    <abs style="bg-u:IMAGES/red-circuit-board-wallpaper-digital-technology-background-free-vector.jpg;bg-fill:horizontal;" virtualheight="250" virtualwidth="949">
    <table bottom="0" left="0" right="0" top="0">
    <tr>
    <label colspan="1" fill="both" header="true" height="20" name="BACKUP YOUTUBE" pheight="20" pwidth="316" rowspan="1" style="txt-align:center;bg#434A567F;bdr:line;font:bold;" weightx="1.0" width="316"/>
    <label colspan="1" fill="both" header="true" height="20" name="BACKUP SNAPSTREAM PGM" pheight="20" pwidth="316" rowspan="1" style="txt-align:center;bg#434A567F;bdr:line;font:bold;" weightx="1.0" width="316"/>
    <label colspan="1" fill="both" header="true" height="20" name="BACKUP SNAPSTREAM CLN" pheight="20" pwidth="316" rowspan="1" style="txt-align:center;bg#434A567F;bdr:line;font:bold;" weightx="1.0" width="316"/>
    </tr>
    <tr>
    <simplegrid colspan="1" contexttype="opengear" fill="both" objectid="10006212054&lt;br&gt;Slot 7&lt;br&gt;9992-ENC" objecttype="9992-ENC" pheight="230" pwidth="316" rows="1" rowspan="1" style="bdr:line;" weightx="1.0" weighty="1.0" width="316">
    <param element="0" expand="true" oid="0x2054" showlabel="false" widget="9"/>
    <param element="0" expand="true" oid="0x207E" showlabel="false" widget="12"/>
    </simplegrid>
    <simplegrid colspan="1" contexttype="opengear" fill="both" objectid="10006212054&lt;br&gt;Slot 7&lt;br&gt;9992-ENC" objecttype="9992-ENC" pheight="230" pwidth="316" rows="1" rowspan="1" style="bdr:line;" weightx="1.0" weighty="1.0" width="316">
    <param element="0" expand="true" oid="0x2448" showlabel="false" widget="9"/>
    <param element="0" expand="true" oid="0x2472" showlabel="false" widget="12"/>
    </simplegrid>
    <simplegrid colspan="1" contexttype="opengear" fill="both" objectid="10006212054&lt;br&gt;Slot 7&lt;br&gt;9992-ENC" objecttype="9992-ENC" pheight="230" pwidth="316" rows="1" rowspan="1" style="bdr:line;" weightx="1.0" weighty="1.0" width="316">
    <param element="0" expand="true" oid="0x283C" showlabel="false" widget="9"/>
    <param element="0" expand="true" oid="0x2866" showlabel="false" widget="12"/>
    </simplegrid>
    </tr>
    </table>
    </abs>
    </split>
    </abs>


    ------------------------------

    Is there a way to create a Macro in Panelbuilder for Ultritouch that would start/Stop multiple Encoding streams at the same time?


    I have three RTMP Encoding streams to be controlled on a Cobalt 9992-ENC OG Card. 


    There's also a Confirmation button that needs to be triggered in order for the parameter change to take effect.


    Let me know if I should share any more info that could help. I'm still somewhat new at Community and PanelBuilder! 


    Thanks!


    ------------------------------


  • 2.  RE: How to create Start/Stop Encoding Streams macro button in Panelbuilder

    Posted 19 days ago

    I was able to create a toggle button to start and stop the streams wasn't able to get the button to stay synchronized with the actual state of the stream status. AI is telling me that the buttons are just arbitrary and only send a command but aren't actually linked to the state of the encoders. 

    var enc1 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2054", 0);
    var enc2 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2448", 0);
    var enc3 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x283C", 0);

    // read current state from first encoder
    var current = enc1.getValue();

    // toggle state
    var newState = (current == 1) ? 0 : 1;

    // apply to all encoders
    enc1.setValue(newState);
    enc2.setValue(newState);
    enc3.setValue(newState);

    My workaround is to create two separate buttons. One for STOP and one for START. and then a third CONFIRM button. Next to these buttons i placed the stream status LEDs to show whether or not the buttons took effect. 

    var enc1 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2054", 0);
    var enc2 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2448", 0);
    var enc3 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x283C", 0);

    enc1.setValue(1);
    enc2.setValue(1);
    enc3.setValue(1);
    var enc1 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2054", 0);
    var enc2 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2448", 0);
    var enc3 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x283C", 0);

    enc1.setValue(0);
    enc2.setValue(0);
    enc3.setValue(0);

    Is this the best way to perform this task or is there a way to have the actual buttons reflect the stream state?  



    ------------------------------
    David Coleman
    AV Systems Engineers
    ------------------------------