Skip to content

Running cs web proto against Coniql

George Sheppard edited this page Oct 19, 2020 · 10 revisions

Coniql (Github) is a prototype server that converts control system data (currently from PVAccess) into a GraphQL protocol that can be understood by cs-web-proto if it uses the Coniql plugin.

Set up Coniql

  • Clone the coniql repo from the Github link above
  • Run pipenv install
  • Run pipenv run python -m coniql

Note: you may have to specify a version of python to use depending on your setup, 3.7 or above is required (pipenv run python3.7 -m coniql)

This will provide ssim:// PVs only. To enable Channel Access and PVAccess PVs:

  • set the EPICS7_BASE environment variable to the directory of an EPICS7 build
  • pipenv install p4p

Now with pipenv run python -m coniql you should also see data from PVAccess PVs.

Load the ConiqlPlugin inside cs-web-proto

  • Uncomment the REACT_APP_CONIQL_SOCKET line in the .env file and set it to the correct port

Using nomachine

Nomachine can be used to run coniql, and these PVs can be accessed if the VPN is configured correctly. If using SShuttle for the VPN confirm that the nomachine instance is not being run on an address not routed via the sshuttle tunnel.

The address to add as REACT_APP_CONIQL_SOCKET can be found from the nomachine address, and the port coniql runs on. A server name for a nomachine instance could be cs03r-sc-serv-32.diamond.ac.uk, and the port is commonly 8080. This should therefore be set in the .env file.

REACT_APP_CONIQL_SOCKET=cs03r-sc-serv-32.diamond.ac.uk:8080