nebrius / raspi-io

An IO plugin for Johnny-Five that provides support for the Raspberry Pi
MIT License
546 stars 63 forks source link

Raspi-io is hanging node red #99

Closed selfus closed 7 years ago

selfus commented 7 years ago

I am trying to use node-red-contrib-gpio that requires raspi-io

However, when installing raspi-io (I am installing it in the .node-red directory), nodered isn't capable to start after a reboot.

Can provide more info if required.

monteslu commented 7 years ago

Did you install as the pi user and run as root?

selfus commented 7 years ago

I installed as the pi user, not sure if node-red is running as root though, but it shouldn't

How can I install it as root?

monteslu commented 7 years ago

raspi-io requires installing as non-root and running as root. Take a look at the notes here: https://github.com/nebrius/raspi-io#system-requirements

It's likely that you are running node red as the pi user. You should be able update the systemd script to use the root user.

selfus commented 7 years ago

Why does raspi-io need to be run as root? Can't this be changed?

Thanks!

nebrius commented 7 years ago

raspi-io needs to run as root because of the way that Raspbian itself configures GPIO access. In order to read/write or change settings on a GPIO pin (e.g. setting it as input vs output, pull-up resistors, etc), Raspbian requires that the app in question have root access. Unfortunately this is a requirement from the OS.

nebrius commented 7 years ago

I'm going to close this issue due to inactivity. If you still are running into this issue though, let us know!

selfus commented 7 years ago

@nebrius No more issues, thank you for your kind support, and sorry for not closing the issue