Clightd icon indicating copy to clipboard operation
Clightd copied to clipboard

[FEATURE REQ] suncalc+geo based illuminance sensor

Open emansom opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently Clight can't be easily used on desktop PCs that lack sufficient hardware sensors (e.g. no webcam, no luminance sensor, no YoctoLight etc.).

I'd still like the brightness of my DDC (utilizing the out-of-tree kernel module) capable monitor to change automatically throughout the day following sunrise and sunset.

Describe the solution you'd like A virtual sensor that estimates outdoor illuminance based on time of day, geolocation and maybe weather data to be implemented. Similar to how it is implemented in ha-illuminance. Geolocation could be retrieved using D-Bus calls to Geoclue and the virtual sensor to be used as fallback automatically if no hardware sensor is found.

emansom avatar Jun 30 '23 11:06 emansom

Hi! This is a neat idea; what i don't like is that i would need to hook on Geoclue to retrieve user position (and possibly much more if you need weather, sunrise and sunset algorithms). This would also require some sort of configuration file for Clightd, something i always tried to avoid because of the added complexity. I would not love a root system daemon to call weather APIs to fetch data too :) At the same time, the idea is pretty interesting; i think it can be done entirely within Clight scope perhaps? I mean:

  • if there are no sensors available
  • instead of "pausing" BACKLIGHT auto calibration, Clight would enter a "geo" mode like you have described.

This is much simpler: Clight already uses Geoclue provided location (for monitor temperature adjustments) and is an user daemon so i would worry less about making http calls to fetch weather data :) Moreover, it already has a config file, so...

What do you think?

FedeDP avatar Nov 04 '23 16:11 FedeDP

Also, sorry for the very late response, i am a bit busy IRL lately :D

FedeDP avatar Nov 04 '23 16:11 FedeDP