The profile
A profile is one JSON file in a Secret in the install’s namespace, under the key profile.json. It is not in the chart or in the provisioner image, so both are generic and public, and nothing in either names anyone’s variables. Whoever installs the app gives it. On EmberNet the Store writes it as <release>-profile.
The provisioner reads it again at every pass, so a newer profile reaches a running install without a restart.
The shape
Section titled “The shape”| Key | What it holds |
|---|---|
revision |
A whole number from 1. The screen and the alarms are replaced only when this is higher than the revision that made them. |
device |
id, name, options (the connector’s options, such as browseRoot, arrayElements, and browseMaxNodes), and points, the variable names HotLoop keeps from the PLC. |
alarms |
HotLoop alarm definitions, each with an id. |
dashboard |
One HotLoop screen, with an id. A dashboard is a list of cards. |
One profile makes one screen. It makes one device from device, or several from devices, which is described next.
A list of devices
Section titled “A list of devices”A profile can carry devices beside device or instead of it. Each entry is the body of HotLoop’s POST /api/devices (id, name, protocol, address, enabled, pollIntervalMs, timeoutMs, and config, the protocol’s own block) with its tags, the descriptors HotLoop imports for the device: name, address, dataType, and optionally unit, description, and deviceClass. That covers an OPC UA PubSub (UADP) listener with its RawData dataSets, an OPC UA client, and several devices in one profile. At every pass:
- a device HotLoop lacks is made, and one it has is left alone, so a person’s edit stays until the profile’s
revisionis higher than the one that made the device; - every tag of the profile that the device lacks is imported, read-only;
- none of it waits on the node’s OPC UA server, so a listener only listens, and a runtime that is down or restarting holds nothing else back (the single
devicestill reads the runtime, and a pass with it down says so and tries again); - with
devicesabsent the profile works exactly as before, and with both present both apply.
What that means for you: a PubSub listener, such as one fed by HotLoop Transmitter, comes back configured by itself with no PLC to read from.
An example
Section titled “An example”This is the profile behind the screenshots on the overview, against HotLoop’s demo program. GVL_Demo is the demo program’s variable list, and the labels are made up.
{ "revision": 2, "device": { "id": "line-2", "name": "Line 2 PLC", "options": {"browseRoot": "Application.GVL_Demo", "arrayElements": 4, "browseMaxNodes": 500}, "points": ["GVL_Demo.bRun", "GVL_Demo.rTemp", "GVL_Demo.udiCycles", "GVL_Demo.nEcho", "GVL_Demo.rEcho", "GVL_Demo.rReadOnly"] }, "alarms": [ {"id": "line-2-mixer-hot", "name": "Mixer temperature high", "tagName": "GVL_Demo.rTemp", "condition": "hi", "limit": 20, "deadband": 0.5, "priority": 2, "message": "{device}/{tag} at {value}, limit {limit}"} ], "dashboard": { "id": "line-2-screen", "name": "Line 2", "description": "The Line 2 screen.", "kind": "cards", "roles": [], "homeFor": [], "screens": [], "cards": [ {"id": "t", "type": "value", "title": "Mixer temperature", "w": 3, "h": 2, "config": {"tag": "line-2/GVL_Demo.rTemp", "decimals": 1}}, {"id": "tr", "type": "trend", "title": "Mixer temperature, last 15 minutes", "w": 6, "h": 3, "config": {"tags": ["line-2/GVL_Demo.rTemp"], "minutes": 15}}, {"id": "al", "type": "alarms", "title": "Line 2 alarms", "w": 6, "h": 3, "config": {"outstanding": true, "limit": 8}} ] }}A card’s tag is the device id, a slash, and the point’s name. The card types, the alarm conditions, and the rest of a screen’s keys are the same as in HotLoop’s dashboards and the HTTP API.
What the provisioner does with it
Section titled “What the provisioner does with it”- It makes the device if there isn’t one, and adds any variable of
pointsthat the PLC has and the device does not. - It never writes to the PLC. Every tag it makes is read-only, and a profile has no way to mark one writable.
- It makes the alarms and the screen when they are missing, and replaces them only when
revisionis higher than the one that made them. A change a person made to the screen in HotLoop therefore survives until a newer profile ships on purpose. - It keeps looking. Every five minutes, and sooner after a pass that could not finish, because the runtime or HotLoop was not answering yet.