Node red nodes used by the signalk-node-red plugin which embeds node-red into signalk-node-server.
Please note that these nodes only work when node-red is embedded in signalk-node-server.
See the examples folder for flows from the following examples..
Switch relays based on complex conditions (example turns on/off the anchor light and ACR automatically)
Send an alarm when the starter battery voltage is low for more and 60 seconds. (this keeps the alarm from going off while starting the engine)
Sends the state of a digital gpio pin into Signal K and allows at PUT request to the server to set the state of a pin.
Input that sends messages for every delta the server receives. Optionally flatten the deltas (see signalk-flatten-delta below)
Input that sends messages for every delta from the configured path. Optionally flatten the deltas (see signalk-flatten-delta below)
Function that flatten deltas from signalk-on-delta.
The output payload will be the value and the topic will be the path, The payload will also include context, $source, and source.
{
"topic": "navigation.speedOverGround",
"payload": 2.45,
"source": {"label":"actisense","type":"NMEA2000","pgn":129026,"src":"3"},
"context": "vessels.self",
"$source": "actisense.3"
}
Input that allows a flow to modify or filter deltas before they get to the server. Once the data is modified, it should be connected to the signalk-input-handler-next node.
Output that should be used to send a delta on after processing using the signalk-input-handler node.
Function that checks if a vessel is inside of the specified geofence
Function that will delay sending the input until the value has been the same for the given timout
For example, you could use this to send a low starter battery voltage alarm only if it stays low for 5 seconds.
Output that sends a delta through the server. Input should be path and value
{
"path":"navigation.speedOverGround",
"value":20.45
}
Input that sends a message when a notification is received. Configuration allows messages for a specific notification or any notification. The notification state can also be specified. Payload will be the notification path and value.
{
"path: "notifications.anchorAlarm",
"value" : {
"state" : "emergency",
"method" : [
"visual",
"sound"
],
"timestamp" : "2018-06-15T15:01:55.007Z",
"message" : "Anchor Alarm - Emergency"
}
}
Input that checks if a vessel is inside of the specified geofence
Input that sends messages when a PUT is sent to the server for the given path
Output that sends a delta to the server. Input should be a fully formed SignalK delta
Output that send a SignalK put request via app.putSelfPath
. Input should be the value to put.
Output that sends a SignalK notification
If the input payload is an object, then it will use the keys path, state, method, and message. Example below. Otherwise it will use the configured values.
To specify all the info, send:
{payload: {
"path":"notifications.testNotification",
"state":"alarm",
"method":["visual","sound"],
"message":"this is a notification message"
}}
Or to specify some of the info, send:
{payload: {
"state":"normal",
}}
Output that sends out NMEA 2000 messages. Input payload can be canboat json format or a raw Actisense formatted string
Output that sends out NMEA 0183 messages. Input payload can be an 0183 formatted string.