RasPi 3B+ help with `led1` functionallity

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?

You don't appear to have asked a question.

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

#!/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.

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