Skip to content

Raspberry PI

Dave Conway-Jones edited this page Oct 17, 2019 · 7 revisions

This page describes specific information related to Raspberry PI and is intended for the Raspberry PI users, which uses Node-RED Docker images.

v1.0 - BREAKING

Native GPIO support

The replacement for native GPIO is node-red-node-pi-gpiod.

Disadvantages of the native GPIO support are:

  • Your Docker container needs to be deployed on the same Docker node/host on which you want to control the gpio's.
  • Gain access to /dev/mem of your Docker node/host
  • privileged=true is not supported for docker stack command

node-red-node-pi-gpiod solves all these disadvantages. With node-red-node-pi-gpiod it is possible to interact with gpio's of multiple Raspberry Pi's from a single Node-RED container.

Quick Migration steps to node-red-node-pi-gpiod

  1. Install node-red-node-pi-gpiod through the Node-RED palette
  2. Install and run PiGPIOd daemon on the host Pi.
  3. Replace all native gpio nodes with pi gpiod nodes.
  4. Configure pi gpiod nodes to connect to PiGPIOd daemon. Often the host machine will have an IP 172.17.0.1 port 8888 - but not always. You can use docker exec -it mynodered ip route show default | awk '/default/ {print $3}' to check.

For install instruction details - please refer to the node-red-node-pi-gpiod README

If you want to run gpiod in a container rather than on the host, then this project may help.

Note: There is a contributed gpiod project that runs the gpiod in its own container rather than on the host if required.

arm32v6, arm32v7 and arm64v8

With manifest list support Docker automatically detects on which architecture your Docker runs and pulls the corresponding image for it. This means for Raspberry PI 2, 3 and 4 it pulls arm32v7 images. Although Raspberry PI 3 and later have 64 bit instruction sets, their operating systems like Raspbian are 32 bit compiled and therefor Docker detects arm32v7 instead of arm64v8.

Note: Currently there is an issue #37647 in Docker's architecture detection that fails for Arm6 CPU - eg Raspberry Pi Zero or 1. For these devices you currently need to specify the full image tag, for example:

docker run -it -p 1880:1880 --name mynodered nodered/node-red:1.0.2-10-minimal-arm32v6