Add or Remove HTML5 Web XPanel Support

The HTML5 Web XPanel functionality must be added to the CH5 project prior to deployment on a control system. For more information on deploying a project with the HTML5 Web XPanel functionality, refer to HTML5 Web XPanel Deployment.

Add XPanel Support

To add the HTML5 Web XPanel functionality to your CH5 project:

  1. Setup the programming environment as described in Control System Configuration.
  2. Edit the project-config.json file:
    1. Set the useWebXPanel property to true.
    2. Locate the config/controlSystem object.
    3. Add the following optional parameters to the config/controlSystem object when the provided values are not the default values.
    4. NOTE: The parameters provided in the config/controlSystem object will be overwritten when the same parameter is proved as a URL parameter. Refer to Change XPanel Connection Parameters via URL.

      • host: The control system host. It can be provided as a host name, FQDN (fully qualified domain name), or an IP address. The default value is the same domain as the Web XPanel URL.
      • ipId: The IP ID of the control system program. The default value is "0x03".
      • roomId: The Crestron Virtual Control (VC-4) Room ID. The default value is the Room ID in the Web XPanel URL provided by VC-4 (/VirtualControl/{ROOMID}/XPanel). This parameter is applicable only for VC-4 deployments.
      • port: Change only if the control system SECUREWEBSocketport parameter was changed from its default value or a port forwarding rules are in effect. The default value is "49200".
      • tokenSource and tokenUrl should not be changed, as they are provided to ensure forward compatibility with future identity provider services.

      Copy
      "config": {
          "controlSystem": {
            "ipId": "0x11"
          }
       },

Change XPanel Connection Parameters via URL

All the parameters described in prior sections (host, ipId, roomId, and port) can be provided as URL parameters to allow a single project to be used for multiple systems with different parameters. The order of precedence is 1.) URL parameter, 2.) project-config.json parameter, and 3.) the defaults described earlier.

The following examples assume that no parameters are provided in the project-config.json file:

  • "https://W.X.Y.Z/shell-template/index.html" would use all default values including host “W.X.Y.Z” and IPID 0x03.
  • "https://W.X.Y.Z/shell-template/index.html?ipId=A" would use default host “W.X.Y.Z” and IPID 0x0A.
  • "http://localhost:3000?host=W.X.Y.Z&ipId=A" would use host “W.X.Y.Z” and IPID 0x0A. This can be useful when using the npm run start command.

Remove XPanel Support

To remove the HTML5 Web XPanel functionality from your CH5 project, set the useWebXPanel property to false in the project‑config.json file.