• 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-DHT22

Scheduled Pinned Locked Moved Utilities
14 Posts 6 Posters 2.7k Views 6 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.
  • J Offline
    Jonae
    last edited by Aug 27, 2023, 8:29 PM

    DHT22 Sensor MagicMirror Module!

    🌤️ This module utilizes the DHT22 sensor to fetch current temperature and humidity readings from your surroundings. Whether you’re interested in keeping tabs on your living space, monitoring your indoor garden, or simply satisfying your curiosity about the weather, this module has got you covered.

    Key Features:

    Real-time Data: Get instant access to the latest temperature and humidity levels right on your MagicMirror.
    Customizable: Tailor the module’s appearance to suit your mirror’s aesthetics and layout.
    Easy Integration: Our step-by-step setup guide ensures a hassle-free installation process.
    Reliable Performance: We built this module out of the need for a functional and stable solution, so you can count on its consistent performance.

    🛠️ Installation and Usage:
    Installing the DHT22 Sensor MagicMirror Module is a breeze. Simply follow the installation guide provided in the GitHub post to seamlessly integrate the module into your MagicMirror setup. Once configured, you’ll have the temperature and humidity readings beautifully displayed on your mirror.

    Screenshots:

    alt text

    alt text

    alt text

    🔗 GitHub Repository

    Because i didn’t find any working module using DHT22 sensor, i decided to build this one. I hope it helps someone.

    A B 2 Replies Last reply Aug 28, 2023, 7:28 PM Reply Quote 2
    • A Offline
      ankonaskiff17 @Jonae
      last edited by Aug 28, 2023, 7:28 PM

      @Jonae Have you by chance done or looked at any sensors that use I2C?

      J 1 Reply Last reply Aug 29, 2023, 5:52 AM Reply Quote 1
      • B Offline
        BKeyport Module Developer @Jonae
        last edited by Aug 28, 2023, 7:56 PM

        @Jonae Nicely done.

        I’ve used MMM-CommandToNotifcation/MMM-ValuesByNotification for mine, with MMM-Temperature prior to that. Nice to have a specific to device module, though. :)

        The "E" in "Javascript" stands for "Easy"

        J 1 Reply Last reply Aug 29, 2023, 5:54 AM Reply Quote 1
        • J Offline
          Jonae @ankonaskiff17
          last edited by Aug 29, 2023, 5:52 AM

          @ankonaskiff17 said in MMM-DHT22:

          @Jonae Have you by chance done or looked at any sensors that use I2C?

          No

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jonae @BKeyport
            last edited by Aug 29, 2023, 5:54 AM

            @BKeyport said in MMM-DHT22:

            @Jonae Nicely done.

            I’ve used MMM-CommandToNotifcation/MMM-ValuesByNotification for mine, with MMM-Temperature prior to that. Nice to have a specific to device module, though. :)

            Thanks for apreciations.

            J 1 Reply Last reply Sep 4, 2023, 6:14 PM Reply Quote 0
            • J Offline
              Jonae @Jonae
              last edited by Sep 4, 2023, 6:14 PM

              @Jonae

              Version info:

              Version info:

              v1.0.0 - Initial release
              v1.0.1 - Added option to modify the color of the temperature and humidity icons
                            - Added option to modify the header size
              v1.0.2 - Fix the error readings from sensor
                            - Added option to calibrate the sensor readings
                            - Added option to change units: C or F

              GitHub Repository

              J 1 Reply Last reply Sep 10, 2023, 3:01 PM Reply Quote 0
              • J Offline
                Jonae @Jonae
                last edited by Sep 10, 2023, 3:01 PM

                Version info:

                v1.0.3 - added default layout style (‘horizontal’ or ‘vertical’)

                GitHub Repository

                1 Reply Last reply Reply Quote 0
                • J Offline
                  JohnGalt
                  last edited by Jan 2, 2024, 10:29 PM

                  Thanks for your work - it looks good and has the offset feature I need! Like @BKeyport I formerly used MMM-LocalTemperature, but it won’t run on my new MagicMirror build.

                  For context, I currently do have MMM-DHT-Sensor running on this instance. It runs just fine, but I would prefer the look and feel of yours, as well as needing the offset feature. I have also tried changing from GPIO 4 to GPIO 21 - same results [MMM-DHT-Sensor works on either, MMM-DHT22 works on neither].

                  My issue with MMM-DHT22 is understanding whether one can get it to run on a Raspberry Pi 4? I have been unable to do so, and it appears to be issues with the Adafruit_Python_DHT libraries. My research appears to show your module relies on that Adafruit library, and the Adafruit library doesn’t support Raspberry Pi 4.

                  Am I missing something? If so, what? If not, is there a workaround?

                  B 1 Reply Last reply Jan 2, 2024, 10:56 PM Reply Quote 0
                  • B Offline
                    BKeyport Module Developer @JohnGalt
                    last edited by Jan 2, 2024, 10:56 PM

                    @JohnGalt I had no trouble with the Adafruit libraries on Pi4. It should be working just fine - Take a look around https://forums.adafruit.com/ - there might be fixes or something available.

                    The "E" in "Javascript" stands for "Easy"

                    J 1 Reply Last reply Jan 4, 2024, 12:17 AM Reply Quote 0
                    • J Offline
                      JohnGalt @BKeyport
                      last edited by Jan 4, 2024, 12:17 AM

                      @BKeyport thanks for the response. It looks like my issue is actually with the Linux 12 / bookworm version of Raspbian I installed when rebuilding my MagicMirror, as opposed to the R-Pi 4 hardware.

                      In reading the Adafruit forums here: https://forums.adafruit.com/viewtopic.php?p=938344&hilit=Adafruit_Python_DHT#p938344 I find the official Adafruit response to someone with the same issues is that “DHT22 really sucks to use on linux” and … “you will be a lot happier just using the DHT20 and friends”, with a reference to an Adafruit web article at https://learn.adafruit.com/modern-replacements-for-dht11-dht22-sensors/overview.

                      In short, the advice is to just buy all new sensors for your Raspberry Pi installs. The OP pointed out that while he acknowledges the newer sensors may indeed be better, that " I spent a good amount of money buying and building, and for all of that to go away with an update really stinks! :( ".

                      I agree with him since I have probably five (5) DHT 11/22 sensors working on R-Pis, and while it looks like he found a way to upgrade all pip libraries and get it working again, it also appears to only be a matter of time until another update or upgrade of something breaks the system.

                      Again thanks for pointing me in the right direction.

                      B 1 Reply Last reply Jan 4, 2024, 1:29 AM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • First post
                        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