Edge 1.6.0

Serial Trigger Node

The Serial Trigger will trigger a workflow whenever the Edge Compute device receives enough data via Serial to satisfy the configured trigger.

Serial Trigger

Node Properties

The Serial Trigger has several pieces of configuration in order to successfully listen for data.

  • Serial Path: The serial port to listen on.
  • Baud Rate: The baud rate, speed of communication over a data channel, which by default is 9600. The following are the accepted baud rates: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 128000, 256000.
  • Parity: (Required) The parity, whether or not a parity bit is set and its value. By default, this is none. Other valid values include even, odd, mark, and space.
  • Data Bits: (Required) The number of bits per character, set to 8 by default. Other valid values include 5, 6, and 7.
  • Stop Bits: (Required) The number of stop bits to signal the end of a character. Default is 1, may also be set to 2.
  • RTS/CTS Handshake: (Required) Boolean that indicates whether RTS/CTS handshaking is in use. Default is false.
  • Write After Port Opens: (Optional) Field where after the port opens this string will be written once. It will also be encoded using the Output Ending field.
  • Parse Method: (Required) By default, the value is Delimiter. This field can either be Byte Length or Delimiter, and it tells the serial port listener how to chunk up the data as it is received.
  • Delimiter: This field is required if the parse method is Delimiter. The Serial Trigger fires with the serial data received once the delimiter is encountered. This delimiter will not be included in the serial data on the payload.
  • Byte Length: This field is required if the parse method is Byte Length and it is the number of bytes to wait for before firing the trigger.
  • Output Encoding: This field is required and by default is UTF8. The following are valid character encoding options: ASCII, UTF8, UTF16LE, Base64, Binary, Hex.

Serial Trigger Configuration


The payload will include a serial field under the data field which contains the data that was received from the serial port. In the general case, a Serial workflow payload will look like the following:

  "applicationId": <id of the current application>,
  "applicationName": <name of the current application>,
  "data": {
    "serial": <data received from the serial port>,
  "deviceId": <id of the edge device>,
  "deviceName": <the edge device name>,
  "deviceTags": {<any tags for the edge device>},
  "flowId": <id of the current workflow>,
  "flowName": <name of the current workflow>,
  "flowVersion": <name of the current workflow version>,
  "globals": <object of workflow globals>,
  "isConnectedToLosant": <if the agent is connected to Losant>,
  "agentEnvironment": <object of environment variables>,
  "time": <time the serial trigger fired the trigger>,
  "triggerId": <serial id>,
  "triggerType": "serial"