node-red/node-red-nodes

node-red-node-pi-gpiod in docker on raspberry pi 4 returns TypeError: next is not a function

nickklein95 opened this issue · 2 comments

Which node are you reporting an issue on?

node-red-node-pi-gpiod Output

What are the steps to reproduce?

Create Docker iamge according to below Environment
Ensure pigpiod is running on Pi 4
Create two Inject Nodes (true/false) attached to PiGPIOd Output node configured as below.
image
Deploy
Press either of two buttons
image

What happens?

msg:error
TypeError: next is not a function

What do you expect to happen?

Changing Pin from high to low or other way around

Please tell us about your environment:

  • Node-RED version: V3.0.2 in Docker Container on D
  • Docker Version: 20.10.21
  • node.js version: v16.16.0
  • npm version: 8.11.0
  • Platform/OS: Debian Bullseye, Docker image is setup according to https://nodered.org/docs/getting-started/docker
  • Browser: Chrome

Got it working. changed pigpiod.service file to only accept connections from 172.20.0.2, and created a seperate network for my docker image so it will always get the same IP adress. must be a connection issue that isn't caught. when i fill out a completely wrong IP address that hasn't got anything listening on it, it fails with ECONNREFUSED. might be worth looking in to failing more gracefully, haven't got a clue how tho, as i'm just learning nodered

Got it working. changed pigpiod.service file to only accept connections from 172.20.0.2, and created a seperate network for my docker image so it will always get the same IP adress. must be a connection issue that isn't caught. when i fill out a completely wrong IP address that hasn't got anything listening on it, it fails with ECONNREFUSED. might be worth looking in to failing more gracefully, haven't got a clue how tho, as i'm just learning nodered

Hi, are you willing to share exact steps how to setup container to communicate with GPIOs? No matter what I do, I still get TypeError: next is not a function

Update: I just found required steps here