Can not run serial module on jetson nano

Hello I am running home assistant on a container on jetson nano.

I am trying to run a serial node as I have a device that is using simple serial commandes I am trying to use node-red-node-serialport 1.0.1 (node-red-node-serialport)

When I try to run the node red I get a error log like this

Welcome to Node-RED
31 May 16:52:39 - [info] Node-RED version: v2.2.2
31 May 16:52:39 - [info] Node.js version: v16.14.2
31 May 16:52:39 - [info] Linux 4.9.253-tegra arm64 LE
31 May 16:52:41 - [info] Loading palette nodes
31 May 16:52:49 - [info] Dashboard version 3.1.6 started at /endpoint/ui
Traceback (most recent call last):
File "/opt/node_modules/node-red-node-pi-gpio/", line 3, in
import RPi.GPIO as GPIO
File "/usr/lib/python3.9/site-packages/RPi/GPIO/", line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
31 May 16:52:50 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
31 May 16:52:51 - [info] Settings file : /etc/node-red/config.js
31 May 16:52:51 - [info] Context store : 'default' [module=memory]
31 May 16:52:51 - [info] User directory : /config/node-red/
31 May 16:52:51 - [warn] Projects disabled : editorTheme.projects.enabled=false
31 May 16:52:51 - [info] Flows file : /config/node-red/flows.json
31 May 16:52:51 - [info] Server now running at
31 May 16:52:51 - [info] Starting flows
[16:52:52] INFO: Starting Node-RED...
node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
31 May 16:52:56 - [info]
Welcome to Node-RED

How do I solve it? I did try to follow this Topic but I can't find where the file is located.

Is there any other nodes that can allow simple serial port read writes? I tried this node but I couldn't install due to compatibility issues

Hi there, the log you've shown does not have an error really. It is only telling you that the Raspberry Pi specific node doesn't work on anything other than a Pi.

Have you tried installing node-red-node-serialport from the pallet manager? Note that it will almost certainly require a build step and so you will need to have dev-tools installed.

Thanks for your quick reply when I installed the node red it already installed node-red-node-serialport for me.

What I mean is when I deploy a serial node with this settings

my node red stops working with the log as my first post

OK, so firstly try removing the node-red-node-pi-gpio node to make sure that isn't causing problems. Also make sure that the user id that is running node-red has access to the serial ports. On most versions of Linux, I think if you add the user to the dialout group, that should work but do double check.

Also, since you are running node-red in a docker container, you might have to do some jiggery-pokery to permit the container to use the physical serial port (not sure if HA already sets this up - you will have to ask on the HA forums)

Here is how someone using docker would setup a container to access the physical serial port...

If that all seems too much, then ditch the HA Node-RED Addon version red and install node-red to the OS instead.

1 Like

I missed that. I'll update the tags to make it clearer.

Thanks I tried disableing the node-red-node-pi-gpio and now the program is stuck in this loop

Welcome to Node-RED
3 Jun 19:58:56 - [info] Node-RED version: v2.2.2
3 Jun 19:58:56 - [info] Node.js version: v16.14.2
3 Jun 19:58:56 - [info] Linux 4.9.253-tegra arm64 LE
3 Jun 19:58:58 - [info] Loading palette nodes
3 Jun 19:59:03 - [info] Dashboard version 3.1.6 started at /endpoint/ui
3 Jun 19:59:04 - [info] Settings file : /etc/node-red/config.js
3 Jun 19:59:04 - [info] Context store : 'default' [module=memory]
3 Jun 19:59:04 - [info] User directory : /config/node-red/
3 Jun 19:59:04 - [warn] Projects disabled : editorTheme.projects.enabled=false
3 Jun 19:59:04 - [info] Flows file : /config/node-red/flows.json
3 Jun 19:59:04 - [info] Server now running at
3 Jun 19:59:04 - [info] Starting flows
[19:59:06] INFO: Starting Node-RED...
node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
3 Jun 19:59:09 - [info]
Welcome to Node-RED

Well, as you can see, Node-RED is not reporting any errors. I would increase the logging level in settings.js to see if you can spot what is causing the restart.

If that doesn't show anything then I'm afraid that I think it is either a Docker or more likely, a home-assistant issue and you may need to ask on the HA forum unless someone else here knows. Personally I use neither HA nor Docker for Node-RED.

I found the the issue it is a bug that has not been solve yet thanks for all the help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.