Html producer parameter in config

Hello,
I set a HTML graphics at the engine startup like this

<producers>
  <producer id="10">[html] "ticker/ticker"</producer>	
</producers>

How can I send a default data like this?

<templateData>
  <componentData id=\"style\">
    <data id=\"text\" value=\"weather\"/>
  </componentData>
</templateData>

Thanks,
Andrea.

Use a dataset and set the name of it as default inside your templates code. Then send the weather updates to the dataset.

I’m not sure if this is possible, internally these producers are being run as if they were a PLAY command, and I think that templateData and the js methods being invoked isn’t supported when the html file is loaded in this way

There is a slightly clunky method that can be used when the html is either a local file or appropriately programmed local web server. The trick is to add a get request onto the html file name. Something like:

<producers>
  <producer id="10">[html] "ticker/ticker?style=weather&date=today</producer>
</producers>

The template must include a function invoked when all the template has loaded. For example:

<body onload="init()">
</body>

In function init() you inspect global object window.location.search which returns the section of the url starting with the "?'. You then parse the rest of the query string to get an array of token_name=token_value strings. Then split each of these strings at the “=”.

I have used this on a template that displays the tube train arrivals at London Camden Town underground station. It allows the display to be configured and the style of typeface set. Unfortunately the train display segment is not operating at present because London Transport are still resolving a cybersecurity issue that started in early September. However the selection of all 4 routes through the station or just one, and the selection of the typeface all work. The template is available as Example 3 here.

If you are on windows you can use CasparLauncher to run the server and immediately send console commands to it.
You just add the line
CG 1-10 ADD 1 "ticker/ticker" 1 "<templateData><componentData id=\"style\"><data id=\"text\" value=\"weather\"/></componentData></templateData>"
to the Startup commands list and it will be sent to the server at startup.

Hi,
Caspar Launcher starts the server but doesn’t send any commands.
Any idea?

…and what happens, when you add data to these commands, the same way, as the client does? You can easily get such a command line from Caspar’s log,

No, nothing,
I don’t see the commands on console, it seem sw doesnt’ send them to caspar.

If you use server version 2.4 and up, use the launcher build 2.0-beta.
Console encoding has been changed to unicode in newer builds. That should fix it.

Also server config editor will show you the correct options.

thank you very much,
it works fine