PV WebSocket (PVWS)

The PV WebSocket (PVWS) service enables accessing various PVs (CA, PVA, and so on) over a WebSocket.

See also

Enabling PVWS

To enable the PVWS service, add this to your configuration:

pvws.nix
{
  services.pvws = {
    enable = true;
    openFirewall = true;
  };

  # Uncomment if you use the "auto address list", which is the default,
  # or if you have broadcast addresses in your "address list":
  # --
  #environment.epics.allowCABroadcastDiscovery = true;
  #environment.epics.allowPVABroadcastDiscovery = true;
}

This configuration starts a Tomcat server on port 8080 by default, with the PV Web Socket (PVWS) web apps configured.

The services.pvws NixOS module makes those applications available at:

  • http://host-addr:8080/pvws/

Configuring the address list

The address list is configured by default using the environment.epics module. See the EPICS environment guide for more information.

Configuring PVWS

PVWS is configured through environment variables, which you can pass through the services.pvws.settings option.

For more information about available environment variables, see the PVWS README.

Enabling write access

Caution

If your PVs are restricted by Channel Access or PV Access access security, it’s recommended to put PVWS and related services behind authentication via a reverse proxy.

Since the PVWS service handles PV writes, the user seen by access security rules will be the Tomcat user.

To enable write access from the web interface, set the PV_WRITE_SUPPORT setting to true:

pvws.nix
{
  services.pvws = {
    # ...
    settings.PV_WRITE_SUPPORT = true;
  };
}