Overview
The serial-in node reads data from a serial (UART) port.
It connects to devices like Arduino boards, GPS receivers, RFID readers, and industrial
controllers over RS-232, RS-485, or USB-to-serial adapters. Data is emitted as messages
split by a configurable delimiter (default: newline).
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| port | string | "" | Serial port path (e.g., /dev/ttyUSB0, /dev/ttyACM0, COM3) |
| baudRate | number | 9600 | Baud rate: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 |
| dataBits | number | 8 | Number of data bits per frame: 5, 6, 7, or 8 |
| stopBits | number | 1 | Number of stop bits: 1 or 2 |
| parity | string | "none" | Parity checking: none, even, odd, mark, or space |
Common Baud Rate Reference
9600
Default for Arduino, most sensors, and simple serial devices. Reliable for short cable runs.
115200
High-speed serial. Common for ESP32, debug consoles, and GPS modules requiring fast updates.
4800
Standard for NMEA GPS devices. Required by many marine and aviation GPS receivers.
Example: Read Arduino Sensor Data
Receive temperature and humidity readings from an Arduino board sending newline-delimited JSON over USB serial at 9600 baud.
// serial-in node configuration
{
"port": "/dev/ttyACM0",
"baudRate": 9600,
"dataBits": 8,
"stopBits": 1,
"parity": "none"
}
// Arduino sends (Serial.println):
// {"temp":23.5,"humidity":65,"sensor":"dht22"}
// Output msg (one per line received):
{
"payload": "{\"temp\":23.5,\"humidity\":65,\"sensor\":\"dht22\"}",
"port": "/dev/ttyACM0",
"_msgid": "ser001"
}
// Connect to a json-parser node to get:
// msg.payload = { temp: 23.5, humidity: 65, sensor: "dht22" }
// Then route to dashboard or database Example: GPS NMEA Data Input
Read NMEA sentences from a GPS module connected via USB-to-serial adapter. GPS modules typically output at 4800 or 9600 baud with newline delimiters.
// serial-in node configuration
{
"port": "/dev/ttyUSB0",
"baudRate": 4800,
"dataBits": 8,
"stopBits": 1,
"parity": "none"
}
// GPS module sends NMEA sentences:
// $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,47.0,M,,*47
// $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
// Output msg per sentence:
{
"payload": "$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,47.0,M,,*47",
"port": "/dev/ttyUSB0",
"_msgid": "ser002"
}
// Parse in a function node:
// const parts = msg.payload.split(',');
// if (parts[0] === '$GPGGA') {
// msg.payload = {
// lat: parseFloat(parts[2]),
// lon: parseFloat(parts[4]),
// altitude: parseFloat(parts[9]),
// satellites: parseInt(parts[7])
// };
// } Example: Industrial RS-485 Sensor
Read data from an RS-485 industrial temperature sensor using even parity at 19200 baud.
// serial-in node configuration
{
"port": "/dev/ttyUSB1",
"baudRate": 19200,
"dataBits": 8,
"stopBits": 1,
"parity": "even"
}
// RS-485 sensor responds with hex data:
// Binary frames split by timeout (no newline)
// Output msg:
{
"payload": "",
"port": "/dev/ttyUSB1",
"_msgid": "ser003"
}
// Parse Modbus-style response in function node:
// const temp = msg.payload.readUInt16BE(3) / 10;
// msg.payload = { temperature: temp }; Common Use Cases
Arduino / ESP32 Interface
Read sensor data from microcontroller boards over USB
GPS Tracking
Parse NMEA sentences from GPS receivers
RFID / Barcode Readers
Receive scan data from serial-connected readers
Industrial Equipment
Interface with PLCs, meters, and sensors over RS-485