Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emansom opened this issue Jun 30, 2023 · 2 comments
Open

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

emansom opened this issue Jun 30, 2023 · 2 comments

Comments

@emansom
Copy link

emansom commented Jun 30, 2023

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 emansom changed the title [FEATURE REQ] Weather+geo based illuminance sensor [FEATURE REQ] Suncalc+Geo based illuminance sensor Jun 30, 2023
@emansom emansom changed the title [FEATURE REQ] Suncalc+Geo based illuminance sensor [FEATURE REQ] suncalc+geo based illuminance sensor Jun 30, 2023
@FedeDP
Copy link
Owner

FedeDP commented Nov 4, 2023

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
Copy link
Owner

FedeDP commented Nov 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants