Skip to main content

Create your first sensor interaction content

This article covers the complete flow of a first sensor project: preparing the device, finding out what the sensor sends, and building a content that reacts to it. The example is deliberately minimal — a content with three pages that jumps to a different page for each sensor event.

The flow is the same for every sensor type the platform supports. Only two things change with the hardware: the sensor configuration you set on the device, and the event values the sensor sends. Everything you do inside the content works the same way regardless of which sensor is connected.

Please note, in order to use Sensors and Sensor events, a Premium license is required.

Step 1 - Check the device license

  • Navigate to the Devices menu and select the device you want to use.
  • Open the Settings tab and find the License card.
  • Check that the license assigned to the device is Premium.

Sensor events are ignored on devices with any other license type, so this is worth confirming before you build anything.

Step 2 - Set the sensor configuration

The sensor configuration tells the player what is connected to it and how to interpret the messages it receives. Until it is set, the player ignores the sensor.

  • Connect the sensor to the player as the manufacturer describes.
  • In the Devices menu, select the device, open the Settings tab and find the Sensor config card.
  • Click Edit to open the Set sensor config modal.
  • Choose the entry in the Preset configurations list that matches your setup:
PresetUse it for
Sensors disabledTurning sensor handling off on the device.
Open ports for sensorsOpening the ports with the default configuration.
Generic config (Nexmosphere)Nexmosphere controllers and the units attached to them.
UDP server configSensors and devices that send events over UDP.
HTTP server configSensors and systems that send events over HTTP.
HTTP server config with basic authenticationThe same over HTTP, with basic authentication.
GPIO configGPIO inputs and outputs.
Sensors enabled with custom configAnything else — you write the configuration yourself.
  • Fill in any additional selectors the chosen preset offers, then click Save.

Some presets show extra selectors once you pick them, so you do not have to write the configuration by hand. The JSON editor below always shows what will be sent to the device, and it updates as you change the selectors. If your sensor needs a configuration that no preset covers, choose Sensors enabled with custom config and enter it in the editor.

info

The connection settings — and above all the port — depend on both the sensor and the player type, and a wrong port is the most common reason for a sensor that never sends an event. The article for your sensor lists the values to use: Nexmosphere, GPIO, UDP server, HTTP server, keyboard emulator.

Step 3 - Find out what your sensor sends

Before you can react to an event, you need to know what the sensor actually sends. The device console prints incoming sensor events on the screen.

  • In the Devices menu, select the device, open the Settings tab and find the Debug settings card.
  • Set Console to ON and confirm.
  • Interact with the sensor.
  • Read the sensor events as they appear on the device screen.

An incoming sensor event can carry three parts, and all three can be used as conditions in a content:

PartWhat it is
Sensor idIdentifies which sensor sent the event. Each connected sensor has its own id.
Sensor eventThe type of the reported event.
Sensor valueThe data belonging to the event.

Write down the combination that appears for each interaction you want to use. With multiple sensors connected, note the Sensor id as well, so the content can tell their events apart. With a single sensor, the id is not needed.

If nothing appears on the console, the sensor configuration is the place to look first, not the content.

tip

Set Console back to OFF once you have collected the values, so the console does not stay visible on the screen during playback.

Step 4 - Create the content

The example content is built from three ordinary pages and one overlay page:

PageWhat is on it
DefaultA single text widget reading Main Page. This is where the content starts and returns to.
page1A single text widget reading Page 1.
page2A single text widget reading Page 2.
Overlay pageA readout panel that stays visible on top of whichever page is displayed.
  • Navigate to the Contents menu and create a new Content. See Create Content if you have not done this before.
  • Add two more pages, so the content has three pages in total, and name them so you recognise them in the action list.
  • Add an Overlay page.

On the overlay page, place three text widgets as fixed labels — Sensor ID, Sensor Event and Sensor Value — and an empty text widget under each one. The empty widgets are what the sensor events will write into, so the values appear on the screen as they arrive. Leaving them empty is deliberate: they are filled at playback, not in the Designer.

The overlay is worth building even though the page jumps work without it. It shows the three fields of every event as the device receives them, which is what you check first when a jump does not happen.

Step 5 - Assign the events to actions

  • In the Designer, open the properties panel on the right and select the Content tab.
  • Find the External events section and click EDIT SENSOR EVENTS.

Edit sensor events button on the Content tab

The event configuration window opens. It has a Content wide events tab, which applies wherever the content is playing, and a Page wide events tab, which applies only while the selected page is displayed. For this example, stay on Content wide events.

Enable the conditions you need

Scroll down to Input settings. By default, only Sensor event can be used as a condition — the other two fields appear once you enable them here.

  • Allow specifying sensor ids — enable it with multiple sensors connected, to tell their events apart.
  • Allow specifying sensor values — enable it if the sensor reports the interaction in the value.

Input settings with the sensor id and sensor value options enabled

Add the page jumps

  • Click Add new. A new row appears, split into two halves: the condition on the left, and the action that runs when the condition matches on the right.
  • Fill the Sensor id, Sensor event and Sensor value fields with the values you collected from the console. A field left empty is not part of the condition, so a row with all fields empty matches every incoming sensor event.
  • Set Action type to Jump to, under the Navigation group, and select the target Page.

Jump to action with the target page selected

The example content uses two such rows, with the event and value of each interaction written into the condition:

Sensor eventSensor valueAction typePage
sensorEvent1sensorValue1Jump topage1
sensorEvent2sensorValue2Jump topage2

Replace sensorEvent1 and sensorValue1 with what your own sensor prints on the console — they are placeholders, because the actual names differ from sensor to sensor. Sensor id is left empty in both rows, since the example has only one sensor connected.

please note

Each sensor has its own id, event and value. Make sure the values in one row all belong to the same sensor, otherwise the condition never matches.

Add the readout actions

These three rows fill the empty text widgets on the overlay page, so the incoming event is visible on the screen.

  • Click Add new and set Action type to Interact widget.
  • Select the Overlay page and the empty Widget the value should be written into.
  • Set Value origin to Property of received value.
  • Enter the field you want in that widget as the Property name.
  • Leave all three condition fields empty, so the row runs on every incoming event.

Repeat it for each of the three fields:

Property nameWidget on the overlay page
idThe one under Sensor ID
eventThe one under Sensor Event
valueThe one under Sensor Value
  • Click Save.

With Value origin set to Received value, the action forwards the entire incoming sensor message rather than a single value. Since the text widget expects a specific value, it does not receive the data in the format it requires.

A sensor message usually contains three fields:

  • Sensor id
  • Sensor event
  • Sensor value

By setting Value origin to Property of received value and entering the field name as the Property name, the action extracts that one field from the message and passes it to the widget in the expected format.

None of the five rows has Final switched on, so every row whose condition matches is executed. That is what lets the three readout rows and a page jump all run on the same event.

Step 6 - Test the content

  • Save the content and assign it to the device. See Assign Content to Devices.
  • Interact with the sensor. The overlay shows the id, event and value of what arrived, and the content jumps to the page assigned to that event.

If the overlay fills in but no jump happens, the device is receiving events and the mismatch is in a condition — compare the values on the overlay with the values in the event rows. If the overlay stays empty as well, nothing is arriving at the content, so go back to the sensor configuration in Step 2.

Downloadable content

The example content from this article, with the three pages, the overlay readout and all five event rows already set up. Import it, then replace the placeholder event and value in the two Jump to rows with the ones your own sensor sends.

Basic sensor interaction content

basic-sensor-interaction-content.zip

Download

Please enable Import as Content in the import modal!

Where to go next