Results 1 to 14 of 14

Thread: Datalinks & Websockets

  1. #1
    Registered User
    Join Date
    Aug 2020
    Location
    UK
    Posts
    3

    Datalinks & Websockets

    Hi all,

    First time on the forums, probably won't be my last!

    I am interested in utilising the websockets API to integrate with a customers clock and although the automation and integration document gets me 90% of the way there I'm still not completely sure the exact syntex for datalink changing. I'm using a TC1.

    I've seen the following, although I'm not sure its correct;

    url;
    Code:
    ws://ipaddress:port/v1/shortcut_notifications
    message;
    Code:
    name=set_datalink&datalink_key=name&datalink_value=value
    With name being the %name% and the value being the value I am changing it to.

    Also as a side question can the message be in JSON format? ie just sending { "name": "value" }

    I'm fairly new to the Tricaster ecosystem but programming and video commissioning is my bread and butter so all the documentation I have been through makes a lot of sense it just seems to be missing a little detail in places and i don't have a Tricaster at hand to try different ideas so I thought I'd consult with the experts!

    Thanks in advance

    Keith

  2. #2
    There is more to setup and maintaining websocket then just the ws:// URL.

    All command can be sent using a HTTP command as well. In your example, the command would be.

    Code:
    http://{tricaster-ip}/v1/shortuct?name=set_datalink&datalink_key={name}&datalink_value={value}
    The above command is a GET style HTTP command, text formats like JSON or XML doesn't really apply. It is possible to submit the HTTP command via a POST method, in that case the data has to be formatted as XML.
    Kane Peterson
    Solutions Architect
    NewTek, Inc.

  3. #3
    Registered User
    Join Date
    Aug 2020
    Location
    UK
    Posts
    3
    Hi Kane,

    Thanks for the quick reply.

    I totally understand there is more to a websocket than just a url and message, I just didn't want to confuse the post with lots of unneccessary info. The thing that I haven't been able to get from the documentation is the correct syntex for the message element of the websocket and the correct address to use for datalink changes.

    i just read through the document again and found /v1/shortcut_state seems to be the address to use if you don't need a reply back from the Tricaster. With this is the set_datalink the correct command to send with the associated key-value pair?

    I'm very comfortable with the GET and POST HTTP commands and I was planning to use them to test the datalinks work but in the final software I want to utilise Websockets as it's a clock so it will be updating at least once a second. I also have another piece of hardware which needs the information which I've already got a websocket running for, so it is nice to have alll the code running the same protocols.

    Thanks

  4. #4
    Yes, what you have for the WebSocket URL and the command to send is correct.
    Kane Peterson
    Solutions Architect
    NewTek, Inc.

  5. #5
    Registered User
    Join Date
    Aug 2020
    Location
    UK
    Posts
    3
    Thanks for the help Kane.

    I got in front of a TC1 for testing today and got the websockets to work but it would only work when I sent the message to v1/shortcut_state_notifications.

    Other than that little bug it worked perfectly!

  6. #6
    Registered User
    Join Date
    Oct 2015
    Location
    Israel
    Posts
    109
    Kane: Is there a link to see all commands using a HTTP command?

  7. #7
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    19,883
    Just to mention it, the vast majority of shortcuts are listed in the corresponding LivePanel page.
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  8. #8
    You will always get the latest shortcuts by recording actions in the macro system.

    You can get a list of most of them, by opening the IP address of the TriCaster system in a browser, click on 'Resources', then click on 'Shortcut Commands'.
    Kane Peterson
    Solutions Architect
    NewTek, Inc.

  9. #9
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    19,883
    Quote Originally Posted by kanep View Post
    You can get a list of most of them, by opening the IP address of the TriCaster system in a browser, click on 'Resources', then click on 'Shortcut Commands'.
    This list is taken right from the command list TriCaster uses, so it's always up to date,
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  10. #10
    Registered User
    Join Date
    Oct 2015
    Location
    Israel
    Posts
    109
    Wow - Thats awesome....

    Thank you Kane and SBowie.

    Trying to figure out how to send through the net - http a commands such as:
    Choose a specific video from DDR1 and play it on program.
    Than move into a ME1

    Trying to select DDR1 with specific video.
    Play it.
    http://10.0.0.39/v1/shortcut?name=dd...ps=0&ddr1_play
    What am I missing here?


    Thanks again....

    Best,

    Tomer
    Last edited by Tomerson; 09-03-2020 at 08:00 AM.

  11. #11
    Quote Originally Posted by Tomerson View Post
    Wow - Thats awesome....

    Thank you Kane and SBowie.

    Trying to figure out how to send through the net - http a commands such as:
    Choose a specific video from DDR1 and play it on program.
    Than move into a ME1

    Trying to select DDR1 with specific video.
    Play it.
    http://10.0.0.39/v1/shortcut?name=dd...ps=0&ddr1_play
    What am I missing here?


    Thanks again....

    Best,

    Tomer
    It's one command per URL, if you want to select clips and play clips, issue two requests.
    Kane Peterson
    Solutions Architect
    NewTek, Inc.

  12. #12
    Registered User
    Join Date
    Oct 2015
    Location
    Israel
    Posts
    109
    Thank you - will keep on trying.
    Its open up a lots of options.

  13. #13
    Registered User
    Join Date
    Jun 2012
    Location
    Europe
    Posts
    274
    Quote Originally Posted by SBowie View Post
    This list is taken right from the command list TriCaster uses, so it's always up to date,
    it seems there are shortcuts which are not in this shortcut command list...... so it's not fully up-to-date.

  14. #14
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    19,883
    Quote Originally Posted by doctorsunshine View Post
    it seems there are shortcuts which are not in this shortcut command list...... so it's not fully up-to-date.
    It draws on the internal shortcut list actually used by the software, so yes - really it is. Some shortcuts are marked "Hidden", however. Generally, shortcuts that would be of any value to users for macro purposes are exposed. Those that are not tend to be arcane things that, for example, must be used in combination for and aren't relevant to most users, apart from developers. I wouldn't say it could never happen that something is marked hidden that could be useful, but that would be unusual and unintended.
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •