System Variables
System variables are a way to share projects across multiple installations of the Intelligence Hub but modify some settings for a given deployment. As an example, all deployments might publish to the same MQTT broker but each must publish on a topic specific to the site where the Intelligence Hub is deployed.
System Variables can be configured in the UI under Settings | Variables.
System Variables can also be loaded from the intelligencehub-systemvariables.json
file when the Intelligence Hub starts. The intelligencehub-systemvariables.json.template
provided in the install provides an example of the format.
[
{
"name": "variable_name",
"value": "variable_value"
}
]
The file contains variable names and values. Once loaded, these variables are available via the Reference Panel under Variables | System. Like other Inputs, {{System.Variables.SiteID}}
can be used to reference the value in supported fields in Instances, Connections, Inputs, Outputs, etc. For example, a system variable can control the IP address of the OPC UA server, and this can be changed for Production versus Development environments.
Similar to Environment Variables there are some fields (various Connection Settings for example) that do not support most inputs, but can be configured using system variables.
The variables can be viewed and set through the UI on the Settings | Variables page. Any changes are persisted to the file and take effect immediately. The Hub view in Central Configuration mode also provides a way to see and change variables on remote hubs.