Scripting

JavaScript where you need logic. Node-RED where you need flows.

Tag, gateway and message-handler scripts are written in JavaScript and run in an isolated worker, so a runaway script can't stop the plant. Node-RED is built in for flow-based automation.

In detail

  1. Scripts for every trigger

    Run on tag change, on a timer, at startup and shutdown, on alarm events, or on demand from a screen button or the API.

  2. A shared library, and a safe console

    Keep common code in shared script modules, and try code in a console before it goes live.

  3. Secrets kept out of the code

    Passwords and API keys are stored encrypted and write-only, and masked in every log.

  4. Node-RED, built in

    Embedded Node-RED with Nexus nodes for tags, alarms and notifications. npm installs are locked down by default.

Script editor with a tag script and code completion listing the nexus. API

When scripts run

Every script runs apart from the main gateway, in an isolated worker that restarts on its own if it fails.

TriggerRuns
Tag change When a tag’s value changes
Timer On a fixed interval
Startup and shutdown When the gateway starts or stops
Alarm events When an alarm changes state
On demand From a screen button or the API

See your plant in Nexus.

Bring a device list and we'll show you templates, screens and alarms built on it.

Book a demo