I am new to node red i have an issue with node red using the uart port on pi.
My goal in this is to read Energy meter data via UART port using modbus and share same data on MQTT.
Starting as a systemd service.
10 May 13:24:31 - [info]
Welcome to Node-RED
10 May 13:24:31 - [info] Node-RED version: v1.0.6
10 May 13:24:31 - [info] Node.js version: v10.19.0
10 May 13:24:31 - [info] Linux 4.19.97-v7+ arm LE
10 May 13:24:37 - [info] Loading palette nodes
10 May 13:24:44 - [info] Settings file : /home/pi/.node-red/settings.js
10 May 13:24:44 - [info] Context store : 'default' [module=memory]
10 May 13:24:44 - [info] User directory : /home/pi/.node-red
10 May 13:24:44 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 May 13:24:44 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
10 May 13:24:44 - [info] Server now running at http://127.0.0.1:1880/
10 May 13:24:44 - [warn]
Here is the error message I get when I use UART /dev/ttyAMA0:
(node:21124) UnhandledPromiseRejectionWarning: Error: Port is not open
at unixWrite (/home/pi/.node-red/node_modules/@serialport/bindings/lib/unix-write.js:25:15)
(node:21124) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
If I try the same with the USB port it works fine.