2

Notification Leds not recognised in "Alert, Set Light" Action in Android 8.1

I tried to create a task where when I started "Car Mode", I would also light permanently the notification led in Blue color, so when driving I can check quickly if car mode is on and turn it off when car mode is off. 

In Android 6.0 the action "Alert, Set Light" shows the detected available notification leds and I can use the action successfully, but in Android 8.1 (my new smartphone) the action was disabled, so I updated to the last tasker version and tried again.  The option became available, but there was no notification leds detected, so I could not use it.

After a lot of search I found the Led names under /sys/class/leds/ (lcd-backlight, mt6370_pmu_bled, mt6370_pmu_led1, mt6370_pmu_led2, mt6370_pmu_led3, mt6370_pmu_led4) and in my task I created action "Code>Run Shell", with set Use-Root to "on", 
command: echo 64>/sys/class/leds/mt6370_pemu_led2/brightness/brightness (to turn on led 2 as Green)
command: echo 64>/sys/class/leds/mt6370_pemu_led3/brightness/brightness (to turn on led 3 as Blue)

The result is Light Blue.

To turn off the leds you need to enter both commands:
command: echo 00>/sys/class/leds/mt6370_pemu_led2/brightness/brightness (to turn off led 2)
command: echo 00>/sys/class/leds/mt6370_pemu_led3/brightness/brightness (to turn off led 3)

All possible color combinations are these (0 means 00 and 1 means 64 in the command, I am not sure if putting 01 in the commands also works):

Led 1 Led 2 Led 3 Led 4 Color
0 0 0 0 Off
0 0 0 1 Red
0 0 1 0 Blue
0 0 1 1 Blue-Red
0 1 0 0 Green
0 1 0 1 Light Green
0 1 1 0 Light Blue
0 1 1 1 Light Blue
1 0 0 0 Off
1 0 0 1 Red
1 0 1 0 Blue
1 0 1 1 Blue-Red
1 1 0 0 Green
1 1 0 1 Light Green
1 1 1 0 Light Blue
1 1 1 1 Light Blue

Can you make tasker correctly recognize the notification leds?

Please note that the other notification settings (Notify, Notify LED) need the screen to be turned off first and I cannot make the leds permanent (I can also not set the color to anything but Blue) and there's this annoying notification that cannot be avoided.

3 replies

Hi. What version of Tasker are you using?

NM

Tasker version is 5.6.5

Thanks. To clarify, your device is rooted, but the Set Lights action didn't recognize any lights for you whatsoever?

NM

Yes this is correct.