Facility Control

 View Only
  • 1.  Using MSC over ethernet or Telnet to control GrandMA2

    Posted 11-03-2020 18:34

    Hello! I am trying to control a GrandMA2 from Dashboard. First I tried sending MSC as UDP over Ethernet to the console, well I actually tested it using ma2onPC but I assume it works the same as on the console. The ma2-software's MSC monitor detects something but it is blinking red at it is not responding to the message. I've tried with an example message from the MSC-guide (http://help2.malighting.com/Page/grandMA2/remote_control_msc/en/3.3/#toc_header_anchor_7) so I assume Dashboard is doing something to the UDP-message which makes ma2 unable to 'unpack' it. I've tried both UDP as string and as bytes. I've also tried to use the messageBuilder to send it as bytearray.

    Here I checked how the message looked like in wireshark, where the bluemarked are the data-field and the UDP-string I sent is the part in the right column. Is those extra bytes the reason ma2 wont recognize it?

     

    When I didn't get MSC to work, I checked out Telnet remote. I did some research on the forum and figured I should try sending the Telnet commands as TCP. Which I did, no luck there. Well I could see in Putty that the message did get to the console, but it didnt react to it. I tried with a client- and server-listener panel from here: https://support.rossvideo.com/hc/en-us/community/posts/360043165112-Declaring-a-parameter-inside-a-TCP-string-to-set-clip-name-on-Blackmagic-recorder-

    And I can see in the debugger that Dashboard connects to the ma2-software, but I'm unable to send commands through the listener. It is only establishing a connection, and I can't do anything else. I would prefer to make the Telnet-way to work, but I am also curious on why MSC doesnt work.

     

    Greetings,

    Kim André



  • 2.  RE: Using MSC over ethernet or Telnet to control GrandMA2

    Posted 11-03-2020 18:43

    Hi Kim,

    Here is an panel that controls a GrandMA2.   You can look at the API in the meta to see what messages we are sending over UDP.

     

    <abs contexttype="opengear" gridsize="20">
    <meta>
    <params>
    <param access="1" maxlength="0" name="grandMAHost" oid="grandMAHost" type="STRING" value="1.2.3.4" widget="text"/>
    <param access="1" constrainttype="INT_NULL" name="grandMAPort" oid="grandMAPort" precision="0" type="INT32" value="1234" widget="default"/>
    <param access="1" maxlength="0" name="executor" oid="executor" type="STRING" value="01.1" widget="text"/>
    <param access="1" maxlength="0" name="cue" oid="cue" type="STRING" value="02.000" widget="text"/>
    <param access="1" constraint="0.0;255.0;0.0;255.0;1" constrainttype="INT_STEP_RANGE" name="macro" oid="macro" precision="0" type="INT32" value="10" widget="spinner"/>
    </params>
    </meta>
    <meta>
    <api>function bin2String(array) {

    var msg = "";
    var msg2 = "";
    for (var i = 0; i &lt; array.length; i++) {
    msg = msg + " " + array[i].toString(16);
    msg2 = msg2 + " " + String.fromCharCode(array[i]);
    }
    return msg;



    }

    function go(executor, cue) {


    // EXECUTOR MUST BE IN THE FORMAT PP.E (where PP is the 2 digit page, and E is the executor number).
    // CUE MUST BE IN THE FORMAT XX.XXX

    //var toSend = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x1c, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x7f, 0x01, 0x30, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x00, 0x30, 0x31, 0x2e, 0x31, -0x09];
    var toSend = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x1c, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x7f, 0x01]

    var message= ogscript.createMessageBuilder();
    message.writeByteArray(toSend);
    message.writeString(cue);
    message.writeByte(0x00);
    message.writeString(executor);
    message.writeByte(-0x09);
    ogscript.debug("SENDING " + bin2String(message.toByteArray()));
    ogscript.sendUDPBytes(params.getValue('grandMAHost',0), params.getValue('grandMAPort',0), message.toByteArray());


    }

    function off(executor) {
    var toSend = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x1c, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x7f, 0x0A, 0x30, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x00];
    //var toSend = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x1c, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x7f, 0x01]

    var message= ogscript.createMessageBuilder();
    message.writeByteArray(toSend);
    message.writeString(executor);
    message.writeByte(-0x09);
    ogscript.debug("SENDING " + bin2String(message.toByteArray()));
    ogscript.sendUDPBytes(params.getValue('grandMAHost',0), params.getValue('grandMAPort',0), message.toByteArray());

    }

    function fire(macro) {
    // MACRO IS A NUMBER BETWEEN 0 and 255
    var toSend = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x1c, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x01, 0x07];
    //var toSend = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x1c, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x7f, 0x01]

    var message= ogscript.createMessageBuilder();
    message.writeByteArray(toSend);
    message.writeByte(macro);
    message.writeByte(-0x09);
    ogscript.debug("SENDING " + bin2String(message.toByteArray()));
    ogscript.sendUDPBytes(params.getValue('grandMAHost',0), params.getValue('grandMAPort',0), message.toByteArray());

    }

     

    /*var header = [0x47, 0x4d, 0x41 , 0x00, 0x4d, 0x53, 0x43, 0x00]
    var command = ogscript.createMessageBuilder();
    var commHeader = [0x7F, 0x7F, 0x02, 0x7F];
    command.writeByte(0xf0);
    command.writeByteArray(commHeader);
    command.writeString("01.000");
    command.writeByte(0x7F);
    var commandBytes = command.toByteArray();
    var msgSize = commandBytes.length + header.length + 4
    var sizearray = [msgSize, 0x00, 0x00, 0x00];
    var message= ogscript.createMessageBuilder();
    message.writeByteArray(header);
    message.writeByteArray(sizearray);
    message.writeByteArray(commandBytes);
    bin2String(message.toByteArray());
    */

    /*
    var header = [0x47, 0x4d, 0x41, 0x00, 0x4d, 0x53, 0x43, 0x00, 0x18, 0x00, 0x00, 0x00, -0x10, 0x7f, 0x7f, 0x02, 0x7f]
    var message= ogscript.createMessageBuilder();
    message.writeByteArray(header);
    message.writeString("01.000");
    message.writeByte(0x7F);
    bin2String(message.toByteArray());
    */

     

     

     

     

    </api>
    </meta>
    <button buttontype="push" height="60" left="280" name="GO" top="160" width="160">
    <task tasktype="ogscript">go(params.getValue('executor', 0), params.getValue('cue', 0));

    </task>
    </button>


    <param expand="true" height="20" left="120" oid="grandMAHost" top="20" width="200"/>
    <param expand="true" height="20" left="440" oid="grandMAPort" showlabel="false" top="20" width="200"/>
    <label height="20" left="40" name="Grand MA IP" style="txt-align:west" top="20" width="80"/>
    <label height="20" left="340" name="Grand MA Port" style="txt-align:west" top="20" width="100"/>
    <param expand="true" height="20" left="180" oid="executor" top="160" width="80"/>
    <label height="20" left="60" name="Executor.Page" style="txt-align:west;" top="160" width="100"/>
    <label height="20" left="60" name="Cue" style="txt-align:west" top="200" width="100"/>
    <param expand="true" height="20" left="180" oid="cue" top="200" width="80"/>
    <button buttontype="push" height="60" left="460" name="OFF" top="160" width="160">
    <task tasktype="ogscript">off(params.getValue('executor', 0));
    </task>
    </button>
    <button buttontype="push" height="60" left="280" name="FIRE" top="320" width="160">
    <task tasktype="ogscript">fire(params.getValue('macro', 0));
    </task>
    </button>
    <label height="20" left="60" name="Macro #" style="txt-align:west" top="320" width="120"/>
    <param expand="true" height="20" left="180" oid="macro" top="320" width="80"/>
    <label height="40" left="60" name="Go and Off" style="txt-align:west;size:Bigger;" top="100" width="340"/>
    <label height="40" left="60" name="Macros" style="txt-align:west;size:Bigger;" top="260" width="340"/>
    </abs>

     

    Let me know if this works for you.


    #DashBoard


  • 3.  RE: Using MSC over ethernet or Telnet to control GrandMA2

    Posted 11-03-2020 18:50

    Hey. Thanks! It works. The MSC-monitor recognizes the messages. Do you have any clue on how to get Telnet remote to work?


    #DashBoard


  • 4.  RE: Using MSC over ethernet or Telnet to control GrandMA2

    Posted 11-03-2020 18:51

    I have never used the Telnet method for the GrandMA2.  Unfortunately, I don't know how to get it to work.


    #DashBoard


  • 5.  RE: Using MSC over ethernet or Telnet to control GrandMA2

    Posted 11-05-2020 08:15

    Ohhhh nice one Ben!

    Now I got to ask...
    Do you know if this is possible with the simpler DOT2 from MA Lighting as well?
    No documentation about it, so I kind of expect it not to be possible, but they are built by the same manufacturer, and have some of the same basic functionality...

    I'm not really expecting much, but it would be sooooooo nice if it was possible...


    #DashBoard


  • 6.  RE: Using MSC over ethernet or Telnet to control GrandMA2

    Posted 11-05-2020 14:24

    I have never looked at the DOT2 from MA Lighting.   So I really don't know if it's possible.

    I googled it quickly, but as you said, there does not seem to be any tech docs about it on their website.

     


    #DashBoard