The Python and Node.js Script apps allow you to run code outside of the browser sandbox.
To use these apps, the Dise System Bridge needs to be installed and running on the players, including any prerequisites such as the Node.js or Python runtimes.
The System Bridge provides a “backdoor” out of the sandbox and into the host operating system, for those use cases where this is needed. It is currently supported on Windows and Linux.
.png?sv=2022-11-02&spr=https&st=2025-12-06T03%3A37%3A32Z&se=2025-12-06T03%3A50%3A32Z&sr=c&sp=r&sig=e72PSLPTohaUWICc08jtOyO%2FybdMhyWcLTVjZrFqBmY%3D)
The app provides a ready-to use wrapper, allowing you to wrap up your script as a Dise One worker (background) app and publish it to a channel. The system will handle distribution of the latest version of your script to the player, launching the script, monitoring its execution and reporting of any errors, as well as handling updates of the script when you upload a new version to the CMS.
The System Bridge provides an API in both Python and Node.js, through which the script can exchange data with the player. Data exchange is done through player attributes, which can be used both to transfer (relatively small) data and to activate/deactivate triggers, allowing a script to trigger a scenario. Any attribute changes in the player will be broadcasted to all running scripts as events/callbacks, allowing scripts to react to things going on in the player.
Please refer to the System Bridge documentation for more information.
Installing and using the app
Ensure that the System Bridge service is properly installed, configured, and running on the players. The System Bridge can be deployed to players as a Software Addon Package
Download the app from here:
Add your script into the zip and change the name of the app to reflect the purpose of the script. See below for detailed instructions on customizing the app
Upload the zip (including your script and changes to the json files) as a template in the CMS
Create an invisible / background layer with a channel and playlist
Create a message, enter any command line parameters to the script (optional), and publish the message to the playlist
Customizing the app
The following customizations are mandatory when using the Python and Node.js Background Script apps:
Unpack the zip file, and replace the placeholder script.js or script.py file in the scripts folder with your script. Note that you are free to name your script file as you like, as long as you specify the name accordingly in the config.json file. Also note that you can add any number of script files in the same zip, and have them all executed on the player - either in parallel, or in sequence. The app supports .py, .js, and .mjs scripts. You can also add any auxiliary files needed by the scripts!
Edit template.json and give the app a descriptive name:
"name": "My script",Edit config.json:
Node.js:
{ "type": "AppConfig", "version": 1.0, "uniqueTemplateName": "NodeJSScriptHost", "runInSequence": false, "scriptFiles": [ "scripts/script.js" ] }Python:
{ "type": "AppConfig", "version": 1.0, "uniqueTemplateName": "PythonScriptHost", "runInSequence": false, "scriptFiles": [ "scripts/script.py" ] }If you plan to have more than one script app running on a player, make sure that each has a unique name in the uniqueTemplateName field. The unique name cannot contain spaces.
Make sure the name of your script file(s) are correctly listed under scriptFiles. The app requires that at least one script in the set exists. Missing scripts will be ignored. If there are none found, a client-alarm error will occur.
If you are running more than one script from the same app package, you have the option of setting runInSequence to true if you want your scripts to run sequentially in the order listed. Leave it to false if you want the scripts to run in parallel.Create a new zip with all files
Testing and debugging
For development, testing, and debugging purposes, you may publish the script app in a large visible layer, instead of an invisible background layer. The app will then show any console output from the script, along with progress information from System Bridge, as in this example:
.png?sv=2022-11-02&spr=https&st=2025-12-06T03%3A37%3A32Z&se=2025-12-06T03%3A50%3A32Z&sr=c&sp=r&sig=e72PSLPTohaUWICc08jtOyO%2FybdMhyWcLTVjZrFqBmY%3D)