Doc

Setup

Twilight should mostly work out of the box. Please make sure you enable Device settings > Location from network. In this case Twilight will automatically detect your sunset and sunrise time and synchronize your screen tint with the sun.

In case you are a shift worker, night time worker, live close to the pole or in general your schedule is irregular and not connected with the sun cycle you may want to select other Filter times and Sun. You may choose to use filter times based on your alarm time, custom times or use Filter times: always and control Twilight manually using pause and resume.

The default intensity and temperature settings are a compromise between blue light filtering and appearance. To achieve better blue light filtering consider using higher intensity over 60% and combine it with a non-zero dim. The more intensity and dim you use the more blue light gets filtered but also the less contrast of your screen. In general those settings are a trade off between contract and screen readability and blue light filtering the more intensity you use the less contract but less blue light. So this simply means use as much intensity as you can bear.. regarding temperature I recommend minimum temperature as this only adds green in which is also melatonin sensitive..

Ideal color temperature is 1000K which maximizes contrast and minimizes blue and green. Adding more temperature may be softer on the eyes but may add green which according to some studies may also have effect on melatonin.

Some options explained

Backlight control
– adjusts your display backlight within filter times

Smartlight
– integrates with your smart light bulbs – currently supports Philips HUE

Civil sunset
– there are several sunset / sunrise times, please check here: https://en.wikipedia.org/wiki/Twilight#Civil_twilight Civil sunset makes most sense for the app IMHO. If you like to get the official sunset / sunrise, please uncheck civil times in settings – more..

Automation

Easy tasker setup with AutoShare

Automation of Twilight with Tasker/Locale/Llama etc. (by Niki)

There is a Tasker plug-in Twilight. But you can also use custom intents.

ACTIONS

Pause 1 minute

com.urbandroid.lux.action_command_pause_temp

Start

(Does not work with Twilight Accesibility service on, Accessibility service life-cycle can only be controlled by the user in the Phone Settings)

com.urbandroid.lux.action_command_start

Stop

(Does not work with Twilight Accesibility service on, Accessibility service life-cycle can only be controlled by the user in the Phone Settings)

com.urbandroid.lux.action_command_stop

Change profile

com.urbandroid.lux.action_command_profile_next

EXTRA: profile = <profile name> (use colon in Tasker profile:Bed time)

Show quick settings

com.urbandroid.lux.action_command_quick_settings

The following only works if Twilight is not set as Accessibility service:

The intents must be addressed as target Service to the service class com.urbandroid.lux.TwilightService in the package com.urbandroid.lux. The commands are supplied as extras. The extras are of type string and the value can be set to an arbitrary value.
However, it is recommended to set the value to the same name as the extras name.

The supported list of extras are:
* update
* refresh
* preview
* profile_next
* quick_settings
* profile = <profile name>
* toggle
* start
* stop

 
One option to send the intent is using the am command. For example, the following command (as root) can be used to enable Twilight:
 
am startservice –es start start com.urbandroid.lux/.TwilightServiceFor Tasker, the action Send Intent from category Misc can be used.
The correct configuration is as follows:Action: [empty]
Cat: None
Extra: start:start
Package: com.urbandroid.lux
Class: com.urbandroid.lux.TwilightService
Target: Service

Related research and articles

https://www.sleepfoundation.org/bedroom-environment/blue-light

https://www.health.harvard.edu/staying-healthy/blue-light-has-a-dark-side

The effect of reducing blue light from smartphone screen on subjective quality of sleep among students,
Randjelović, P. & Co, 2023
https://pubmed.ncbi.nlm.nih.gov/36744480/

Preliminary Results: The Impact of Smartphone Use and Short-Wavelength Light during the Evening on Circadian Rhythm, Sleep and Alertness
Höhn Ch., & Co, 2021
https://www.mdpi.com/2624-5175/3/1/5

Influences of Circadian Illuminances from Lighting and TV on the Human Locomotor Activity, Sleep Disorder, EEG, HRV, and Melatonin Secretion
Kim D.H. & Co, 2020
https://sid.onlinelibrary.wiley.com/doi/10.1002/sdtp.14065

Light Modulation of Human Clocks, Wake, and Sleep
Prayag, S. A., & Cc, 2019
https://www.mdpi.com/2624-5175/1/1/17

Systematic review of light exposure impact on human circadian rhythm
Tähkämö, L. &Co, 2019
https://www.tandfonline.com/doi/full/10.1080/07420528.2018.1527773

Perception of Sleep Disturbances due to Bedtime Use of Blue Light-Emitting Devices and Its Impact on Habits and Sleep Quality among Young Medical Students,
Jniene, A., & Co, 2019
https://onlinelibrary.wiley.com/doi/10.1155/2019/7012350

High sensitivity and interindividual variability in the response of the human circadian system to evening light,
Phillips, A.J.K., & Co, 2019
https://www.pnas.org/doi/full/10.1073/pnas.1901824116

Evening light exposure to computer screens disrupts human sleep, biological rhythms, and attention abilities,
Green, A., & Co, 2017
https://www.tandfonline.com/doi/full/10.1080/07420528.2017.1324878

Effects of blue light on the circadian system and eye physiology,
Tossiny G, Ferguson I, Tsubota K., 2016
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4734149/

Amplitude Reduction and Phase Shifts of Melatonin, Cortisol and Other Circadian Rhythms after a Gradual Advance of Sleep and Light Exposure in Humans,
Derk-Jan Dijk D.J., & Co, 2012
https://pubmed.ncbi.nlm.nih.gov/22363414/

Exposure to Room Light before Bedtime Suppresses Melatonin Onset and Shortens Melatonin Duration in Humans,
Joshua J. Gooley, Kyle Chamberlain, Kurt A. Smith & Co, 2011
https://pubmed.ncbi.nlm.nih.gov/21193540/

Effect of Light on Human Circadian Physiology,
Jeanne F. Duffy, Charles A. Czeisler, 2009
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2717723/

Efficacy of a single sequence of intermittent bright light pulses for delaying circadian phase in humans,
Claude Gronfier, Kenneth P. Wright, & Co, 2004
https://pubmed.ncbi.nlm.nih.gov/15039146/

Intrinsic period and light intensity determine the phase relationship between melatonin and sleep in humans,
Kenneth P. Wright, Claude Gronfier & Co, 2009
https://pubmed.ncbi.nlm.nih.gov/15834113/

The Impact of Sleep Timing and Bright Light Exposure on Attentional Impairment during Night Work,
Nayantara Santhi & Co, 2008
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2574505/

Short-Wavelength Light Sensitivity of Circadian, Pupillary, and Visual Awareness in Humans Lacking an Outer Retina,
Farhan H. Zaidi & Co, 2007
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2151130/