You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install node-red on a raspberry pi running raspberry pi OS (Debian 11)
Make sure the user running node-red is NOT a member of the input group in /etc/group
Create a flow with an rpi-keyboard node
Deploy the flow. Note that the rpi-keyboard node will vascillate between "OK" and "Stopped"
Look in the node red logs (e.g., run node-red-log) and look for information about what is wrong
Find none. :)
What happens?
There is no error logged that I could find in this circumstance. For background, you can see my discord post about it, too.
What do you expect to happen?
It would be nice if there was a "Failed to open keyboard: permission denied" or similar log message.
I looked at the code, and it seems like lines 185 and 208 of nrgpio.py might be the right place. I'd be happy to submit a PR with a few except calls in there to handle the failed permissions and post error messages. It would be my first contribution, so I wanted to ask about whether (a) this is the right place, and (b) won't this flood the logs with messages over and over, every time it tries to initialise the keyboard or mouse? So is there something I should do to throttle it or limit the amount of logging it does?
If someone wants to answer the questions to make sure I have the problem correctly scoped and whether I'm right about the solution, I will gladly work up and contribute a PR to fix it.
Please tell us about your environment:
Node-RED version: 3.0.2
node.js version: v16.20.0
npm version: 9.6.7
Platform/OS: Linux raspberrypi 6.1.21-v8+
Browser: Firefox usually
The text was updated successfully, but these errors were encountered:
Hi yes - a pull request would be most welcome !
so
a) yes - this is fine !
b) possibly yes - you could add a delay so it only retries every 10-15 secs - which would off course still flood the log - but more slowly... or you could hold the error in a flag variable - and if you see it again then don't report it. (and clear the variable on success of course) - that way it would only be reported once which would cleaner.
Which node are you reporting an issue on?
node-red-node-pi-gpio
What are the steps to reproduce?
input
group in/etc/group
node-red-log
) and look for information about what is wrongWhat happens?
There is no error logged that I could find in this circumstance. For background, you can see my discord post about it, too.
What do you expect to happen?
It would be nice if there was a "Failed to open keyboard: permission denied" or similar log message.
I looked at the code, and it seems like lines 185 and 208 of nrgpio.py might be the right place. I'd be happy to submit a PR with a few
except
calls in there to handle the failed permissions and post error messages. It would be my first contribution, so I wanted to ask about whether (a) this is the right place, and (b) won't this flood the logs with messages over and over, every time it tries to initialise the keyboard or mouse? So is there something I should do to throttle it or limit the amount of logging it does?If someone wants to answer the questions to make sure I have the problem correctly scoped and whether I'm right about the solution, I will gladly work up and contribute a PR to fix it.
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: