-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow webcam sleep duration to be set in config #91
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! You are totally right that the blinking LED is a concern (and was since the beginning...). There probably is a battery life aspect to it too, in addition to the LED annoyance (because If you don't mind, I'd like to ask you a few questions, simply because I don't know many users of
Many thanks in advance 🙂 |
Sure!
I started with 10000ms but I found the delay to be a bit annoying so I switched to 5000ms. I also tried 3000ms which performed pretty much the same as 2000ms
Since I opened this PR. 😃 I only started using the app full time after I got the changes working.
Sometimes it can be a bit finicky (eg. If I move and the camera points directly at a white wall, it will move from dim to normal) but it seems to be happening less and less so I suspect that more training might help?
I tried I'm kinda getting used to the LED now, so I am going to keep using Regards, |
Thanks for the answers! Please share an update as you keep using The current value of 2s is not any special value produced by some golden rule, it was basically @cyrinux trying out different values and using the app for days and weeks, to see what feels best, in terms of LED annoyance vs reaction on environment change. There's no correct answer, but I'm very curious to collect feedbacks from actual users of |
Wow, great job! This PR will give me the opportunity to completely ditch the bulky @maximbaz you asked for feedback, for the last 2 month I have been using clight with this timeouts (sec):
The first two values are day/night, what the last one is not so important. I think in the case of |
That is a great feedback, many thanks for sharing! Could you elaborate on what makes it useful to have
The one reason why calibrating often could be important: because it can mess up the training data. Here's one example to illustrate: Imagine it is night time, you are sitting in a well-illuminated room, wluma keeps your screen bright, exactly as you like it. It's time to turn off the lights, you are suddenly sitting with your laptop in the darkness. wluma is already trained well, it knows you want a lower brightness, but it will only react once the new "ALS" value shows up. If your timeout is set for a few seconds, it is okay to wait those few seconds for wluma to finally react, you eyes have probably not adapted to darkness yet anyway. Now, if there is 5 minutes to wait, you might desperately want to reduce the brightness by hand. If you just do it (as opposed to e.g. restarting wluma), you will register a new training datapoint: "I want low brightness value during bright surroundings" (because wluma still thinks it's bright around!). From now on, when you are in bright conditions, wluma will incorrectly be dimming your screen. |
Some feedback: I have been using wluma with I basically never change the brightness manually any more and I'm kind of used to the flashing LED now. I'm going to try the Regarding the ability to set different sleep durations for AC and battery, Im going to try find a way to measure the power impact of different sleep durations and if I find any difference I would like to try add this. I do love to optimise 😂 @maximbaz do you think there would be any benefit in combining I use I might be misunderstanding how I am also curious about whether implementing gamma control is an option, it would be nice to just use I really really like this app, I've been looking for something like it for a long time so thank you so much for all your hard work! |
Just out of curiosity, how do you plan on using |
I can't envision fully yet what you have in mind, or we might be understanding To give you an intuition behind It's basically to say "at 12:00 it's usually bright around me, at 17:00 it begins to be dim, and at 21:00 I turn off the lights, and I want wluma to react accordingly", so you configure those thresholds to let wluma think that it's bright between 12-17, dim between 17-21 and dark in the rest of the day.
I always want for people to have a great experience out of the box, so in this particular case, I'm still not 100% decided because:
I've been thinking about it so many times 😅 But every time I abandon the idea, as it's not as intuitive for me yet how that could work, color temperature probably shouldn't change with screen contents, some people like you and me accept a smooth curve based on sunrise/sunset time, @name-snrl probably uses |
I've a smaller timeout during the daytime because light levels change more frequently during the day than at night.
Hm... Yeah, that reasonable. But, I think we could solve this by forcing a light level check immediately after manually changing the brightness, but before |
It's definitely better but not ideal, the training likely should not have been needed in that case (if only wluma knew the real ALS values, it would have predicted the best values anyway), and there is a downside to overfitting the model with a lot of training points around similar values (it becomes very "jumpy" when it has too much data around "similar" environments). The LED is a privacy indicator, and with |
Here are the features I need:
I used to use only |
Yeah, I'm trying to turn wluma into clight. Maybe I should just stay with the combination of |
It's not that I'm against this idea in any way, I'm trying to better understand the pains and motivations behind how people use this. For example, is LED a real deal breaker, or rather an annoyance that you get used to in a weeks time? Is LED perhaps irrelevant at all, but instead it is undesirable that screen brightness changes too frequently, as opposed to only every 5 minutes? Is it that it's just very hard to capture your internal algorithm of how to pick an ideal brightness level, for whatever reasons, and that's why you would rather have "obvious automated corrections" and a control to fine-tune things whenever you like? 🙂 |
we'll find out in a week :D
no, it's not a problem |
Okay I read the code and I realized it does not work how I thought it did 😆 Honestly I agree about this PR being kinda pointless, I think upping the sleep duration to 3-4 seconds might be a good idea, but honestly, there isn't much difference. I found out it is possible to disable the LED on some webcams. I can't remember where I read about it but I used the following to list my webcams controls: v4l2-ctl -d /dev/video0 --all I think it needs to have the I have been trying out |
Ahh I see. Regarding number 3, I am attempting to add this in. @maximbaz I'll open a new issue for this 👍 |
@pyt0xic Did you notice any impact on battery endurance with [als.webcam]? And on what sleep interval? Edit: Personally I don't mind the blinking webcam led. I will be okay with lowering the sleep interval to even a very low value such as 100ms if it doesn't affect battery life. I just want the best experience i.e. whatever makes wluma smarter in choosing the brightness value but I also want to preserve battery life. These 2 things is what I desire. Overall, I vote for this to be configurable i.e. the PR should be merged imo. Because everyone is going to have different preferences regarding led-blinking anyways even if it is the case that battery isn't hit hard even with like 100ms sleep interval. Some people might get used to even really frequent blinks right away (like me) or they might want to trade everything just because they are unable to get used to it even after weeks. Some people might have machines where the led is objectively more annoying e.g. by being very bright or sharp compared to some other machines where the led is almost calming in a way (like mine). The effects of increasing and decreasing this interval, on the battery at least, will need to be investigated and presented in the documentation maybe under a section called "Advanced Config" if it is felt to be too complex so that people don't tamper with it by mistake. I will try to report back on this. tl;dr: Merge the PR and document the effects of changing the interval. Update: Battery seemed to take a hit, not sure though. I was running the main branch with its default 2000ms interval. |
The biggest argument against this was in fact not the battery life, but that by using a too-large value you will (a) make wluma not reactive and (b) inadvertently and very quickly mess up training data, where a new data point was meant for a new ambient light value, whereas wluma still has the old value that it will associate with your training data. Example: you are in a dark room, someone turns on the lights, wluma doesn't react. (a) chances are you will not wait more than a few seconds, before being annoyed and manually increasing the brightness; (b) you increase the brightness but since wluma doesn't know it's bright, it will remember that you want this high brightness in such a dark room (as it remembers it), thus totally invalidating your training data. I think I'll be okay to merge it if we can find a solution to prevent incorrect training points - one way could be that we always read webcam right before saving the new training point, and thereby ensuring that the new training item is being saved with the latest ALS value. All the other things (battery impact vs wluma being not reactive) I'm okay to just document and let people configure, it's just impossible to document how to not mess up the training data. |
A simple note saying that high values will mess up training data and here is how you can reset training data in case you mess it up won't be enough? I am still interested in knowing how much battery life is affected by [als.webcam] in relation to different sleep intervals. |
No, in my eyes that's like shipping a feature called "foot-shooter" with a note "shooting yourself in the foot can mess up your foot, anyways here's how to do it" 😅 The whole premise is that wluma gets better with time, you tend to value well-trained dataset (on my laptop I haven't touched brightness buttons for months!), I really don't like opening a way for throwing all that away at unpredictable times. |
What if we write a big DANGER! in bright red color wherever this thing is mentioned? I mean all the power to the user, that is what linux is, and who a large user-base of wluma probably is? We are also telling the user here is how you can get a new foot 😆, or the old one by telling them here is how you can backup your learning data before playing with this setting. Maybe have a hard-coded upper-bound for this as going too high seems to be the only problem? 🙂 |
I think if we have the opportunity to do the right thing (in this case protect people from losing training data at unpredictable times by e.g. taking an extra webcam shot when new training data is being introduced), we should do the right thing. You are probably also the only person who wants to increase the frequency, everyone else seems to want to reduce it, so if we ship this, we have to make it useful for the majority 🙂 Also all users are luckily have the power to do whatever they want thanks to this tool being open-source with a very permissive license, it's just one |
Touché. |
My laptop has a webcam activity LED and I got annoyed with it flashing every 2 seconds.
This allows setting the delay between steps instead of using the
WAITING_SLEEP_MS
constant. If it is not set or a value <MIN_WAITING_SLEEP_MS
is passed,WAITING_SLEEP_MS
is used as a default.I used 1000ms for
MIN_WAITING_SLEEP_MS
, not sure if its even needed but I assume no one wants to use less than that...An example:
I added tests for no custom value, an invalid custom value and a valid custom value in which I am passing
0
as thevideo
parameter in theWebcam
constructor, let me know if this needs to change.This is my first time working with Rust, so any feedback/improvements would be appreciated 😄