Remote Access for ThingWorx Edge MicroServer (EMS) and ThingWorx Edge SDK Devices
Remote access to devices running ThingWorx Edge SDK applications, a ThingWorx Edge MicroServer (EMS), or Lua Script Resource (LSR), is supported in all currently supported versions of ThingWorx Platform. The components of remote access in ThingWorx follow:
• The ThingWorx Platform 8.5.x or later.
• The ThingWorx Remote Access Extension (RAE) imported into the ThingWorx Platform to create the Remote Access Subsystem as well as all the entities needed for remote access.
• A remote device that is running a remote access server, such as SSH or VNC, and either ThingWorx Edge SDK agent, an EMS, or LSR. These ThingWorx agents communicate using the ThingWorx AlwaysOn protocol.
• The client-side application to be used over the remote access connection, also known as a "tunnel". For example an SSH client or VNC Viewer.
• The ThingWorx Remote Access Client (RAC) installed on an end user's machine.
The following diagram illustrates the interaction of these remote access components:
In the illustration, the bold lines indicate the remote access tunnel between the user and the edge device.
The flow of a remote access session follows:
1. The user launches a remote session through an application or mashup such as Asset Advisor.
2. The mashup initiates the remote session in ThingWorx:
a. ThingWorx establishes two new WebSocket endpoints (client and server) for the remote session (tunnel) id.
b. ThingWorx invokes a service on the remote device, indicating it needs to start the remote session and connect to the remote access "server" WebSocket endpoint.
3. The mashup launches the RAC on the user's computer.
4. The RAC creates a persistent connection back to the ThingWorx Platform for messaging and control.
5. The RAC establishes a WebSocket (persistent) connection to the ThingWorx Platform at the "client" endpoint.
6. The RAC creates a local port and notifies the user to connect their client to the local port.
7. The user launches the client and connects it to the local machine on the provided port.
8. The client sends data over the connection from the RAC through the GAS to the remote device and its remote access server.
9. The remote session is established.