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 Humidity and Temperature Module

    Scheduled Pinned Locked Moved Utilities
    47 Posts 14 Posters 43.8k Views 14 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.
    • BangeeB Offline
      Bangee Module Developer
      last edited by

      What’s the result when you try this command directli in your terminal:

      go to cd MagicMirror/modules/MMM-DHT22/

      sudo ./dht_var 2
      

      Replace 2 with your sensor Pin

      I’ve tested this on two different Pi’s

      1 Reply Last reply Reply Quote 0
      • T Offline
        trividar
        last edited by

        @Bangee ok, now I’m confused ;o)
        Bild Text

        The first 5 lines I tried during my MM was working but nothing happend, i had to wait 2 minutes and it shows just a new comment line. After i stopped my MM it was working like a charm (last two lines). What I’m doing wrong?..

        1 Reply Last reply Reply Quote 0
        • BangeeB Offline
          Bangee Module Developer
          last edited by

          I don’t now atm :-)

          it looks like something is blocking the dht_var script when your MM is running

          Do you have error in your MM logs?

          1 Reply Last reply Reply Quote 0
          • T Offline
            trividar
            last edited by

            I just checkt it and I don’t have any errors …;o(

            1 Reply Last reply Reply Quote 0
            • BangeeB Offline
              Bangee Module Developer
              last edited by

              I’ve tried this on an other pi and it works …

              can you uncomment line 33 in node_helper.js to check if he tries to write something in to the logs?

              	console.log("Log: " + temp + " - " + hum);
              
              1 Reply Last reply Reply Quote 0
              • T Offline
                trividar
                last edited by

                THX @Bangee for your help. Now i got this error:

                Error

                1 Reply Last reply Reply Quote 0
                • yawnsY Offline
                  yawns Moderator
                  last edited by

                  Right. Please replace the word temp with arr[1] and hum with arr[0] in line 33 in node_helper.js

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    trividar
                    last edited by trividar

                    Now my logs looks like this after I changed line 33:

                    Bild Text

                    1 Reply Last reply Reply Quote 0
                    • yawnsY Offline
                      yawns Moderator
                      last edited by

                      Okay, so it definitely fails retrieving data from the sensor, but the error handling does not catch this failure.

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        trividar
                        last edited by

                        I have test it with two dht22. One was mine and one I received from @Bangee who was so kind to test it before sending it and it was working at his home, but when I tried it at my home it wasn’t working. So I have no Idea what can be the failure.

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