Node-Red failed GPIO (nrpgpio)

1,196 views
Skip to first unread message

Paneb

unread,
Jul 1, 2017, 2:55:03 PM7/1/17
to Node-RED
Hi there!

I'm having trouble with GPIO on a new Node-Red installation, and I don'k know how to solve it!
Harware/software : Raspberry Pi 3 with the last Jessie (06/21/2017).
I updated Node-Red using sudo update-nodejs-and-nodered right after the boot.
I tried to run only an inject Node to a GPIO out, and the console displays "nrpgio python command not running".
I was able to find this message on the Github, but the error code is pythoncommendnotfound, what does it mean (or more, how can I find it? x) )
I runned sudo apt-get update && sudo apt-get install python-rpi.gpio and it is already the latest.
I have both nrpgpio files (without extension and the .py) in my hardware folder.
After looking I found out that my flows are not store inside my Pi user but in /root/.node-red/flows_raspberrypi.json (though I've never installed anything from root user).

Could it be this? How can I solve it?

Thank in advance for any insight!
Message has been deleted

Dave C-J

unread,
Jul 1, 2017, 5:49:41 PM7/1/17
to node...@googlegroups.com
Hi
yes if it's running as root that shouldn't be an issue - but it will be if that user can't find the nrgpio command as it may not be where it expects to be. If you run anything as sudo then that will appear as root user... including the update command... - so I guess that is what has messed it up. You need to run the update as a normal user... Tricky to advise now whether it would be easier to start over or try to clean up.

As it happens there is also a bug in the nrgpio.py code at present - so updating to 0.17.0 today stil  won't actually work....  hopefully we'll get 0.17.1 out tomorrow with the fix in.

Paneb

unread,
Jul 2, 2017, 2:12:59 AM7/2/17
to Node-RED
Thank you for the answer! :)
My user is the default one (pi), and I use sudo to execute most of my install/update commands. I guess sometimes I shouldn't :p.
I'll make a new installation to start as clean as possible, using the 0.17.1 when it's available. My Raspberry as nothing on it yet, the project is new (I've done all the hardware and was going to begin the softwre), so starting over is fine.
Thanks for the gret work!

Julian Knight

unread,
Jul 2, 2017, 3:03:54 AM7/2/17
to Node-RED
Unfortunately, you really need to understand what sudo is doing. You shouldn't use it by default. apt-get commands need sudo but npm commands do not unless you are using the -g switch to install globally.

Paneb

unread,
Jul 2, 2017, 3:31:30 AM7/2/17
to Node-RED
I didn't use sudo for installing new nodes, only for the updating scripts. I'm not expert in linux based distribution, but I know the basis and how it is important to watch users/groups/permissions :).
But I knew something was wrong, the additional nodes were right in my pi folder but that's all.
I should've known it though, I've already faced one side of this problem trying to run admin command from node-red in another project (for what I remember it was tricky too).

Dave C-J

unread,
Jul 2, 2017, 6:46:32 AM7/2/17
to node...@googlegroups.com
Hi

0.17.2 is now up and out - so running that bash command should now get you latest...

Paneb

unread,
Jul 4, 2017, 3:26:18 PM7/4/17
to Node-RED
Yes, everything is fine now!
Thanks
Reply all
Reply to author
Forward
0 new messages