Hi guys,
Trying to get some control over my LED lights! Ideally what I'd like to do is switch the LED on and off using tasker but the tasker action that toggles "Settings" -> "Display" -> "Pulse notification light" seems to be broken (for some time). I've tried setting tasker up to run the command below (from here) but that throws an error in tasker (screenshot) so perhaps the location of that particular setting has changed since 2012.
Code:
echo 0 > /sys/devices/virtual/sec/led/led_pattern
Does anybody know the correct command that I could execute with tasker to toggle this setting?
I'm using a OnePlus 3T with OOS 4.1.1 (Adroid 7.1.1)
Cheers!
Noosentaal
I'm not familiar with the OnePlus, but I know on my Pixel going into the settings and changing the notification light option ends up changing the notification_light_pulse system setting between 0 and 1. I figure it would be possible to also change that setting on a rooted phone with Tasker shell commands, or something like AutoTools Secure Settings could also do it on an unrooted phone. The setting changes I've tried have usually worked on my phone, except for preferred_network_mode1, so if your phone also uses that setting I would expect it to work. The link below has some information about shell commands in Tasker, and at the top it describes how to list the system settings on your phone, so you can see if notification_light_pulse is used by your phone. Below the link are the Tasker shell commands to turn the setting off or on for my phone, and the use root option needs to be checked so the shell commands will work.
http://www.notenoughtech.com/tasker/tasker-run-shell-commands/
settings put system notification_light_pulse 0
settings put system notification_light_pulse 1
Thanks, this is perfect! I did a quick check to see if this will work on my phone and running:
settings get system notification_light_pulse
returns: 0
Which is correct as I've currently toggled the setting off.
Just following back up on this - I've experimented a bit with this but it doesn't seem to be properly toggling the setting. Here's what I've found:
- Manually toggling the "Pulse notification light" setting sets that variable in settings (checked by using "settings get system notification_light_pulse" in a terminal app - toggles between 0 and 1)
- Manually toggling the "Pulse notification light" setting has the desired behaviour on the phone: LEDs are not lit up when charging when off, they are when on - using this to test as its reliable and easy to replicate
- Running a shell command in tasker sucessfully sets either a 1 or 0 for notification_light_pulse (checked using terminal as above) however it does not move the toggle in the settings screen in the phone
- Using tasker to set notification_light_pulse does not have the desired behaviouro n the phone: LEDS are unaffected (they retain whatever setting was set by the switch in settings before tasker got involved)
Any ideas what's going wrong here?
I'm not sure. It might be specific to how your phone is setup. I tested my phone, and the previously noted shell commands do cause the settings screen to reflect the change on the Pixel, which is different than what you were seeing. Changing preferred_network_mode1 doesn't cause my phone to actually change the radio until the Cellular networks setting screen is opened or the phone is restarted, so I've seen one similar example, where using the shell command doesn't cause a change in how the phone functions. On the pixel many settings menu items can be altered with shell commands, so I'd guess it could be ROM related.
EDIT: It looks like in the following post someone was using shell commands on a previous OnePlus phone and rom. I suppose it's possible there might be a custom OnePlus setting that's being used, and that idea could be tested using the list commands from the notenoughtech site to check if any other option changes when the setting screen is altered. If listing the settings doesn't turn up another option being changed, then it's something that's out of my current depth with using Tasker to make Android setting changes.
https://forum.xda-developers.com/oneplus-3/how-to/guide-oneplus-3-custom-tasker-shell-t3571732
I've done a little more playing with this and it seems my testing method was actually at fault in the post above. Changing that setting does correctly set the LED flashing for notifications - it just doesn't affect the charging LEDs. This is actually ideal as I don't want charging LEDs ever!
It seems that in the Oneplus 3T at least this toggle changes more than one setting and the charging LED must be another setting that I haven't discovered yet.
Just to summarise for anyone else that might want this in the future:
If you want charging LEDs on: toggle "Pulse notification light" in display settings to on then use tasker to set the desired setting for notifications using the code above
If you want charging LED off: toggle "Pulse notification light" in display settings to off and use tasker to change the notification settings accordingly
Noosentaal said:
Changing [the] setting does correctly set the LED flashing for notifications - it just doesn't affect the charging LEDs.
It seems that in the Oneplus 3T at least this toggle changes more than one setting and the charging LED must be another setting that I haven't discovered yet.
Just to summarise for anyone else that might want this in the future:
If you want charging LEDs on: toggle "Pulse notification light" in display settings to on then use tasker to set the desired setting for notifications using the code above
If you want charging LED off: toggle "Pulse notification light" in display settings to off and use tasker to change the notification settings accordingly
Click to expand...
Click to collapse
Have some kudos! Many thanks for sharing this information.
Verified on OnePlus 3. Switch off Pulse Notification Light in standard settings and then the Tasker toggle can be used to switch on notifications to be controlled by Light Flow or Light Manager (or presumably Tasker itself). These then are not overridden by any inbuilt charge notifications.
The only downside is that the notification then only appear if the screen is off. I came at this wanting to dim the inbuilt charge notification with an always on night clock. But next best is that I can use a night clock with the bright charge LED completely off :good:
Excellent, glad I could help!
I've never understood charging LEDs - my phone is my alarm clock and I want it face up to snooze first thing in the morning and I definitely don't need an LED lighting up the entire room! I appreciate that others might find charging LEDs helpful, seems like this should be straightforward toggle in settings (possibly with a dimmer switch for your particular use case!)
Related
I posted this in the Themes and Apps subforum a week ago and got no responses. I was wondering if anyone proficient at Tasker knows how to modify Active Display/Notifications.
For instance, is it possible to use Tasker to dictate what notifications will show up on Active Display depending on the time of day? So, when I'm at work, I'd like to disable (i.e., uncheck) all corporate email notifications (but only as they appear in Active Display) since I get those notifications on my PC anyway. If not, maybe I need to just disable corporate email notifications globally during that period of time, which would be a less desirable solution.
I could be wrong, but I think Tasker can only do something like that if the app is setup as a plugin to work with Tasker.
There very well may be an easier/better way to do it, but if you're rooted you can run shell commands to simulate touch input on the device. You could have a task to open the Active Notifications settings, and simulate the input of tapping the checkboxes you wanted to enable/disable, and run different tasks to set/remove them based on time/location/etc.
Like I said, there may be an easier way that I am not aware of, but that comes to mind.
eyc said:
I posted this in the Themes and Apps subforum a week ago and got not responses. I was wondering if anyone that is proficient with Tasker knows how to modify modify Active Display/Notifications.
For instance, is it possible to use Tasker to dictate what notifications will show up on Active Display depending on the time of day? So, when I'm at work, I'd like to disable (i.e., uncheck) all corporate email notifications (but only on Active Display) since I get those notifications on my PC anyway. If not, maybe I need to just disable corporate email notifications globally during that period of time, which would be a less desirable solution.
Click to expand...
Click to collapse
thats actually a genius idea...unsure if we can change the active notification setting, but maybe use tasker to clear the notification from the status bar then maybe bring it back (or a tasker notification with smiliar messaging) about the skipped notification on unlock.
StephenMilone said:
thats actually a genius idea...unsure if we can change the active notification setting, but maybe use tasker to clear the notification from the status bar then maybe bring it back (or a tasker notification with smiliar messaging) about the skipped notification on unlock.
Click to expand...
Click to collapse
Well it could definitely toggle the setting. I've used it to run some actions within apps before (apps that I wanted to "manually" sync on a specific schedule. You define the shell commands as:
Code:
input tap X Y
or
input swipe X1 Y1 X2 Y2
So you'd launch "settings", find the coordinates of the Active Display button, set it to tap there, find and set the coords for "manage notification types", and the associated apps. This could be tough if you add/remove apps a lot, because the coordinates would change if a new app falls in the list ahead of one you have setup to use this method, but it would work.
You could also fire a notification from Tasker when the task is executed to tell you that the selected apps are behind hidden.
This is exactly what I wanted. How and where can I input this shell command? And how can I find the coordinates?
I created Turbo Notify under [ Tasks ]
I created an action named Notify for Turbo Notify
Notify:
Title: Turbo Modes
Text: Toggle CPU Speeds
Under Actions: I added - Plugin / Kernel Aduitor then Configured it to toggle a cpu profile called Maximum.
I added 2 more. basically 3 toggles for Kernel Aduitors profiles.
So then I setup a Profile to work off of Device Boot then pointed it to Turbo Notify
So my question is this. Turbo Modes always comes up when the device boots. But the buttons below it do not always come up. Sometimes they may even go away during device use.
I am new to tasker and am a nub. Just wondering if I am missing something obvious. When I go into tasker then go into Tasks / Turbo Notify There is the action Notify and tap on the Play icon at the bottom left, the buttons show up on the notification. ( lil green light/icon shows up)
Sorry if it is a nub question. But how can I make it active all the time, and start on boot? The notification is always there, just not the buttons.
- Thnx in advance
I created a task to mimic what your doing. The buttons disappeared on me when unlocking the screen after my battery got (very) low. I've not had a lot of time to play with this, but I did notice when the buttons were missing, the notification did not look like it was expanded. They came back after a few notification drawer open/close cycles.
Still, I don't think you're doing anything wrong. Some thoughts;
Do you have icons assigned to the notification and each button? If not, try adding them.
Is "run in foreground" checked in the preferences -> monitor settings?
Yes I have icons assigned. Built-In ones. And yes to "run in foreground"
I have the priorities set to max, I don't know if that makes a difference.
Like I said I am new to tasker, I'm wondering if i overlooked something simple. Dunno.
Please help - Life-long Blackberry user who can't seem to figure a few things out.
#1. My pulse light notification is turned on however ....no pulse light. (I have even assigned specific colors to certain apps) I have confirmed in 'settings' that the pulse notification is enabled.
#2. I have set certain contacts to have shortcuts on my home screen - they appear there quite fine. However, when I click on them, nothing happens. Nothing comes up. No view of the contact. I inadvertently selected initially, open as a contact always, but again - nothing. The short cut icons are there, but are not accessible when clicked. I have removed them and replaced them again - same result.
#3. How do I turn off my 'sleep' mode or even change it from the max of 10 mins?
#4. Why is it that when I turn off my screen, with the red button, so that the screen is blacked out, for battery purposes is why I usually do this, why is it that I don't receive notifications when the screen is blacked out? I have my phone set to vibrate and I can barely tell it is vibrating when it goes off. Again, pulse notification indicators were how I would know I have a message/email etc.,, on my bb however, they are not working per #1 above.
#5. In addition, further to #4 - when I do close off my screen using the red button on the side, I am required to enter my screen lock sequence to open, even if the phone has only been off for a few seconds. As I mentioned in #3, I have the 'sleep' set to 10mins - so why does it lock and not simply allow me to reengage the phone without having to unlock?
I am confident that these are all simply issues - however being completely new to the phone, I am having difficulty figuring out how to resolve them.
Thank you in advance to those providing feedback!
Regards,
Kimberly
NewHauweiUser2018 said:
Please help - Life-long Blackberry user who can't seem to figure a few things out.
#1. My pulse light notification is turned on however ....no pulse light. (I have even assigned specific colors to certain apps) I have confirmed in 'settings' that the pulse notification is enabled.
#2. I have set certain contacts to have shortcuts on my home screen - they appear there quite fine. However, when I click on them, nothing happens. Nothing comes up. No view of the contact. I inadvertently selected initially, open as a contact always, but again - nothing. The short cut icons are there, but are not accessible when clicked. I have removed them and replaced them again - same result.
#3. How do I turn off my 'sleep' mode or even change it from the max of 10 mins?
#4. Why is it that when I turn off my screen, with the red button, so that the screen is blacked out, for battery purposes is why I usually do this, why is it that I don't receive notifications when the screen is blacked out? I have my phone set to vibrate and I can barely tell it is vibrating when it goes off. Again, pulse notification indicators were how I would know I have a message/email etc.,, on my bb however, they are not working per #1 above.
#5. In addition, further to #4 - when I do close off my screen using the red button on the side, I am required to enter my screen lock sequence to open, even if the phone has only been off for a few seconds. As I mentioned in #3, I have the 'sleep' set to 10mins - so why does it lock and not simply allow me to reengage the phone without having to unlock?
I am confident that these are all simply issues - however being completely new to the phone, I am having difficulty figuring out how to resolve them.
Thank you in advance to those providing feedback!
Regards,
Kimberly
Click to expand...
Click to collapse
1) Does it light when the phone is plugged to charger?
2) I'm using a different launcher (Nova Launcher) and contacts shortcuts works fine, so I don't know
3)I think it's the 3rd option in Display setting
4) You maybe should have to set permission manually in Battery settings
5) Under Privacy and Security, find Lock Screen (or Screen Lock), then Security Lock setting and there you can change the lock delay time
A main disadvantage of the OP7P is the lack of AOD and Led. The ambient display is very short, so you never know if you missed call or message.
Some AOD Apps are heavy battery consumers, or disabling face recognition unlock, OPAODmod block chrome, Plus Beat is reasonable solution, though it is not AOD.
gigiion came up with the idea to trigger the Amolad AOD app to run only if notification was missed, using Macrodroid. Here is the way I implemented his idea, using Tasker:
1. Install Always on AMOLED from google play store. Do not enable the service. For OP7P choose One UI theme.
2. Screen condition
In Tasker, make these two profiles:
- Display off > Veriable set %Screen_Locked ~ 1
- Display Unlocked > Veriable set %Screen_Locked ~ 0
In such way the native ambient display will not interrupt the AOD whet it turn the screen on.
3. Main task
If %Screen_Locked ~ 1
Veriable set %Titel1 to %NTITLE
Veriable set %Text1 to %evtprm3
Wait 15 secondes
From Amolad plugin – start amolad display if %Screen_Locked ~ 1
End if
The variables %Title1 and %Text1, can be used to track the situation that the AOD start without any known trigger. Such phenomenon can happened if WhatsApp notify “Searching for messages”.
The 15 sec delay is for the native ambient display. The double condition of Screen_locked, disable AOD if you unlocked display in this period, of just answer a call.
4. Triggers
Make profiles of event/notification, missed call, state/power/power or whatever you like, and assign to the task you just made. Name those profiles – it is necessary for next stage.
5. Toggle profiles
Make “toggle aod profiles” task:
Profile Status missed_call set toggle
Profile Status aod set toggle
etc ……..
if % PENABLED ~ *,aod,* (“aod” is name of one of the trigger profiles)
setup quick setting (number: 1st, Name: toggle aod profiles, status: inactive)
else
setup quick setting (number: 1st, Name: toggle aod profiles, status: active)
end if
I do not understand way the active/inactive are replaced.
6. Assign quick setting button
In Tasker’s main screen upper right corner three dots: Preferences/ Action tab/ quick setting tab.
Then add it in the quick setting editor.
7. Automatic toggle triggers
Clone the task you made in section 5, and change “toggle” to “on” of “off”, then you can make any profile you like to toggle the triggers.
Seems like alot of work when you can just use this mod.
https://forum.xda-developers.com/on...ice-themes-apps--mods/oxygen-aod-mod-t4023587
hallo dare said:
Seems like alot of work when you can just use this mod.
https://forum.xda-developers.com/on...ice-themes-apps--mods/oxygen-aod-mod-t4023587
Click to expand...
Click to collapse
The main reason that I didn't use it, is the long remind interval (min 15 sec) and the short display time. You can miss notifications if you don't looking into the black screen all the time. Any case I found stable AOD to be better, otherwise i could use Plus beat.
No notifications waiting makes the screen off and AOD not showing.
Recieving or already having a notification shows AOD.
On top of that you can select which apps are important to you to behave this way for their notifications and ignore others, also can be set similary for charging = on / not charging = off.
Yet it has no impact on battery maybe it will use like additional 0.009%
1- Install Always On Edge App
2- in Main settings section -> enable With AOD invisible -> but show AOD on notifications.
3- Main settings -> optional permissions -> AOD lighting controller.
4- save.
And that is it no need to enable any other permission or feature. However, please note that if you enable edge lighting then timing will be applied.