Interactivity via RS232

From SpinetiX Support Wiki

Jump to: navigation, search

This page is about interactivity with external devices connected via the serial port.
Applies to HMP400/W (SYSTEMS), HMP350, HMP200, HMP130, and HMP100 devices.

Introduction

Example of integration via RS232 with Qmatic

Interactivity via RS232 refers to the HMP quality of reacting in a user-defined manner (i.e. reactive action), following the input received from external devices via serial connection. This means that the HMP can interact with practically any RS-232 standard compliant device connected to its serial port, both to receive and send data messages. For instance, a message received on the serial port could trigger a content switch on the screen. Or the player could send a message on the serial port when a certain event occurs, like turning the screen on in the morning.

Here are some examples of third-party devices that can used:

  • Control Systems: Crestron (e.g., MPC-M5-B-T), AMX, Extron
  • Queue Management Systems: Qmatic
  • GPS receivers: Navman, Evermore
  • contact closure / relay controllers: NCD, Quasar, Neets QueBec


On the implementation side, the RS232 communication is handled through two distinct methods:

Configuration

To enable RS232 interactivity on the HMP, the first step is to make sure that the RS232 port is enabled on the HMP.

Next, if you intend using a protocol file, then you need to write that serial port protocol file and then activate it on the player.

How to create interactive content

Using JavaScript COM API

Currently, there's no interactive built-in widget included into Elementi Library for this type of interactivity, yet it should be fairly easy (though some JavaScript knowledge is required) to install a handler for com events as explained on the JavaScript COM API page.

Using a protocol file

Alternatively, an FSM protocol file can be written to translate RS232 input messages into Shared Variable update actions or into interactive events. With other words:

  1. Use the <onInput> transition to match the command sent from the external device.
    • The matching is done using either the data or match attribute. You can also change the state using the goto attribute.
  2. Inside this transition or the specified state, use either the <update> action (to update a Shared Variable) or the <fire> action (to fire an interactive event).
  3. Use one of the interactive widgets from Elementi Library to implement a reactive action.

For such FSM files examples, see Receiving commands, Sending and receiving commands and NMEA-0183 protocol file. For a sample project, see GPS test project.

See also

This page was last modified on 15 December 2020, at 12:33.