# Node-red-node-pibrella: missing RPi.GPIO python library

**URL:** <https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654>\
**Category:** General\
**Created:** [18 August 2023 18:13 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654 "2023-08-18T18:13:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [18 August 2023 18:13 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/1 "2023-08-18T18:13:53Z")

</div>

I know that the pibrella board is not sold anymore, but I still have one and just needed the buzzer for a quick test.

In the node-red-node-pibrella doc I can read the following:

```auto
## Pre-reqs

Requires the RPi.PIO python library version 0.5.8 (or better) in order to work. See the [RPi.GPIO site](https://pypi.python.org/pypi/RPi.GPIO) for mode details.

```

sudo apt-get -y install python-rpi.gpio

```auto

```

but my Raspian Bullseye tells me:

```auto
Package python-rpi.gpio is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

```

Nevertheless I installed the node, and the Palette says:

```auto
Warning : Can't find RPi.GPIO python library.

```

How can I install a RPi.GPIO python library for Bullseye?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 August 2023 10:34 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/2 "2023-08-19T10:34:28Z")

</div>

That node is liable to very old and prob rely on Python2  
[edit] I just looked at the pibrella node and it is maintained by Nick and Dave so maybe it might get updated to work nowadays[/edit]

Workaround could be to just use the standard Pi output node to make it beep

This works for me on one of mine

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b150ebb0b03232bab2b865ceb736bc3a93be7a7.png)

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [19 August 2023 11:25 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/3 "2023-08-19T11:25:57Z")

</div>

> [@cymplecy](#):
>
> Workaround could be to just use the standard Pi output node to make it beep

It's working!

However, I have to use a fixed frequency. Can I send the frequency with the payload, so that I can change the frequency by script or via slider?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 August 2023 11:51 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/4 "2023-08-19T11:51:55Z")

</div>

I don't think the basic node allows that unfortunately ☹

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 August 2023 12:14 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/5 "2023-08-19T12:14:06Z")

</div>

Just tried the pibrella node out on my bullseye and I get the same error message in the console as you which is strange as RPi.GPIO is definitely installed

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 August 2023 12:31 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/6 "2023-08-19T12:31:55Z")

</div>

I looked at code in the node and it's checking for old python RPi.GPIO library

I changed line15 in  
[edit - corrected file name 🙂]  
/home/pi/.node-red/node\_modules/node-red-node-pibrella/38-rpi-pibrella.js

` if (!fs.existsSync("/usr/share/doc/python3-rpi.gpio")) {`

and it now works for me  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a3e3525084a2e2aeb8eaf1134fcc0c35dbbf6dfa.png)

I'll issue a PR for it

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [19 August 2023 13:22 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/7 "2023-08-19T13:22:06Z")

</div>

> [@cymplecy](#):
>
> I changed line15 in
> 
> \home\pi.node-red\node\_modules\node-red-node-pibrella

You changed line 15 in the .js file in this directory.  
Is it always `38-rpi-pibrella.js`?

After installing the node again and changing the above check for the gpio file, I can use the pibrella node.  
Thank you!!

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 August 2023 13:26 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/8 "2023-08-19T13:26:10Z")

</div>

> [@stefan24](#):
>
> Is it always `38-rpi-pibrella.js`?

Sorry to have missed out he vital bit of the filename 🙂

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 August 2023 13:39 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/9 "2023-08-19T13:39:08Z")

</div>

My PR has been accepted and merged so the fix should be available in the next NR release 🙂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 August 2023 23:55 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/10 "2023-08-19T23:55:01Z")

</div>

It’s available now

---

<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:** [2 September 2023 23:55 UTC](https://discourse.nodered.org/t/node-red-node-pibrella-missing-rpi-gpio-python-library/80654/11 "2023-09-02T23:55:23Z")

</div>

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