Thank you, the following code fixed the whole issue and disabled all LEDs
#Disable RaspberryPi LEDs
# Disable the Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
# Disable ethernet port LEDs
dtparam=eth_led0=4
dtparam=eth_led1=4
So I have few RPI4 in my bedroom and for all that work on Raspberry OS I have a script running that will turn off all of the LEDs and only every minute it will blink for the fraction of second - otherwise it would be too bright for me to sleep
now, I have installed also HA on RPi and this is the only LED I am not able to turn off during the night - I think HA OS takes too much control over the RPi
it would be nice to have the ability to do the same with HA installed
both: red (power) and green (sdd activities)
for my non-HA raspberries I use simple program to turn both LEDs off during the night (with 1 blink per minute to see if there is still power or so) and for this I use access to:
/sys/class/leds/led*/brightness
but on HA OS there is no access to this (or at least I don’t know how to):
/sys/class/leds/led0/trigger: Read-only file system
I read a post on stackexchange that said those lines don’t work on the latest version of Raspbian but on older ones instead
Used to work for me in 2020 too on my 3B whereas after I reinstalled everything with the latest Raspbian after an SD card failure it doesn’t anymore.
I hope there’s no loss in going back to an older Raspbian version. Guess I could paint or desolder but I’d rather do it via software
edit: Flashing any version of raspbian lite I tried so far
(eg 2019-04-08-raspbian-stretch-lite and 2019-09-26-raspbian-buster) cause errors when trying to flash them with Balena Etcher. Even trying to flash the same Raspbian that was already on the card (2020-02-13-raspbian-buster-lite) causes an error… And I wasn’t able to clean my SD card via diskpart either. Windows wasn’t able to find an issue with the volume via its’ built in Scan function. Rebooting or using Raspberry Pi imager instead of Balena Etcher didn’t help either.
I’ve read that on Windows there can be issues with flashing stuff on SD cards that have an OS on them already but feel too exhausted to dive into that lengthy post about suggested ways to fix it
Couldn’t get the ethernet lights to go dark on the Pi 4 using the value of 4. In one post I saw someone mentioning using 14 instead of 4 on the Ethernet LED for Pi 3. So I gave it a try on my Pi 4. These /boot.config,txt lines worked for me. The last two lines are the missing solution for Pi LED lights.
# Disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
#disable ACT and PWR LEDs
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
#disable ethernet port LEDs
#dtparam=eth0_led=4
#dtparam=eth1_led=4
dtparam=eth_led0=14
dtparam=eth_led1=14
Update: Turn out the pi I was trying to make go dark was a PI 3. That explains why I had to use the above configuration.
# Turn off Power LED
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off
# Turn off Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Turn off Ethernet ACT LED
dtparam=eth_led0=14
# Turn off Ethernet LNK LED
dtparam=eth_led1=14
Raspberry Pi 4B
# Turn off Power LED
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off
# Turn off Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Turn off Ethernet ACT LED
dtparam=eth_led0=4
# Turn off Ethernet LNK LED
dtparam=eth_led1=4
Thank you! The 4B version worked just fine for me. I only had to find config.txt, which was under /mnt/boot/ , and to get there one needs to type “login” at the HA console. After editing with vi, reboot now does it.
Now all there is left to do is figure out how to do the same for the SSD adapter, which has a bright blue LED blinking furiously under the pi, another red one on the bottom, and another, dimmer blue one on the SSD itself. I guess tack glue will have to do.