# \[solved\] Keyboard error: node stopped

**URL:** <https://discourse.nodered.org/t/solved-keyboard-error-node-stopped/78867>\
**Category:** General\
**Tags:** node-red-dashboard, gpio\
**Created:** [1 June 2023 12:53 UTC](https://discourse.nodered.org/t/solved-keyboard-error-node-stopped/78867 "2023-06-01T12:53:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacohope](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pacohope/32/80277_2.png) [@pacohope](https://discourse.nodered.org/u/pacohope)\
**Post date:** [1 June 2023 12:53 UTC](https://discourse.nodered.org/t/solved-keyboard-error-node-stopped/78867/1 "2023-06-01T12:53:50Z")

</div>

I am using node-red-node-pi-gpio 2.0.6 and node-red-dashboard 3.4.0 with node-red installed on a Raspberry Pi 4 via the "installing on a Raspberry Pi" instructions. My Pi runs Raspberry Pi OS (Debian 11) and I ran into a problem similar to "[Keyboard Node error when trying to deploy](https://discourse.nodered.org/t/keyboard-node-error-when-trying-to-deploy/60947)". My error is similar but not the same and I solved it. So I want to share the solution because I think others may run into this.

My Node Red setup is a controller for my swimming pool. I created a dedicated user named `pool` on the Pi and then I installed node-red as the `pool` user. Everything worked great. But when I added the _rpi-keyboard_ node and deployed it, I would see a little green "OK" which immediately turned to "Stopped" underneath the keyboard node on my flow. It just goes back and forth from "OK" to "Stopped" and back. It doesn't generate keyboard output.

The solution is fairly simple, but needs to be done one time. Whatever Linux user is running the node-red software (`pool` in my case) needs to be a member of the `input` group (in `/etc/group`). That's what gives it permission to read the keyboard and mouse devices. So, for me, the solution was:

```auto
sudo gpasswd -a pool input
sudo gpasswd -a pool gpio

```

Then I restarted node-red via:

```auto
sudo systemctl restart nodered

```

and everything worked. It's possible I missed a step somewhere during the installation which would have done this for me automatically. I dunno. But that's the problem and that's the solution.

If I understand [the node-red-node-pi-gpio code](https://github.com/node-red/node-red-nodes/blob/71a39ac16be869f6369d02f6545847455d0cb6c6/hardware/PiGpio/nrgpio.py#L208), it seems like the `nrgpio.py` program doesn't generate any error message at all when it fails to open the keyboard. It took a while to track this down because I couldn't find any error messages. I might not understand the code, so this may all be a (node) red herring.

Hope this helps someone in the future.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 July 2023 12:54 UTC](https://discourse.nodered.org/t/solved-keyboard-error-node-stopped/78867/2 "2023-07-31T12:54:05Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
