# RasPi 3B+ help with \`led1\` functionallity

**URL:** <https://discourse.nodered.org/t/raspi-3b-help-with-led1-functionallity/56770>\
**Category:** General\
**Created:** [16 January 2022 23:43 UTC](https://discourse.nodered.org/t/raspi-3b-help-with-led1-functionallity/56770 "2022-01-16T23:43:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [16 January 2022 23:43 UTC](https://discourse.nodered.org/t/raspi-3b-help-with-led1-functionallity/56770/1 "2022-01-16T23:43:16Z")

</div>

Maybe off topic, but I have to ask somewhere.

I can control the `activity` LED by writing a different value to  
`/sys/class/leds/led1/brightness`

`0` if off and `1` is on.

Normally I want it off and only on after a reboot, until I have _acknowledged_ it in NR.

This isn't being too _Out of bounds_ with how things work - is it?

---

<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:** [18 January 2022 09:10 UTC](https://discourse.nodered.org/t/raspi-3b-help-with-led1-functionallity/56770/2 "2022-01-18T09:10:09Z")

</div>

You don't appear to have asked a question.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [18 January 2022 09:18 UTC](https://discourse.nodered.org/t/raspi-3b-help-with-led1-functionallity/56770/3 "2022-01-18T09:18:44Z")

</div>

Ok, brain failure.

I was wanting to know if doing that is _acceptable_ and not going to brake anything.

I have since found out that after reboot the file is re-attributed and so doesn't work.

To get it working I have to run a script that sets the attributes to allow me to write to the file then `echo 0 > filename` (I'm not going to write out the whole path)

Ok, the script I run from within Node-red

```auto
#!/bin/bash
#-----------------------------------
# Allow turning off of ACTIVITY LED
#-----------------------------------
sudo chmod +666 /sys/class/leds/led1/brightness
sleep 2
echo 0 > /sys/class/leds/led1/brightness

```

Via an `exec` node.

Yeah, ok. I could have just done the first line with `sudo`..... Swings and roundabouts.

---

<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:** [19 March 2022 09:18 UTC](https://discourse.nodered.org/t/raspi-3b-help-with-led1-functionallity/56770/4 "2022-03-19T09:18:59Z")

</div>

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