WebSocket service

When your machine runs a WebSocket server, you can access it without you first needing to establish a VPN connection to your device.

The Lenze server will act as a proxy for the WebSocket connection between your computer, that is running a WebSocket client, and the machine that is running the WebSocket server.

  • Add a WebSocket service
  • Use a WebSocket service

Add a WebSocket service

The next steps show you how to set up a WebSocket service.

  • Open the Fleet Manager app, which is accessible from the Apps menu in the top right corner if you are currently in a different X4 Remote app.
  • Open the main menu, go to Devices in the left menu and select the concerning device.
  • Click on the Add a service icon in the left menu and select [WebSocket server].
  • Enter the requested information (details below) and click on [Add].
Field Description
Name Name your WebSocket service for easy distinction from other services.
Protocol

The protocol supported by the machine’s server: WebSocket (WS) or WebSocket Secure (WSS).

Communication between your computer and the device (x500) will always be secure, regardless of the protocol choice.

IP address The IP address of your machine. 
Port The port number where the WebSocket server can be reached. By default it’s 80 (for WS) or 443 (for WSS).
Access category The access category determines who can use this WebSocket service. More information about access categories and how you can create one can be found here.

You have now made the changes in X4 Remote, but these are not yet active in your device. You will need to push your changes to your device for them to take effect.

  • Open [Config control] in the top right corner, verify the changes you’ve made (example below), and click on [Push changes].
Changes (example) Description
lan.forwarded_port=vpn,2000,192.168.140.94,80 A port forwarding for the VPN connection is added for the WebSocket service to work.

All set up

Now you're all set up to access your machine's WebSocket server.

Use a WebSocket service

You can use the WebSocket service once the device is back online.

You can connect to your WebSocket server using an app that includes a WebSocket client. This app also needs to support the option for you to login to your X4 Remote account and select a companyagent (your device), and agent’s service (WebSocket). The X4 server will act as a proxy for the WebSocket connection.

 

Kontaktformular