FedeDP / Clightd

A linux bus interface that lets you change screen brightness, compute captured webcam frames brightness and change screen temperature.
GNU General Public License v3.0
83 stars 10 forks source link

[FEATURE REQ] suncalc+geo based illuminance sensor #105

Open emansom opened 1 year ago

emansom commented 1 year ago

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.

FedeDP commented 1 year ago

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:

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 commented 1 year ago

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