Rpi-gpio : Raspberry Pi specific node set inactive

Now I think: when I imaged for the first time on Monday, I've found the same problem, RPI was killed and also video had non signal. I've re-immaged and all start as we attend!!

I can't access the Pi :frowning:
image
I'll keep on trying to sort out my issue but I don't think I will get it done quickly :frowning:

I use cmd by Windows for ssh connectionssh pi@raspberrypi.local. You should have win 10 2018 update to do this

Thank you -that works - must be a problem with putty and new OS

Do you know whether the gpio node uses python to interface with rpi.gpio? I notice that on my Buster system that python-rpi.gpio is installed, but it isn't here, in fact there is no python-rpi.gpio package. There is python3-rpi.gpio though.

@alanmasu, as an experiment could you install that and then restart node-red. I am not very hopeful but worth trying.
sudo apt install python3-rpi.gpio
then restart node-red. In fact maybe a good idea to reboot. Then check the startup log for node-red.
If that doesn't do it then could you enable trace level debugging in settings.js. If you edit that file (in your .node-red folder) and find the logging section. In there you should see
level: "info"
change it to
`level: "trace"
Then stop node-red and start it again. There should be a lot of extra stuff in the log. See if it says anything extra about gpio.

[Edit] Before doing any of the above could you check your system is up to date, there may have been some updates since the image was made
sudo apt update
sudo apt full-upgrade
Reboot and check node-red again.

1 Like

last time I dove into what the node does is it ran a prog called nrgpio.py and that reference RPi.GPIO module (IIRC)

1 Like

I will try the install 1st without doing any updates just to make sure it fails :slight_smile:

Just watching the paint dry at the moment

image

The suggestion to update was meant for @alanmasu in fact.

It might be the missing package then.

Ok - confirmed not to work with default brand new image

image

Going to apt update and apt upgrade to see if that helps

just done but nothing change!

I've done, but now the log where can I found it?

When you start node red
node-red-stop
node-red-start

Done what?

Sorry, there shouldn't be a ' on the front it should be
level: "trace"

Excuse me... Updating apt...

Ok, so you haven't tried installing the python3-rpi.gpio package yet. Try that.

yes, but the "trace" is written in a file or only in console?

just done also this...

It goes to /var/log/syslog too I think.

ok, but I don konw how to search in a log file, I'm not an expert in this environment!

Alan

I don't think the trace is going to help. I have had a look in the source at where the inactive message comes from and it is from node_modules/node-red-node-pi-gpio/36-rpi-gpio.js. Right at the start that runs testgpio.py in the same folder and displays the message if testgpio fails. That contains only

#!/usr/bin/python
import sys
try:
    import RPi.GPIO as GPIO
    sys.exit(0)
except ImportError:
    sys.exit(1)

which means that rpi.gpio is basically not there or not working at all I think. I was hopeful installing the package would fix it.