Skip to content

Estimate ​

Where does the reading come from, and where does it stop? This section covers the altitude of the sun, the clear-sky curve, the cloud factor, the forecast window, what the reading uses while fetches fail, the limits of an estimate, and the bibliography that credits its sources.

Settings comes before this section with what each setting does.

Three Factors ​

Each minute's reading is the clear-sky illuminance at the sun's altitude times the cloud factor, clamped into the range HomeKit accepts. The clear sky comes from U.S. Naval Observatory Circular 171,[1] and the cloud factor from Open-Meteo's forecast over the Haurwitz clear-sky model.[2]

Circular 171 gives the clear sky’s lux from the sun’s altitude alone, and the sample day’s sun peaks at 43.1°.

Each 15-minute step divides the forecast’s sunlight by a clear sky’s, and a minute takes the factor on the line between its two steps, or 1 where no stored window covers it.

HomeKit accepts 0.0001 to 100,000 lux, so the plugin clamps the clear sky times the factor into that range before writing it.

The three terms as a table
TermAt 10:00Comes From
Clear sky54,825 luxCircular 171 gives the clear sky’s lux from the sun’s altitude alone, and the sample day’s sun peaks at 43.1°.
Cloud factor0.888Each 15-minute step divides the forecast’s sunlight by a clear sky’s, and a minute takes the factor on the line between its two steps, or 1 where no stored window covers it.
Reading48,684 luxHomeKit accepts 0.0001 to 100,000 lux, so the plugin clamps the clear sky times the factor into that range before writing it.

A Day of the Reading ​

The reading follows the clear-sky curve from the night's floor through each twilight to noon and back, scaled by the cloud factor wherever a stored window covers the minute.

The dial draws October 4 at the zip code Finding Your Place searches for. The reading holds at HomeKit's floor of 0.0001 lux from 19:40 to 05:26 and climbs and falls through each twilight. It runs under the clear sky by the forecast's share inside the one stored window, 06:15 to 13:00, and follows the clear-sky curve alone outside it, as the plugin does wherever no stored window covers a minute.

Night19:40–05:26

0.0001 lux at HomeKit’s floor. The clear sky sinks to 3.8 × 10⁻¹⁹ lux at 00:33, 14.4 decades under the lowest value HomeKit accepts, so the reading is clamped up to that floor.

Dawn05:26–06:45

6.7 decades up in 79 min. The sun climbs the 14.5° from −15.3° to sunrise, and the clear sky’s light rises about 0.47 decades with each degree, lifting the reading off HomeKit’s floor to 535 lux.

Window06:15–13:00

0.748–1 of the clear sky. Each 15-minute step divides Open-Meteo’s forecast sunlight by the clear sky’s, a step with the sun under 5° takes 0.785, the mean of the 4 nearest, and from 13:00, the factor is 1.

Day06:45–18:21

72,809 lux at noon, sun at 42.5°. By day, the clear sky follows the sun’s height, and the reading follows the clear sky, under it by the forecast’s share until 13:00 and on it from then to sunset.

Dusk18:21–19:40

6.8 decades down in 79 min. The sun sinks from sunset to −15.5°, and with no stored window over these minutes, the reading is the clear sky alone, falling until it meets HomeKit’s floor at 19:40.

Each stretch as a table
StretchMinutesThe ReadingWhat It Does There
Night19:40–05:260.0001 lux at HomeKit’s floorThe clear sky sinks to 3.8 × 10⁻¹⁹ lux at 00:33, 14.4 decades under the lowest value HomeKit accepts, so the reading is clamped up to that floor.
Dawn05:26–06:456.7 decades up in 79 minThe sun climbs the 14.5° from −15.3° to sunrise, and the clear sky’s light rises about 0.47 decades with each degree, lifting the reading off HomeKit’s floor to 535 lux.
Window06:15–13:000.748–1 of the clear skyEach 15-minute step divides Open-Meteo’s forecast sunlight by the clear sky’s, a step with the sun under 5° takes 0.785, the mean of the 4 nearest, and from 13:00, the factor is 1.
Day06:45–18:2172,809 lux at noon, sun at 42.5°By day, the clear sky follows the sun’s height, and the reading follows the clear sky, under it by the forecast’s share until 13:00 and on it from then to sunset.
Dusk18:21–19:406.8 decades down in 79 minThe sun sinks from sunset to −15.5°, and with no stored window over these minutes, the reading is the clear sky alone, falling until it meets HomeKit’s floor at 19:40.

  1. Janiczek and DeYoung. 1987. "Computer Programs for Sun and Moon Illuminance With Contingent Tables and Diagrams." U.S. Naval Observatory, Circular 171. https://archive.org/details/DTIC_ADA182110 ↩︎

  2. Reno, Hansen, and Stein. 2012. "Global Horizontal Irradiance Clear Sky Models: Implementation and Analysis." Sandia National Laboratories, SAND2012-2389. https://doi.org/10.2172/1039404 ↩︎