I can't access the Pi
I'll keep on trying to sort out my issue but I don't think I will get it done quickly
I can't access the Pi
I use cmd by Windows for ssh connection
ssh firstname.lastname@example.org. You should have win 10 2018 update to do this
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
change it to
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.
last time I dove into what the node does is it ran a prog called nrgpio.py and that reference RPi.GPIO module (IIRC)
I will try the install 1st without doing any updates just to make sure it fails
Just watching the paint dry at the moment
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
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
Sorry, there shouldn't be a ' on the front it should be
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!
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.
@Colin Can we try to reinstall the node-red-node-pi-gpio package?
just for clarity:
pi@raspberrypi:~ $ cd .node-red pi@raspberrypi:~/.node-red $ node-red-stop Stop Node-RED Use node-red-start to start Node-RED again pi@raspberrypi:~/.node-red $ npm i node-red-node-pi-gpio pi@raspberrypi:~/.node-red $ node-red-start