[Tutorial] Notification Led for the Moto G3 with Tasker (experimental)

Search This thread

StrangerWeather

Recognized Contributor
Jul 18, 2012
3,576
8,118
56
Oxford
Google Pixel 7 Pro
I've been using this when working in my office with my phone connected to my laptop, and find that it works really well, so I decided to share.

Cons:
- Your phone needs to be connected to a power source
- There is a 10 to 20 seconds delay between when the notification arrives and when the led light turns on
- The led light is white. No other colour is available
- You need to be rooted
- You need to buy Tasker and the AutoNotification plugin which are not cheap.

Pros:
- Your led light turns on whenever you get a notification
- You can choose the apps for which you want the notification led to come on
- The led light switches off when you dismiss your notification
- The led light comes on even if your screen is on
- You don’t have to look at your phone continually to catch sight of the Moto Display screen

You need:
- Tasker and AutoNotification from the PlayStore

_________________________________________

TUTORIAL

1. Install Tasker and AutoNotification on your Moto G3
2. Go to Tasker

Create 1st Task:
1. Click on Tasks and on the + button
2. New Task Name: Led On, then tick
3. Click + to add an Action
4. Choose Code
5. Choose Run Shell
6. In Command, type: echo battery-charging-blink-full-solid >/sys/class/leds/charging/trigger
7. Click Use Root
8. Click your back button

Create 2nd Task:
1. Click on Tasks and on the + button
2. New Task Name: Led Off, then tick
3. Click + to add an Action
4. Choose Code
5. Choose Run Shell
6. In Command, type: echo none >/sys/class/leds/charging/trigger
7. Click Use Root
8. Click your back button

Create a Profile:
3. Click on Profile, click the + button and choose State
4. Click on Plugin
5. Click on AutoNotification
6. Click on Intercept
7. In Configuration, click on the pen icon
8. Tick the Event Behaviour option
9. Click on Apps
10. Select all the apps that you want led notifications for
11. Click OK
12. Click on the tick at the top of the screen
13. Click your back button
14. Choose Task: Led On
15. Long Press on Led On
16. Click Add Exit Task
17. Choose Led Off
18. Click your back button
19. Success!!!

Enjoy! Any questions ask here…:)
 
Last edited:

Selmak

Senior Member
Jul 7, 2010
267
65
I appreciate the time you put in to this tutorial. For me though having to have the phone plugged in is a deal breaker. If I'm tethered to my desk there are better options like Pushbullet, which is in fact what I use at work. It puts notifications right up on my PC monitor.

I do miss the multi-colored light on my Nexus 4. It is too bad that manufacturers are moving away from them.

Sent from my MotoG3 using XDA Free mobile app
 
  • Like
Reactions: StrangerWeather

acejavelin

Inactive Recognized Contributor
Thank you... but as much as I appreciate you going through the trouble to make this tutorial, this isn't very useful... All this is doing is taking a hard coded charging LED which is disabled in software and toggling the charging state on and off when a notification (or other trigger) is active, not really a notification light, and only if the device is plugged in, which most people don't do, or need to do, during an average day. The fact that the circuit which drives this LED is not powered unless an external charging source is connected makes most of these projects to use it frivolous, but I hope I am wrong to be honest.
 

arnabJ

Senior Member
Dec 18, 2012
2,951
2,958
Asansol
www.proficientapps.in
May be offtopic but can't a custom kernel make it possible to use led for notifications??

I know that's possible because I have seen such projects.
Even Moto X play got a custom kernel which activates led for notifications.

Y not someone with knowledge of compiling kernels try this with the help of the user who made that kernel for X play.
============================== @squid2 can you help make the kernel for G3??
==============================
Sent from my SM-A800F using XDA Free mobile app
 

squid2

Recognized Developer
Mar 9, 2015
1,722
10,983
Ontario
May be offtopic but can't a custom kernel make it possible to use led for notifications??

I know that's possible because I have seen such projects.
Even Moto X play got a custom kernel which activates led for notifications.

Y not someone with knowledge of compiling kernels try this with the help of the user who made that kernel for X play.
============================== @squid2 can you help make the kernel for G3??
==============================
Sent from my SM-A800F using XDA Free mobile app

I had spent many hours examining LED notifications on osprey. Unfortunately, we are held back by a hardware difference beteen surnia/lux and osprey. All of the Motorola devices equipped with stml0xx sensor hub were originally equipped with a notification LED that could be controlled by both the sensor hub and the power management IC.

Earlier this year, Motorola decided to drop the LED notification feature and removed the capability from the kernel. This decision was made about a month after the design of the production surnia hardware was completed, and a month before production osprey hardware design was complete. As a result, the hardware for LED notifications controlled by the sensor hub was left in on surnia, but the relevant traces and resistors were removed on osprey. They probably did this to reduce complexity, and it may have saved them a tenth of a cent per device on resistors. They didn't remove the trace on lux, perhaps because it had gone out of mind by the time they were paying attention to production lux hardware, or perhaps because they realized that it was useless to do so, and would only limit the capabilities of the device.

The consequence of this is that the LED can only be controlled through the PMIC on osprey, while it can be controlled by the PMIC or sensor hub on surnia and lux. The sensor hub was designed to support LED notifications, and can run the LED arbitrarily. The PMIC is physically designed to only provide power to the LED driving circuit when a charger is plugged in.

Unfortunately, as a result of this hardware limitation, I don't think it will be possible to have LED notifications with the device unplugged on osprey.
 

arnabJ

Senior Member
Dec 18, 2012
2,951
2,958
Asansol
www.proficientapps.in
I had spent many hours examining LED notifications on osprey. Unfortunately, we are held back by a hardware difference beteen surnia/lux and osprey. All of the Motorola devices equipped with stml0xx sensor hub were originally equipped with a notification LED that could be controlled by both the sensor hub and the power management IC.

Earlier this year, Motorola decided to drop the LED notification feature and removed the capability from the kernel. This decision was made about a month after the design of the production surnia hardware was completed, and a month before production osprey hardware design was complete. As a result, the hardware for LED notifications controlled by the sensor hub was left in on surnia, but the relevant traces and resistors were removed on osprey. They probably did this to reduce complexity, and it may have saved them a tenth of a cent per device on resistors. They didn't remove the trace on lux, perhaps because it had gone out of mind by the time they were paying attention to production lux hardware, or perhaps because they realized that it was useless to do so, and would only limit the capabilities of the device.

The consequence of this is that the LED can only be controlled through the PMIC on osprey, while it can be controlled by the PMIC or sensor hub on surnia and lux. The sensor hub was designed to support LED notifications, and can run the LED arbitrarily. The PMIC is physically designed to only provide power to the LED driving circuit when a charger is plugged in.

Unfortunately, as a result of this hardware limitation, I don't think it will be possible to have LED notifications with the device unplugged on osprey.

Thanks for clearing the clouds.
Is it possible to fake plugged state?
If yes than may be it will be possible to make it work as expected.

Sent from my SM-A800F using XDA Free mobile app
 

StrangerWeather

Recognized Contributor
Jul 18, 2012
3,576
8,118
56
Oxford
Google Pixel 7 Pro
Thank you... but as much as I appreciate you going through the trouble to make this tutorial, this isn't very useful... All this is doing is taking a hard coded charging LED which is disabled in software and toggling the charging state on and off when a notification (or other trigger) is active, not really a notification light, and only if the device is plugged in, which most people don't do, or need to do, during an average day. The fact that the circuit which drives this LED is not powered unless an external charging source is connected makes most of these projects to use it frivolous, but I hope I am wrong to be honest.

Hey there, no worries, it only took about 5 minutes to write the tutorial. I said it was "experimental" because it is not a properly functional hack. It's just a bit of fun for people who like messing around with Tasker. I happen to find it useful, but like you, I would much prefer for the led to be fully functional. I really miss this from the Moto G1. ;)
 

squid2

Recognized Developer
Mar 9, 2015
1,722
10,983
Ontario
Thanks for clearing the clouds.
Is it possible to fake plugged state?
If yes than may be it will be possible to make it work as expected.

Sent from my SM-A800F using XDA Free mobile app

It's possible to fake being plugged in software, but I don't think it's possible to fool the PMIC into thinking it's plugged in software. Even if it were possible, that would result in strange behaviour as the PMIC would try to charge the battery when no charger is plugged in.
 

krsmit0

Senior Member
Apr 26, 2012
242
69
He just said it was a hardware limitation. Convincing software its charging won't tell hardware to provide the led power.

Sent from my MotoG3 using XDA Free mobile app
 

arnabJ

Senior Member
Dec 18, 2012
2,951
2,958
Asansol
www.proficientapps.in
It's possible to fake being plugged in software, but I don't think it's possible to fool the PMIC into thinking it's plugged in software. Even if it were possible, that would result in strange behaviour as the PMIC would try to charge the battery when no charger is plugged in.

Thanks for answering my curiosities.

He just said it was a hardware limitation. Convincing software its charging won't tell hardware to provide the led power.

Sent from my MotoG3 using XDA Free mobile app

I read that. What's wrong in asking though if it's possible some other way round?

Sent from my SM-A800F using XDA Free mobile app
 
  • Like
Reactions: Harsh.gundecha

aamir0701

Senior Member
Mar 31, 2012
106
14
BANGALORE
OnePlus 9R
I had spent many hours examining LED notifications on osprey. Unfortunately, we are held back by a hardware difference beteen surnia/lux and osprey. All of the Motorola devices equipped with stml0xx sensor hub were originally equipped with a notification LED that could be controlled by both the sensor hub and the power management IC.

Earlier this year, Motorola decided to drop the LED notification feature and removed the capability from the kernel. This decision was made about a month after the design of the production surnia hardware was completed, and a month before production osprey hardware design was complete. As a result, the hardware for LED notifications controlled by the sensor hub was left in on surnia, but the relevant traces and resistors were removed on osprey. They probably did this to reduce complexity, and it may have saved them a tenth of a cent per device on resistors. They didn't remove the trace on lux, perhaps because it had gone out of mind by the time they were paying attention to production lux hardware, or perhaps because they realized that it was useless to do so, and would only limit the capabilities of the device.

The consequence of this is that the LED can only be controlled through the PMIC on osprey, while it can be controlled by the PMIC or sensor hub on surnia and lux. The sensor hub was designed to support LED notifications, and can run the LED arbitrarily. The PMIC is physically designed to only provide power to the LED driving circuit when a charger is plugged in.

Unfortunately, as a result of this hardware limitation, I don't think it will be possible to have LED notifications with the device unplugged on osprey.

Just a doubt did you physically checked the resistor or you are just guessing or you used some method ???

Sent from my MotoG3 using XDA Free mobile app
 

kaustubh_lipare

Senior Member
Apr 2, 2012
157
47
Pune
May be offtopic but can't a custom kernel make it possible to use led for notifications??

I know that's possible because I have seen such projects.
Even Moto X play got a custom kernel which activates led for notifications.

Y not someone with knowledge of compiling kernels try this with the help of the user who made that kernel for X play.
============================== @squid2 can you help make the kernel for G3??
==============================
Sent from my SM-A800F using XDA Free mobile app

Awesome ...
 

dwane3

Senior Member
Apr 9, 2009
236
22
How to add flash notifications on kernel instead led light (its impossible..)?
 
Last edited:
  • Like
Reactions: stijn2911

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    May be offtopic but can't a custom kernel make it possible to use led for notifications??

    I know that's possible because I have seen such projects.
    Even Moto X play got a custom kernel which activates led for notifications.

    Y not someone with knowledge of compiling kernels try this with the help of the user who made that kernel for X play.
    ============================== @squid2 can you help make the kernel for G3??
    ==============================
    Sent from my SM-A800F using XDA Free mobile app

    I had spent many hours examining LED notifications on osprey. Unfortunately, we are held back by a hardware difference beteen surnia/lux and osprey. All of the Motorola devices equipped with stml0xx sensor hub were originally equipped with a notification LED that could be controlled by both the sensor hub and the power management IC.

    Earlier this year, Motorola decided to drop the LED notification feature and removed the capability from the kernel. This decision was made about a month after the design of the production surnia hardware was completed, and a month before production osprey hardware design was complete. As a result, the hardware for LED notifications controlled by the sensor hub was left in on surnia, but the relevant traces and resistors were removed on osprey. They probably did this to reduce complexity, and it may have saved them a tenth of a cent per device on resistors. They didn't remove the trace on lux, perhaps because it had gone out of mind by the time they were paying attention to production lux hardware, or perhaps because they realized that it was useless to do so, and would only limit the capabilities of the device.

    The consequence of this is that the LED can only be controlled through the PMIC on osprey, while it can be controlled by the PMIC or sensor hub on surnia and lux. The sensor hub was designed to support LED notifications, and can run the LED arbitrarily. The PMIC is physically designed to only provide power to the LED driving circuit when a charger is plugged in.

    Unfortunately, as a result of this hardware limitation, I don't think it will be possible to have LED notifications with the device unplugged on osprey.
    4
    Thanks for clearing the clouds.
    Is it possible to fake plugged state?
    If yes than may be it will be possible to make it work as expected.

    Sent from my SM-A800F using XDA Free mobile app

    It's possible to fake being plugged in software, but I don't think it's possible to fool the PMIC into thinking it's plugged in software. Even if it were possible, that would result in strange behaviour as the PMIC would try to charge the battery when no charger is plugged in.
    3
    I've been using this when working in my office with my phone connected to my laptop, and find that it works really well, so I decided to share.

    Cons:
    - Your phone needs to be connected to a power source
    - There is a 10 to 20 seconds delay between when the notification arrives and when the led light turns on
    - The led light is white. No other colour is available
    - You need to be rooted
    - You need to buy Tasker and the AutoNotification plugin which are not cheap.

    Pros:
    - Your led light turns on whenever you get a notification
    - You can choose the apps for which you want the notification led to come on
    - The led light switches off when you dismiss your notification
    - The led light comes on even if your screen is on
    - You don’t have to look at your phone continually to catch sight of the Moto Display screen

    You need:
    - Tasker and AutoNotification from the PlayStore

    _________________________________________

    TUTORIAL

    1. Install Tasker and AutoNotification on your Moto G3
    2. Go to Tasker

    Create 1st Task:
    1. Click on Tasks and on the + button
    2. New Task Name: Led On, then tick
    3. Click + to add an Action
    4. Choose Code
    5. Choose Run Shell
    6. In Command, type: echo battery-charging-blink-full-solid >/sys/class/leds/charging/trigger
    7. Click Use Root
    8. Click your back button

    Create 2nd Task:
    1. Click on Tasks and on the + button
    2. New Task Name: Led Off, then tick
    3. Click + to add an Action
    4. Choose Code
    5. Choose Run Shell
    6. In Command, type: echo none >/sys/class/leds/charging/trigger
    7. Click Use Root
    8. Click your back button

    Create a Profile:
    3. Click on Profile, click the + button and choose State
    4. Click on Plugin
    5. Click on AutoNotification
    6. Click on Intercept
    7. In Configuration, click on the pen icon
    8. Tick the Event Behaviour option
    9. Click on Apps
    10. Select all the apps that you want led notifications for
    11. Click OK
    12. Click on the tick at the top of the screen
    13. Click your back button
    14. Choose Task: Led On
    15. Long Press on Led On
    16. Click Add Exit Task
    17. Choose Led Off
    18. Click your back button
    19. Success!!!

    Enjoy! Any questions ask here…:)
    1
    I use tasker and the camera flash.

    Sent from my MotoG3 using XDA Free mobile app
    1
    I appreciate the time you put in to this tutorial. For me though having to have the phone plugged in is a deal breaker. If I'm tethered to my desk there are better options like Pushbullet, which is in fact what I use at work. It puts notifications right up on my PC monitor.

    I do miss the multi-colored light on my Nexus 4. It is too bad that manufacturers are moving away from them.

    Sent from my MotoG3 using XDA Free mobile app