Facility Control

 View Only
Expand all | Collapse all

Dashboard and CasparCG

  • 1.  Dashboard and CasparCG

    Posted 10-08-2014 19:27
    Dashboard Version: 6.1.0

    Hi,

    I'm fairly new to Dashboard and am messing with it's ability to use communication via ethernet with other devices to automate a few things.

    The trouble I'm running into is requesting a list of media items and having those items inserted into a dropdown box in dashboard.

    I looked at the Hyperdeck example on the Ross website and tried the 'getListenerByID()' function but when I pull up the debugger it says that that function doesn't exist. Is there a different function I should be using, is 'getListenerByID' exclusive to Dashboard 6.2? And if it is, is there another function I can use to output the data returned to me into a dropdown box?

    Thanks!


  • 2.  RE: Dashboard and CasparCG

    Posted 10-08-2014 19:30
    Hi Michael,

    Version 6.2.0 is released now on the website and has new ogScript functions available in it (including those).

    You can download it at:

    http://www.rossvideo.com/control-systems/dashboard/products/dashboard.html#download

    Let me know if you still have issues after getting the latest version.

    Troy.

    #DashBoard


  • 3.  RE: Dashboard and CasparCG

    Posted 10-08-2014 19:37
    Amazing! Thanks Troy, I'll give it a try right now.

    #DashBoard


  • 4.  RE: Dashboard and CasparCG

    Posted 10-08-2014 21:51

    It looks like it's accepting the function now. Now I'm getting another error:

    var casparServer = ogscript.getListenerById('CasparCGServer');
    
    casparServer.start()
    
    EXCEPTION:
    
    TypeError: Cannot call method "start" of null (anonymousLabelTask#5)

    I have the listener declared as a 'Connect as Client' with the correct client information for the CasparCG server.

    I know it can contact the server because I can send RossTalk commands to it in the same page.


    #DashBoard


  • 5.  RE: Dashboard and CasparCG

    Posted 10-09-2014 21:49
    Hi Michael,

    Can you e-mail me your custom panel, probably the easiest way for me to look into it.

    tenglish@rossvideo.com

    Troy.

    #DashBoard


  • 6.  RE: Dashboard and CasparCG

    Posted 12-18-2014 01:01

    Hey Troy,

    I'm finally having some time to revisit this and I was looking at the Send-Receive dashboard example on the website.

    I see there's a way to trigger a 'callback' function after a message is sent, and this sounds like the perfect thing I need to make this end up working.

    I tried it out, but for some reason I keep receiving a NULL string, even though the caspar server is sending back data.

    Here's my code:

    rosstalk.sendMessage(ogscript.getPrivateString('hosts', 'CasparCG.host'), parseInt(ogscript.getPrivateString('hosts', 'CasparCG.port')), 'INFO', callback);
    
    function callback(success, sentData, resultString, exception)
    
    {
    
       if (success) {
    
       ogscript.debug("Sent Data: " + sentData);
    
       ogscript.debug("TCP result: " + resultString);
    
       } else{
    
       ogscript.debug("exception: " + exception);
    
       }
    
    }

    my debug output I get when I trigger this is:

    17:00:18:502: Sent Data: INFO

    17:00:18:503: TCP result: null

    Any ideas?


    #DashBoard


  • 7.  RE: Dashboard and CasparCG

    Posted 12-18-2014 01:02
    I know for a fact caspar is sending the data because I can pull it up in puTTy and I get the response back to me when I run the 'INFO' command.

    #DashBoard


  • 8.  RE: Dashboard and CasparCG

    Posted 12-19-2014 15:36

    Hi Michael.

    The default implementation of rosstalk.sendMessage is used for "fire and forget" messages (messages that do not require a response".

    To receive an acknowledgement from your device, you will need to either use a `
    ` tag, or take advantage of a feature we introduced in DashBoard 6.2.4 called `sendMessageWithResponse`:

    `

    function callback(success, sentData, resultString, exception)

    {

    }

    rosstalk.sendMessageWithResponse('[host]', [port], '[message]', '[end of message indicator]', callback);

    `

    So, in your example, you would nee to know what terminates the response - here is an example where we would wait for a newline character `'n'`.

    (NOTE: Due to an issue with this forum, I can't seem to make the character appear correctly. A newline is actually `[backslash]n`)

    `rosstalk.sendMessageWithResponse(ogscript.getPriv ateString('hosts', 'CasparCG.host'), parseInt(ogscript.getPrivateString('hosts', 'CasparCG.port')), 'INFO', 'n', callback);

    function callback(success, sentData, resultString, exception)

    {

    if (success) {

    ogscript.debug("Sent Data: " + sentData);

    ogscript.debug("TCP result: " + resultString);

    } else{

    ogscript.debug("exception: " + exception);

    }

    }`

    #DashBoard


  • 9.  RE: Dashboard and CasparCG

    Posted 12-20-2014 19:55
    Hi James. Thanks! I'll have to look into that new function when I get back into work.

    #DashBoard


  • 10.  RE: Dashboard and CasparCG

    Posted 03-11-2016 17:04

    Dashboard and CasparCG is interesting

    Now I'm trying to connect to Caspar Server. This is very cool ....
    Very simple, I just change port into CasparCG port (5250)
    and then create custom command like in this picture:

    IT'S WORKS GOOD.

    [URL=http://s967.photobucket.com/user/ninesoul-clothing/media/ROSSVIDEO%20Forum/Dashboard%2001_zpslsx45bcv.png.html][/URL]


    Now I want to send a text from dashboard to CasparCG server with XML format.
    But I never succses for this. Could anyone point me into a right direction ?


    Here the XML format that I want to send to CasparCG server:

    "<templateData>
        <componentData id=\"player1\">
        <data id=\"text\" value=\"Gilar Kadarsah\"> 
        </data> </componentData>
    </templateData>"

    And this is Dashboard Source Code I have created:

    <button buttontype="push" height="101" left="56" name="CASPAR" top="132" width="198">
       <task tasktype="rosstalk">rosstalk.sendMessage('localhost', 5250, '  CG 1-9 ADD 1 playerid 1');</task>
    </button>

    How do I have to write XML with OgScript in Dashboard?


    Thanks


    Appreciate for comment and help





    #DashBoard


  • 11.  RE: Dashboard and CasparCG

    Posted 03-11-2016 20:24

    I won't pretend to know anything about Caspar's protocol but, based on another forum post I read (http://casparcg.com/forum/viewtopic.php?f=3&t=970), it looks like you need to send the XML like this:

    <button buttontype="push" height="101" left="56" name="CASPAR" top="132" width="198">
    <task tasktype="ogscript">rosstalk.sendMessage('localhos t', 5250, 'CG 1-9 ADD 1 playerid 1 &lt;![CDATA["&lt;templateData&gt;&lt;componentData id="player1"&gt;&lt;data id="text" value="Gilar Kadarsah"&gt;&lt;/data&gt;&lt;/componentData&gt;&lt;/templateData&gt;"]]&gt;');</task>
    </button>

    Yes, this is incredibly ugly. The good news is, in the UI, it looks like this:


    #DashBoard


  • 12.  RE: Dashboard and CasparCG

    Posted 03-12-2016 09:25

    Hi James .... thank you very much for the script.

    Your code that you had wrote has been received by server:
    but I think the xml format is not match with The CasparCG server want.
    This is the log of CasparCG server:

    [2016-03-12 16:20:45.318] [4776] [info]    Received message from 127.0.0.1: CG 1-9 ADD 1 playerid 1 <![CDATA["<templateData><componentData id="player1"><data id="text" value="Gilar Kadarsah"></data></componentData></templateData>"]]>\r\n
    [2016-03-12 16:20:45.333] [5392] [info]    flash[cg20.fth.pal|0] Initialized.
    [2016-03-12 16:20:45.333] [5392] [info]    flash[cg20.fth.pal|0] Invoking add-command: <invoke name="Add" returntype="xml"><arguments><number>1</number><string>PLAYERID.ft</string><true/><string></string><string><![CDATA[ <![CDATA[]]></string></arguments></invoke>

    It should be like this: (CasparCG server want)

    [2016-03-12 15:25:44.686] [4640] [info]    Received message from 127.0.0.1: CG 1-20 ADD 1 "PLAYERID" 1 "<templateData><componentData id=\"player1\"><data id=\"text\" value=\"Gilar Kadarsah\"/></componentData></templateData>"\r\n
    [2016-03-12 15:25:44.697] [1852] [info]    flash[cg20.fth.pal|0] Initialized.
    [2016-03-12 15:25:44.697] [1852] [info]    flash[cg20.fth.pal|0] Invoking add-command: <invoke name="Add" returntype="xml"><arguments><number>1</number><string>PLAYERID.ft</string><true/><string></string><string><![CDATA[ <templateData><componentData id="player1"><data id="text" value="Gilar Kadarsah"/></componentData></templateData>]]></string></arguments></invoke>

    Now i'm trying to modificate of your code.

    Thanks for your time and have a great day


    #DashBoard


  • 13.  RE: Dashboard and CasparCG

    Posted 03-12-2016 10:39

    Hi James .... This code works for CasparCG server

    <button buttontype="push" height="59" left="12" name="CASPAR" top="20" width="125">
       <task tasktype="ogscript">rosstalk.sendMessage('localhost', 5250, 'CG 1-9 ADD 1 playerid 1 "&lt;templateData&gt;&lt;componentData id=\\"player1\\"&gt;&lt;data id=\\"text\\" value=\\"Gilar Kadarsah\\"/&gt;&lt;/componentData&gt;&lt;/templateData&gt;"');</task>
    </button>

    On rosstalk wouldbe like this:


    Now I want to Make Text Variable so I can change "Gilar Kadarsah" text with other name. is this possible?

    I'm looking for something like text field tools but i can't find it

    Thanks


    #DashBoard


  • 14.  RE: Dashboard and CasparCG

    Posted 03-15-2016 19:42

    Hi Gilar.
    I would strongly recommend you go to "ogScript" mode instead of "RossTalk" mode. That way you can build-up what you want to send as JavaScript strings.

    <button buttontype="push" height="59" left="12" name="CASPAR" top="20" width="125">
    <task tasktype="ogscript">
    var name='Gilar Kadarsah'; //Note, you could get the value from a parameter like this: params.getValue("NAME-PARAM-OID", 0); rosstalk.sendMessage('localhost', 5250, 'CG 1-9 ADD 1 playerid 1 "&lt;templateData&gt;&lt;componentData id="player1"&gt;&lt;data id="text" value="' + name + '"/&gt;&lt;/componentData&gt;&lt;/templateData&gt;"');
    </task>
    </button>

    #DashBoard