Signal K nodes for Node-RED.
This package lets Node-RED flows read from a Signal K server, publish updates back into Signal K, handle PUT requests, expose switch-style controls, and, when running embedded, integrate directly with Signal K server internals.
- live subscriptions to Signal K paths and notifications
- on-demand reads of current values
- delta, notification, and PUT writers
- geofence and delta-processing helpers
- switch, slider, and dimmer control nodes with persisted state
- embedded-only nodes for app events, incoming deltas, input interception, and NMEA output
Install from the Node-RED palette manager by searching for @signalk/node-red-contrib-signalk.
Or install manually in your Node-RED user directory:
npm install @signalk/node-red-contrib-signalkRestart Node-RED after installation.
The package supports two runtime models.
Use this when Node-RED runs separately from Signal K server.
Most nodes talk to Signal K through the signalk-client config node, which manages the shared connection to the server.
Typical setup:
- Install the package in Node-RED.
- Add a
signalk-clientconfig node. - Enter the Signal K host, port, optional TLS setting, and optional credentials.
- Add Signal K nodes to your flow and point them at that config node.
Use this when Node-RED runs inside signalk-server via the signalk-node-red plugin.
In this mode, some nodes can access the server directly instead of going through a network connection. The editor also creates an internal Embedded Signal K config automatically for signalk-* nodes when needed.
Embedded-only nodes:
signalk-app-eventsignalk-input-handlersignalk-input-handler-nextsignalk-on-deltasignalk-send-nmea0183signalk-send-nmea2000
config-client is the shared connection node used by most external-mode nodes.
Configuration fields:
- Host
- Port
- Use TLS
- Username
- Password
The config node handles connection, reconnects automatically, and provides helpers used by the other nodes for subscriptions, PUT requests, delta sending, and path lookups.
The switch and control nodes use a global context store named skpersist so their state survives restarts.
Nodes that use skpersist:
signalk-toggle-switchsignalk-multi-switchsignalk-dimmer-switchsignalk-slider-switch
If you are running Node-RED outside Signal K server, add an skpersist context store to your Node-RED settings.js.
Example:
contextStorage: {
default: {
module: 'memory'
},
skpersist: {
module: 'localfilesystem',
config: {
cache: false
}
}
}After updating settings.js, restart Node-RED.
When running embedded with signalk-node-red, skpersist is configured automatically if it does not already exist. The embedded plugin adds an skpersist context store backed by localfilesystem, so no manual setup is normally required.
- Add a
signalk-clientconfig node. - Add
signalk-subscribe. - Set
pathto something likenavigation.speedOverGround. - Wire it to a Debug node.
- Deploy.
- Add
signalk-get. - Configure a fixed path, or send the desired path in
msg.topic. - Use output 1 for found values and output 2 for not found.
- Add
signalk-send-pathvalue. - Configure a path or send one in
msg.topic. - Send the value in
msg.payload.
Subscribes to a Signal K path and emits updates from the configured context. It supports multiple subscription modes, optional source filtering, and flattened output.
When flattening is enabled, each outgoing message contains a single path/value pair using msg.topic and msg.payload, plus context and source metadata.
Subscribes to notification updates and filters by notification path and state such as normal, alert, warn, alarm, or emergency.
Fetches the current value for a Signal K path. The path can be configured on the node or provided in msg.topic.
Outputs:
- output 1: found value
- output 2: not found
Embedded-only. Emits messages for deltas received by the local Signal K server. It can emit the whole delta or flattened path/value messages.
Subscribes to a list of Signal K paths. When any one of them produces a delta, the node looks up the current value of every configured path via getSelfPath and emits a single message.
Output:
msg.topic— the inputmsg.topicif present, otherwise the configured Topic, otherwise the path that triggered the updatemsg.payload— an object mapping each configured path to its current value (ornullif not available)
An input message also triggers an aggregation. The input msg.topic is passed through to the output, and the input msg.payload is included in the output payload under the key input.
Embedded-only. Listens for a named event on the server app object and forwards the event payload.
Turns a Signal K delta in msg.payload into one output message per path/value pair.
Filters a delta and emits only values matching the configured path.
Delays forwarding until the input has remained unchanged for the configured delay period.
Checks vessel position against a circular geofence.
Outputs:
- output 1: inside
- output 2: outside
- output 3: state update
Routes a message to one of two outputs depending on whether the vessel is currently inside or outside the configured fence.
Sends a single Signal K value update using a configured path or msg.topic.
Sends a complete Signal K delta from msg.payload.
Sends a Signal K notification update. Node configuration can define defaults, and object payloads can override them per message.
Sends a Signal K PUT request.
Outputs:
- output 1: success
- output 2: error
Registers PUT support for a specific Signal K path and emits incoming PUT requests into the flow.
When Use Put Response is disabled, the node responds immediately. When enabled, it returns PENDING 202 and the flow must complete the request later with signalk-put-success or signalk-put-error.
Completes a pending PUT request successfully.
Completes a pending PUT request with an error.
These nodes keep state in the skpersist global context store.
Exposes a boolean Signal K control path. If the configured path does not end in .state, the suffix is added automatically.
Exposes a multi-position control path backed by a configured list of allowed values.
Exposes a dimmer control using .dimmingLevel, and optionally .state when Include State is enabled.
Exposes a numeric control path with a configured range, optional units, and optional step size.
All four control nodes support Use Put Response. In that mode, PUT-originated changes are emitted into the flow with callback information and remain pending until the flow finishes the request with signalk-put-success or signalk-put-error.
Embedded-only. Intercepts incoming deltas before they are applied by the local Signal K server so a flow can inspect, modify, or suppress them.
Embedded-only. Continues processing for a delta intercepted by signalk-input-handler, optionally using modified message fields to construct a replacement delta.
Embedded-only. Sends NMEA 0183 output through the local server.
Embedded-only. Sends NMEA 2000 output through the local server using either JSON or raw event payloads.
signalk-put-handler and the switch/control nodes can all participate in asynchronous PUT handling.
Typical pattern:
- Enable
Use Put Responseon the node receiving PUT requests. - Let the flow validate or perform the requested action.
- Send the result to
signalk-put-successorsignalk-put-error.
This is useful when the final outcome depends on external I/O, device acknowledgements, or business logic that cannot complete immediately.
- Most nodes are intended for external Node-RED use through
signalk-client. - Embedded-only nodes depend on globals exposed by
signalk-serverandsignalk-node-red. - The package is published as an ES module package.
Apache-2.0