• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-AmbientBrightnessDetection

Scheduled Pinned Locked Moved Utilities
7 Posts 2 Posters 1.0k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    Eric_H
    last edited by Eric_H Jul 25, 2020, 7:09 AM Jul 25, 2020, 7:07 AM

    Brightness Detection and Auto-Brightness

    Please see a module that samples images from a webcam to calculate the ambient brightness of the light in the room, sends a matching notification with the light level in percentage, while also (optionally) sends a notification to the MMM-RemoteControl to adjust the brightness of the screen accordingly (using that module’s brightness range of 10-200).

    The module samples one image every predefined interval (defaults to 1 minute), and currently supports (and tested over) USB Webcams, while I plan to add support for the PI camera module, which I do not currently have handy, but soon.

    Hope you’d like it. It was born because the mirror was too bright for me at night, or too dim in the daylight, and I wanted to create auto-brightness.

    I’d appreciate your tests and comments!

    https://github.com/eric-h-st/MMM-AmbientBrightnessDetection

    Thank you!

    S E 3 Replies Last reply Jul 25, 2020, 1:45 PM Reply Quote 1
    • S Away
      sdetweil @Eric_H
      last edited by sdetweil Jul 25, 2020, 1:46 PM Jul 25, 2020, 1:45 PM

      @Eric_H cool. some questions

      how do u control the brightness? do all monitors/TV’s respond the same way?

      I have some software already connected to my webcam, are u just taking screen shots? how many images do u need at one time?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • E Offline
        Eric_H
        last edited by Jul 25, 2020, 1:52 PM

        Thank you @sdetweil .

        • I control the brightness by sending a notification to the MMM-RemoteControl module (code already written and working, no reason to re-invent), found here.
        • Since the brightness is set programmatic ally via css in that module, I’m not sure how various monitors would react, but I tested on three here, including the one behind the mirror, and they seem to work quite the same.
        • I’m taking a single shot once every configurable interval, with a default of 60 seconds.

        Hope I answered all of your questions.

        Eric

        1 Reply Last reply Reply Quote 0
        • E Offline
          Eric_H @Eric_H
          last edited by Eric_H Jul 25, 2020, 1:57 PM Jul 25, 2020, 1:56 PM

          Next to be added:

          • Configurable factor to be added to the brightness level sent to MMM-RemoteControl, to make the brightness range more visible in extreme light/dark cases.

          • CEC support to change the actual brightness of the monitor, if supported.

          • PI camera module support

          E 1 Reply Last reply Jul 25, 2020, 3:01 PM Reply Quote 0
          • E Offline
            Eric_H @Eric_H
            last edited by Jul 25, 2020, 3:01 PM

            @Eric_H said in MMM-AmbientBrightnessDetection:

            Next to be added:

            • Configurable factor to be added to the brightness level sent to MMM-RemoteControl, to make the brightness range more visible in extreme light/dark cases.

            • CEC support to change the actual brightness of the monitor, if supported.

            • PI camera module support

            ** Now also supported: **

            • Configurable factor to be added to the brightness level sent to MMM-RemoteControl, to make the brightness range more visible in extreme light/dark cases.
            1 Reply Last reply Reply Quote 0
            • E Offline
              Eric_H @Eric_H
              last edited by Jul 27, 2020, 3:45 PM

              UPDATE:
              Now supporting displaying and animating brightness changes at the top of the screen.
              screenshot.png

              1 Reply Last reply Reply Quote 0
              • E Offline
                Eric_H
                last edited by Jul 31, 2020, 5:56 AM

                UPDATE: Now supporting the PI camera, as well as configuring which camera to use, if not the default

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  1/7
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy