Node-RED 

Jan 15, 2024

Cómo instalar Node-RED en Rapberry Pi OS

Install Node-RED on Raspberry Pi OS

Browser-based flow editing

Built on Node.js

Social Development

Abrimos la Terminal (Ctrl+Alt+T) y escribimos--Open Terminal and type:

Respondemos con Y a todas las consultas que nos realice.Una vez ejecutado al finalizar veremos lo siguiente--Answer Y to all Questions, Once finished you see:

Tu versión sera más nueva--Your version will be newer now is 3.1.0

Al finalizar nos consultara si queremos personalizar la configuración, At the end ask for customize settings:

Running locally

As with running Node-RED locally, you can use the node-red command to run Node-RED in a terminal. It can then be stopped by pressing Ctrl-C or by closing the terminal window.

Due to the limited memory of the Raspberry Pi, you will need to start Node-RED with an additional argument to tell the underlying Node.js process to free up unused memory sooner than it would otherwise.

To do this, you should use the alternative node-red-pi command and pass in the max-old-space-size argument.

Como podemos observar, nos indica el comando para iniciarlo--And the message for start it:

O podemos hacer clic en el icono de la barra de tareas, así como también buscarlo en--Or Start from menu: Raspberry -> Programming-> Node-Red

Una vez iniciado minimizamos la ventana de consola--Minimize the window:

Y procedemos a abrir la interfaz que se encuentra en el navegador o en cualquier navegador que este en nuestra red local de cualquier dispositivo(Raspberry Pi, PC, Smartphone, tablet, Smart TV), introduciendo la IP y el puerto 1880--We can see Node-red on the browser with the IP and Port 1880:

Si no sabemos nuestra IP, basta con abrir una Terminal Ctrl+Alt+T y escribir--We can know our IP with:

Running as a service

The install script for the Pi also sets it up to run as a service. This means it can run in the background and be enabled to automatically start on boot.

The following commands are provided to work with the service:

You can also start the Node-RED service on the Raspberry Pi OS Desktop by selecting the Menu --> Programming --> Node-RED menu option.

Autostart on boot

If you want Node-RED to run when the Pi is turned on, or re-booted, you can enable the service to autostart by running the command:

To disable the service, run the command:

Interfaz Node-Red