Introduction
Nexmosphere manufactures a wide range of small form factor devices that either trigger, or are triggered by, external events. Trigger devices include buttons, pick-up sensors, and presence detection, while triggered devices include lighting, audio, and video players.
Collectively, Nexmosphere sensors and controls - known as "Elements" - can be incorporated into any Windows, BrightSign, or Android-based Intuiface experience using the Nexmosphere Interface Asset.
This article explains the basics of Nexmosphere and how to incorporate Nexmosphere Elements in your own Intuiface projects.
NOTE: Nexmosphere cannot be used with web-deployed experiences.
Sample experience in the Intuiface Examples catalog
If you have a Nexmosphere Demo Board DM-XN04 or DM-XC05, you can download this Explore Nexmosphere Sensors and Actuators sample from the Intuiface Examples catalog. The experience will work out of the box and enable to you test all the sensors & actuators of these demo boards directly in your Composer or Player.
How Nexmosphere Works
A detailed reference guide hosted by Nexmosphere walks through the use of Nexmosphere with Intuiface. The rest of this article is written from the perspective of an Intuiface user.
Simply put:
- a Nexmosphere controller connects to a Windows PC, BrightSign player, or Android device via a USB cable
- one or more Nexmosphere Elements connects to a controller
- a proprietary X-Script command language is used to communicate with and receive messages from an Element
X-Script commands rely on the classic serial communication protocol, so no custom drivers are required. As a result, controllers and Elements are plug-and-play, only requiring third parties like Intuiface to open the serial port and then send/receive commands.
To do this with Intuiface, simply add the Nexmosphere Interface Asset into your experience using Composer's Interface Assets panel.
Videos
To see how to use the Explore Nexmosphere Sensors and Actuators sample with demoboards you can get from Nexmosphere, watch this video:
To learn more about how to use the Nexmosphere Interface Asset in Composer, you can look at this one:
(Optional) Modifying the Nexmosphere Interface Asset
For most users, it is enough to use out-of-the-box capability shipped with the Nexmosphere Interface Asset. As noted above, simply add it to your experience using the Interface Assets panel.
However, the Nexmosphere Interface Asset code can be modified before adding it to your Intuiface experience.
Why modify it? Without modification, this interface asset can exchange a single X-Script command with a single Nexmosphere Element. Through modification, you could have the interface asset send multiple, pre-defined commands to a single Element or a combination of commands to multiple Elements, all with a single action. simplifying the trigger/action approach in your experience.
The code for the Nexmosphere Interface Asset is found on GitHub. Instructions for modifying it can be found on that GitHub page.
NOTE: Intuiface will not provide technical support for third-party modifications of the interface asset. However, at its discretion and without any commitment, Intuiface may release its own enhanced versions of the IA in the future.
To add a modified Nexmosphere Interface Asset into an Intuiface experience, follow these steps:
- Close all running instances of Intuiface Composer.
- Download the latest released package of the interface asset.
- Extract the archive, open the resulting OutputInterfaceAsset folder, and copy the Nexmosphere folder to the path "[Drive]:\Users\[UserName]\Documents\Intuiface\Interface Assets".
- Launch Intuiface Composer and open your project.
- Open the Interface Assets panel and select the Add an Interface Asset option. When you enter "Nexmosphere" (or just a portion of that word) in the search bar, you should see the Nexmosphere Interface Asset.
- Add it to your project.
Using the Nexmosphere Interface Asset
Configuration
The only necessary configuration step is to specify the port used by a particular Nexmosphere controller. A separate instance of the Nexmosphere Interface Asset is required for each controller and thus for each port. (Nexmosphere controllers can be daisy-chained, in which case only a single port will be occupied.)
- NOTE: Multiple instances of the Nexmosphere Interface Asset are not supported when running on Android-based devices. This means an Android experience can only interact with one controller or daisy chain of controllers (and thus one port) at a time.
Identifying the port:
- Android, BrightSign, and Raspberry Pi
- The serial port path is represented by USBx, where x is the port number. It's usually USB0, so if you're unsure, start with that. If not, then it could be USB1, USB2, .....
- Windows
- Open Windows Device Manager and look in the Ports section for the port connected to the Nexmosphere controller. The port name contains the letters "COM" followed by a number. In the image below, the port name is COM8.
- NOTE: The label "Prolific USB-to-Serial Comm Port" refers to the Windows driver used for the USB connection between a Windows PC and the Nexmosphere controller. The device may not be recognized when you first connect a Nexmosphere controller to your Windows PC. Right-click the "Unknown device" entry, select "Update driver", and then choose the "Search automatically" option.
- Open Windows Device Manager and look in the Ports section for the port connected to the Nexmosphere controller. The port name contains the letters "COM" followed by a number. In the image below, the port name is COM8.
Using Multiple Controllers:
- BrightSign and RaspberryPi
- For each Nexmosphere Interface Asset that will be used, open the Properties panel and enter the serial port path in the "Serial Port Path (other platforms)" property. Here is what it looks like in the X-Ray Panel if the targeted serial port path is "USB0". (The 'Serial Port Name (Windows)' value will be ignored.)
- For each Nexmosphere Interface Asset that will be used, open the Properties panel and enter the serial port path in the "Serial Port Path (other platforms)" property. Here is what it looks like in the X-Ray Panel if the targeted serial port path is "USB0". (The 'Serial Port Name (Windows)' value will be ignored.)
- Windows
- For each Nexmosphere IA used in a Windows-based experience, open the Properties panel and enter the port name in the "Serial Port Name (Windows)" property. Here is what it looks like in the X-Ray Panel if the targeted port name is "COM1". (The 'Serial Port Path (Android, BrightSign)' value will be ignored.)
- For each Nexmosphere IA used in a Windows-based experience, open the Properties panel and enter the port name in the "Serial Port Name (Windows)" property. Here is what it looks like in the X-Ray Panel if the targeted port name is "COM1". (The 'Serial Port Path (Android, BrightSign)' value will be ignored.)
Properties, Triggers, and Actions
Properties
- Serial Port Name (Windows) / Serial Port Path (Android, BrightSign): The port's name on the target device for the desired Nexmosphere controller. The value of the property not applicable to the device's operating syste will be ignored.
- Auto reconnect: Toggle whether Intuiface should attempt to reestablish a connection between the experience and the Nexmosphere controller if it is lost. A disconnect could occur if the USB cable is unplugged and reconnected or the controller is powered off and back on. (This capability is not available on BrightSign players.)
- Is connected: (read-only) True/false identifier for whether there is an active connection with the controller.
- Activity log: (read-only) A time-stamped list of X-Script commands sent and received and error messages if badly formatted commands are sent from Intuiface.
Triggers
- X-Script Command: Listens for an incoming X-Script command over the associated port. When a command is received, its contents are available as the following read-only properties:
- TYPE
- ADDRESS
- FORMAT
- COMMAND
- X-Script Command (full line)
This is the full command, a combination of the four command Elements listed above. See the X-Script Command Syntax section below.
Actions
- Connect the Nexmosphere device: Try to establish a connection with the Nexmosphere controller on the associated port if one doesn't exist.
- Disconnect the Nexmosphere device: Stop the connection to the Nexmosphere controller on the associated port.
- Send X-Script command: Send a command by independently specifying Type, Address, Format, and Command separately. (See the X-Script Command Syntax section below.) Brackets are automatically placed around the command. If the command is poorly formatted, Intuiface will not send the command, recording this failure in the Activity Log property.
- Send X-Script command line: Send a command using the complete command line. The result is no different from the "Send X-Script command" action mentioned above. Intuiface will not send the command if the command is poorly formatted, recording this failure in the Activity Log property.
X-Script Command Syntax: An Overview
X-Script commands are a proprietary language universal to all Nexmosphere Elements. Commands are a structured sequence of characters with the following pattern:
TYPE ADDRESS FORMAT [COMMAND]
The following comes from the X-Script Serial API Manual:
Commands are not unique for each Element. Instead, each Element interprets the same commands differently. The same commands are also used to represent different messages depending on whether they are sent to or received from a Nexmosphere Element.
For example:
- Command: X001A[0]
- X-Touch Button Board
- Sent to button board -> Shut off all LED lights
- Sent from button board -> No buttons are being pressed
- X-Eye Motion
- Sent from motion detector -> No motion detected
- X-Touch Button Board
How to specify a particular Nexmosphere Element in a command
More than one Element can be connected to the same controller. Each Element is connected to an independent controller "interface" and each interface has a unique address. The second field of an X-Script command contains the address; thus, every command encodes which Element is the command's target.
For example, in the command X001A[0], the address is '001', the first interface on the controller.
If using the XM-range controller, multiple controllers can be daisy-chained and thus connected to the same port. Pages 4 through 6 of the X-Script Serial API manual discuss addressing.
Testing Nexmosphere devices and the X-Script command language
The Nexmosphere Interface Asset includes a default data template enabling you to work with all properties, triggers, and actions in a running Intuiface experience so you can test it out in real-time.
To add the default data template into your experience, just drag the IA from Composer's Interface Assets panel and into your experience. It will look like the following. Enter Play Mode and try it out!
Comments
0 comments
Article is closed for comments.