TABLE OF CONTENTS


Triggers will allow you to turn on and off scenarios based on some kind of external input.


Control of an trigger is local and can be set using an background or movie load script.


Before you follow this guide, please complete the Create a Channel guide.


1. Locate the Admin / Trigger tab

  • To create an trigger go to the admin tab in the left menu.
  • Then select the Trigger section

2. Create the trigger

  • Click the Create button
  • Enter the name of the trigger
  • Click Create


3. Create an scenario to use the trigger in

  • Select the channel where you want to add the Scenario
  • Click New scenario

  • Change the Type to "Trigger"

  • Select the trigger you created.
  • Click Create 


4. Create an script to trigger the scenario

  • Save the following script as "ExampleTrigger.py"
    #pragma language Python.AXScript.2
    
    # This script will run every 10 seconds and read "True" or "False" from the file specified
    
    file = "C:\\DiseContent\\Trigger.txt"
    trigger = "ExampleTrigger"
    
    DISEScript.Log("notice", "Reading from file " + file)
    
    with open(file) as f:
        line = f.readline().strip()
        DISEScript.Log("notice", "Read this from the file " + line)
        if line == "True":
            DISEScript.SetTrigger(trigger, True)
            DISEScript.Log("notice", "Turn on")
        else:
            DISEScript.SetTrigger(trigger, False)
            DISEScript.Log("notice", "Turn off")

5. Create an Dise Movie that uses the trigger

  • Start the Dise Composer
  • ...
  • Select Add and select the script file created in step 4.
  • Select Command "Run Script"
  • Click Ok
  • Save the Dise Movie as "Example Trigger Script"
  • Upload the Movie to the Portal


6. Create layout for content and background script

  • Locate the Admin / Layout tab
  • Click Create Layout
  • Give the layout the name "Trigger example" with resolution 1920 x 1080
  • Find and open the Trigger example from the list
  • Use "Add Layer" to add two layers.
    Give both layers 100% width and height and set their position to 0 x 0. Name the first one "Content" and the second one "Script. Untoggle Visible on the script one.
  • Click Save


7. Finishing up

  • Create three playlists
    • Default content
    • Content that should be triggered
    • Trigger script playlist
  • Add some nice images to the first two playlists
  • Add the "Example Trigger Script" to the "Trigger script playlist"
  • Create two channels
  • Create another channel called "Trigger script channel" and add "Trigger script playlist"
  • When creating or editing the display select the layout "Trigger example".

  • And select the channels as such
  • Playback the content on the Player
  • Write True to the file C:\DISEContent\Trigger.txt to enable the layer, and False to disable.