# Node-red in Linux os unable to control Raspberry pi 4B GPIO

**URL:** <https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528>\
**Category:** General\
**Tags:** gpio\
**Created:** [18 March 2024 14:22 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528 "2024-03-18T14:22:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry8](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henry8](https://discourse.nodered.org/u/Henry8)\
**Post date:** [18 March 2024 14:22 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/1 "2024-03-18T14:22:08Z")

</div>

Hi Guys!  
I'm new to Node-red, currently i'm doing a project that need to use raspberry pi 4b gpio pin. However, when i used "node-red-node-pi-gpio" rpi-gpio-out node, it said not available. And I don't know how to control raspberry pi 4b gpio pin using node-red in linux os. Anyone can help out?

Thanks for attention.  
 ![Screenshot from 2024-03-18 22-21-29](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/04f4da19627b10cb28d85478bdfa765bac7d849a.png)

---

<div class="post-metadata">

**Author:** ![FireWizard52](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/firewizard52/32/34508_2.png) [@FireWizard52](https://discourse.nodered.org/u/FireWizard52)\
**Post date:** [18 March 2024 20:11 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/2 "2024-03-18T20:11:37Z")

</div>

Hi,

By coincidence I noticed somewhere else a similar issue  
See: [gpio fails as of kernel 6.6 on rpi - Domoticz](https://www.domoticz.com/forum/viewtopic.php?f=6&t=42141)

Perhaps it will help you as well

Regards

---

<div class="post-metadata">

**Author:** ![richiep](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@richiep](https://discourse.nodered.org/u/richiep)\
**Post date:** [18 March 2024 22:07 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/3 "2024-03-18T22:07:05Z")

</div>

Have you enabled gpio access in raspi-config?

---

<div class="post-metadata">

**Author:** ![Henry8](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henry8](https://discourse.nodered.org/u/Henry8)\
**Post date:** [20 March 2024 11:54 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/4 "2024-03-20T11:54:23Z")

</div>

Sorry, may I know how should i do that?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 March 2024 20:29 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/5 "2024-03-20T20:29:23Z")

</div>

> [@Henry8](#):
>
> may I know how should i do that?

Does google, or your favourite search engine, tell you how to do it?

---

<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:** [20 March 2024 21:05 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/6 "2024-03-20T21:05:38Z")

</div>

Just as social comment - I've never had to "enable GPIO access" in any config in any PI I've owned or used so this must be a new requirement that many of us have not heard of or know what to do to achieve it

---

<div class="post-metadata">

**Author:** ![franz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/franz/32/71949_2.png) [@franz](https://discourse.nodered.org/u/franz)\
**Post date:** [23 March 2024 11:28 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/8 "2024-03-23T11:28:41Z")

</div>

> [@Henry8](#):
>
> Sorry, may I know how should i do that?

in raspberry-like devices there is a bootenv file you have to check if there is the correct gpio and if it matches the pin you want to activate.

 ![env](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/1/e16fc6af1249e151b9f3d771e055286cf9417a13.jpeg)

---

<div class="post-metadata">

**Author:** ![iiot2k](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@iiot2k](https://discourse.nodered.org/u/iiot2k)\
**Post date:** [23 March 2024 19:55 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/9 "2024-03-23T19:55:19Z")

</div>

Hi, gpio output node accept 0/1 or true/false on input.  
Did you send string On Off ?

---

<div class="post-metadata">

**Author:** ![Henry8](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henry8](https://discourse.nodered.org/u/Henry8)\
**Post date:** [24 March 2024 04:33 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/10 "2024-03-24T04:33:09Z")

</div>

I send number 0/1 to gpio node

---

<div class="post-metadata">

**Author:** ![Henry8](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henry8](https://discourse.nodered.org/u/Henry8)\
**Post date:** [24 March 2024 07:05 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/11 "2024-03-24T07:05:17Z")

</div>

The things is, the node-red is running on Ubuntu os and the raspberry pi is using Ubuntu os. So, is it i need to create a gpio python script file and this code file can read/control by using Node-red gpio node?

---

<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:** [24 March 2024 08:04 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/12 "2024-03-24T08:04:35Z")

</div>

I'd don't think anyone here has tried to access Pi gpio pins using Ubuntu.

If you need to use gpio, I recommend switching to the standard RaspberryPi OS

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 March 2024 08:32 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/13 "2024-03-24T08:32:41Z")

</div>

> [@Henry8](#):
>
> node-red is running on Ubuntu

It is a pity you did not say that at the start. The general assumption is that Linux on a pi will be the pi OS.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 March 2024 08:35 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/14 "2024-03-24T08:35:40Z")

</div>

This may be helpful. If not then Google yields a number of possible hits. [https://ubuntu.com/tutorials/gpio-on-raspberry-pi#1-overview](https://ubuntu.com/tutorials/gpio-on-raspberry-pi#1-overview)

---

<div class="post-metadata">

**Author:** ![Henry8](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henry8](https://discourse.nodered.org/u/Henry8)\
**Post date:** [24 March 2024 08:54 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/15 "2024-03-24T08:54:04Z")

</div>

Because I thought most people think of linux as ubuntu operating system. So, I just only mentioned linux. I admit it was my mistake.

---

<div class="post-metadata">

**Author:** ![Henry8](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henry8](https://discourse.nodered.org/u/Henry8)\
**Post date:** [24 March 2024 08:57 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/16 "2024-03-24T08:57:18Z")

</div>

> [@Colin](#):
>
> [https://ubuntu.com/tutorials/gpio-on-raspberry-pi#1-overview](https://ubuntu.com/tutorials/gpio-on-raspberry-pi#1-overview)

I found this tutorials also but I haven't try it out. I will try it once i free.

---

<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:** [7 April 2024 08:57 UTC](https://discourse.nodered.org/t/node-red-in-linux-os-unable-to-control-raspberry-pi-4b-gpio/86528/17 "2024-04-07T08:57:23Z")

</div>

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