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.

    DHT22 with Debian 12 Bookworm

    Scheduled Pinned Locked Moved Unsolved Requests
    10 Posts 4 Posters 102 Views 4 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.
    • C Offline
      com1cedric
      last edited by

      Hello
      Do anyone of you know a MM module to display the data of a DHT22 AM2302 temperature and humidty sensor on a Raspberry 4 with Debian 12 bookworm?

      It seems that it is not so trivial with this version and I am not sure that the provided DHT22 modules on https://modules.magicmirror.builders/ manage this PI OS version.

      Thanks in advance and greeting !
      Cédric

      wishmaster270W 1 Reply Last reply Reply Quote 0
      • wishmaster270W Offline
        wishmaster270 Module Developer @com1cedric
        last edited by

        @com1cedric

        Hi,

        I do not use a DHT11 at the moment but my MMM-Temperature should still work

        https://github.com/Tom-Hirschberger/MMM-Temperature

        Just checked the install process on a Debian Bookworm and it works fine.

        1 Reply Last reply Reply Quote 0
        • C Offline
          com1cedric
          last edited by

          hello @wishmaster270 , Ok, thanks, I will try!

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            com1cedric @com1cedric
            last edited by com1cedric

            hello @wishmaster270 ,
            I could install and try your module.
            The result is empty :
            Capture d’écran 2025-11-20 à 13.40.32.jpg

            When I test it direct through the terminal as you describe in you module description, “error” is on “true”.
            Capture d’écran 2025-11-20 à 13.41.27.jpg

            But, interesting, it finally works when I try another direct way as described on https://pimylifeup.com/raspberry-pi-humidity-sensor-dht22/, so that it seems, that everything should work.
            Capture d’écran 2025-11-20 à 13.37.59.jpg.

            Now, do you think that there suddenly could be an error in your module ?

            Sorry for disturbing you with this kind of problem, but thank you anyway in advance if you can help me :-)

            wishmaster270W 1 Reply Last reply Reply Quote 0
            • R Offline
              RonR
              last edited by

              There are at least four modules on the list dealing with the DHT-22. J0n4e
              MMM-DHT22, ckoutavas MMM-DHT, cslev MMM-loldht22. Just do a search for dht and they will pop up.

              Good luck

              C 1 Reply Last reply Reply Quote 1
              • C Offline
                com1cedric @RonR
                last edited by

                @RonR thanks!

                1 Reply Last reply Reply Quote 0
                • wishmaster270W Offline
                  wishmaster270 Module Developer @com1cedric
                  last edited by

                  @com1cedric
                  Hi. No problem. If I have time it try to help.

                  It looks like there will installed two additional python libs in the venv in the tutorial you shared.
                  Maybe one of the libs is missing in the virtual environment my script creates.

                  You can add them to the venv with:

                  cd ~/MagicMirror/modules/MMM-Temperature/scripts
                  ./venvWrapper.py --venv-name py-venv --install-libs lgpio RPi.GPIO
                  
                  wishmaster270W 1 Reply Last reply Reply Quote 0
                  • wishmaster270W Offline
                    wishmaster270 Module Developer @wishmaster270
                    last edited by

                    If you change line 25 in my dht11 script from except: to finally: you should see the whole error.

                    But make sure to revert the change after the problem is fixed.

                    C S 2 Replies Last reply Reply Quote 0
                    • C Offline
                      com1cedric @wishmaster270
                      last edited by

                      @wishmaster270 thanks, I will try this week-end and inform you. Could interest the other users.

                      1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @wishmaster270
                        last edited by

                        @wishmaster270 I think the gpio setup changed in bookworm

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • 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