[GH-ISSUE #785] Using the camera or custom ambient light sensor for brightness adjustments? #506

Closed
opened 2026-05-05 06:09:33 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @Erik262 on GitHub (Nov 12, 2021).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/785

Before opening the issue, have you...?

  • Searched for existing issues

Since I'm using a Hackintosh as my own, I'm lacking the feature of automatic brightness adjustments. Therefore, it would be nice to have another option like a camera that could measure the brightness in my room for about every 5/10/15 minutes and automatically adjust the brightness.

Describe the solution you'd like

Using the camera as an option for brightness adjustment.

Describe alternatives you've considered

There is no alternative, besides to buy a Mac :)

Anything else?

No response

Originally created by @Erik262 on GitHub (Nov 12, 2021). Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/785 ### Before opening the issue, have you...? - [X] Searched for existing issues ### Is your feature request related to a problem? Please describe Since I'm using a Hackintosh as my own, I'm lacking the feature of automatic brightness adjustments. Therefore, it would be nice to have another option like a camera that could measure the brightness in my room for about every 5/10/15 minutes and automatically adjust the brightness. ### Describe the solution you'd like Using the camera as an option for brightness adjustment. ### Describe alternatives you've considered There is no alternative, besides to buy a Mac :) ### Anything else? _No response_
Author
Owner

@waydabber commented on GitHub (Nov 12, 2021):

Huhh, the idea is great but probably rather difficult to implement. :)

<!-- gh-comment-id:967285406 --> @waydabber commented on GitHub (Nov 12, 2021): Huhh, the idea is great but probably rather difficult to implement. :)
Author
Owner

@Muirium commented on GitHub (Nov 12, 2021):

This would also be useful for those of us with real Macs, closed in clamshell mode to use a third party display. Well, if we have an external webcam…

Sounds a lot of work though.

<!-- gh-comment-id:967706377 --> @Muirium commented on GitHub (Nov 12, 2021): This would also be useful for those of us with real Macs, closed in clamshell mode to use a third party display. Well, if we have an external webcam… Sounds a lot of work though.
Author
Owner

@Erik262 commented on GitHub (Nov 13, 2021):

Mhm, I thought this is kinda easy. Like taking a snapshot and looking whether it is bright or not and having a threshold "slider" where I can adjust for dark and bright days. Since everybody is unique and sees "light" a bit differently.

<!-- gh-comment-id:967794111 --> @Erik262 commented on GitHub (Nov 13, 2021): Mhm, I thought this is kinda easy. Like taking a snapshot and looking whether it is bright or not and having a threshold "slider" where I can adjust for dark and bright days. Since everybody is unique and sees "light" a bit differently.
Author
Owner

@waydabber commented on GitHub (Nov 13, 2021):

I am not saying that it is impossible, its just problematic in some ways. You need permissions from the OS (privacy issues), the app will have to work with other apps that use the webcam somehow, you need to calibrate the webcam as every webcam is different, you need to analyze the captured frame, etc. I think it would be a lot of work to make it right and it is questionable how many users would actually use it. MC actually does not support the M1 macbook's ambient light sensor as of now even though it is easily accessible - probably supporting that would be a first step.

Btw: did you check out Lunar's sensor mode by @alin23? It has support for a DIY amibent light sensor on Hackintosh which is far superior to the webcam route. Since @alin23 already has this built into his great app, he might be more open to the idea to implementing webcam support (or might have thought about it and has reasons why it is not implemented).

<!-- gh-comment-id:967933538 --> @waydabber commented on GitHub (Nov 13, 2021): I am not saying that it is impossible, its just problematic in some ways. You need permissions from the OS (privacy issues), the app will have to work with other apps that use the webcam somehow, you need to calibrate the webcam as every webcam is different, you need to analyze the captured frame, etc. I think it would be a lot of work to make it right and it is questionable how many users would actually use it. MC actually does not support the M1 macbook's ambient light sensor as of now even though it is easily accessible - probably supporting that would be a first step. Btw: did you check out [Lunar's sensor mode](https://lunar.fyi/#sensor) by @alin23? It has support for a DIY amibent light sensor on Hackintosh which is far superior to the webcam route. Since @alin23 already has this built into his great app, he might be more open to the idea to implementing webcam support (or might have thought about it and has reasons why it is not implemented).
Author
Owner

@alin23 commented on GitHub (Nov 13, 2021):

Hi @Erik262, Lunar developer here.

I've already considered and experimented with the Webcam route but there's no reliable way to get a lux value reading from a webcam.

Almost all webcams also have auto-gain and auto-exposure functions that can't be disabled.
These mostly keep the lightness at the same value, so the approximated lightness value will always be wrong. It would be a nightmare for me to answer to support emails about this kind of webcam problems.

If you check out Lunar's Sensor page, you'll see that the Metro ESP32 light sensor is very easy to set up, no soldering required, no manual firmware flashing or installation of obscure apps and compilers.

Just buy the parts, connect the cable, press some buttons and let Lunar install everything.

You'll get precise lux value readings wirelessly in no time.

If you have any trouble setting it up, I'll be answering questions on the Lunar Discord channel: https://discord.gg/dJPHpWgAhV

<!-- gh-comment-id:967978449 --> @alin23 commented on GitHub (Nov 13, 2021): Hi @Erik262, Lunar developer here. I've already considered and experimented with the Webcam route but there's no reliable way to get a lux value reading from a webcam. Almost all webcams also have auto-gain and auto-exposure functions that can't be disabled. These mostly keep the lightness at the same value, so the approximated lightness value will always be wrong. It would be a nightmare for me to answer to support emails about this kind of webcam problems. If you check out [Lunar's Sensor page](https://lunar.fyi/sensor), you'll see that the Metro ESP32 light sensor is very easy to set up, no soldering required, no manual firmware flashing or installation of obscure apps and compilers. Just buy the parts, connect the cable, press some buttons and let Lunar install everything. You'll get precise lux value readings wirelessly in no time. If you have any trouble setting it up, I'll be answering questions on the Lunar Discord channel: https://discord.gg/dJPHpWgAhV
Author
Owner

@waydabber commented on GitHub (Nov 13, 2021):

Amazing, thanks @alin23 for chiming in and helping with this, what you say makes a lot of sense.

I don't want to simply close this issue due to the relevant idea and the important insights regarding this issue. I'll move it to the Discussion section as a Q&A item so it can be easily referenced.

<!-- gh-comment-id:967989391 --> @waydabber commented on GitHub (Nov 13, 2021): Amazing, thanks @alin23 for chiming in and helping with this, what you say makes a lot of sense. I don't want to simply close this issue due to the relevant idea and the important insights regarding this issue. I'll move it to the Discussion section as a Q&A item so it can be easily referenced.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MonitorControl#506
No description provided.