Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Announcements
  3. 💬 Air Humidity Sensor - DHT

💬 Air Humidity Sensor - DHT

Scheduled Pinned Locked Moved Announcements
149 Posts 48 Posters 47.9k Views 38 Watching
  • 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.
  • EfflonE Offline
    EfflonE Offline
    Efflon
    wrote on last edited by
    #45

    Ok! I just have to verify it on Atmega first. I'll be back..

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MLs
      wrote on last edited by
      #46

      DHT sketch version 2.1.0 no data i IDE seiel

      And if i use DHT example sketch then I get data temp / hum

      Did not have permission to post in the forum

      1 Reply Last reply
      0
      • F Offline
        F Offline
        flopp
        wrote on last edited by flopp
        #47

        @hek @mfalkvidd I read that you discussed about PIN 2 and 3.

        Code say PIN 2, Wiring things up say PIN 2 and picture shows PIN 3.

        It can't use PIN 2 or can it, PIN 2 is used by the radio, or am I to tired :)?

        meanmrgreenM 1 Reply Last reply
        1
        • F flopp

          @hek @mfalkvidd I read that you discussed about PIN 2 and 3.

          Code say PIN 2, Wiring things up say PIN 2 and picture shows PIN 3.

          It can't use PIN 2 or can it, PIN 2 is used by the radio, or am I to tired :)?

          meanmrgreenM Offline
          meanmrgreenM Offline
          meanmrgreen
          wrote on last edited by
          #48

          @flopp

          thats the irq pin in the radio post.
          Not used by the radio

          F 1 Reply Last reply
          0
          • meanmrgreenM meanmrgreen

            @flopp

            thats the irq pin in the radio post.
            Not used by the radio

            F Offline
            F Offline
            flopp
            wrote on last edited by flopp
            #49

            @meanmrgreen said:

            @flopp

            thats the irq pin in the radio post.
            Not used by the radio

            I must have missed something or forgot. Is PIN 2 only used on Gateways?
            Is it different between MyS version 1.x and 2.x?

            1 Reply Last reply
            0
            • hekH Online
              hekH Online
              hek
              Admin
              wrote on last edited by
              #50

              Tried to follow the history on the humidity file back in time on github.
              At some point (2.0 release) the example was switched from HumiditySensor.ino (using pin 3) to DhtTemperatureAndHumiditySensor.ino (pin 2) created by @mozzbozz.

              Not sure why the pin was switched, but you can run without the radio/IRQ-pin connection as long as not activating the MY_RX_MESSAGE_BUFFER_FEATURE.

              F 1 Reply Last reply
              0
              • hekH hek

                Tried to follow the history on the humidity file back in time on github.
                At some point (2.0 release) the example was switched from HumiditySensor.ino (using pin 3) to DhtTemperatureAndHumiditySensor.ino (pin 2) created by @mozzbozz.

                Not sure why the pin was switched, but you can run without the radio/IRQ-pin connection as long as not activating the MY_RX_MESSAGE_BUFFER_FEATURE.

                F Offline
                F Offline
                flopp
                wrote on last edited by
                #51

                @hek
                All other examples are using PIN 3. Wouldn't it be easier to use PIN 3 for all examples? Maybe we shall wait and see if mozzbozz know why he changed to PIN 2.

                1 Reply Last reply
                0
                • hekH Online
                  hekH Online
                  hek
                  Admin
                  wrote on last edited by hek
                  #52

                  Ok, updated the example on github and instructions on the page back to pin 3.

                  1 Reply Last reply
                  3
                  • skywatchS Offline
                    skywatchS Offline
                    skywatch
                    wrote on last edited by
                    #53

                    Hurrah! :)

                    Now I can sleep at night again ;)

                    Good job!

                    F 1 Reply Last reply
                    2
                    • hekH Online
                      hekH Online
                      hek
                      Admin
                      wrote on last edited by
                      #54

                      @skywatch said:

                      Now I can sleep at night again

                      Haha, yeah, good to hear you will get a good nights sleep again.

                      1 Reply Last reply
                      0
                      • skywatchS skywatch

                        Hurrah! :)

                        Now I can sleep at night again ;)

                        Good job!

                        F Offline
                        F Offline
                        flopp
                        wrote on last edited by
                        #55

                        @skywatch said:

                        Hurrah! :)

                        Now I can sleep at night again ;)

                        Good job!

                        haha, me too :)

                        1 Reply Last reply
                        0
                        • Pavel LarkinP Offline
                          Pavel LarkinP Offline
                          Pavel Larkin
                          wrote on last edited by gohan
                          #56

                          Hello. Maybe someone could help :) hopefully..
                          I have arduino1 with 1 DHT22, which is over arduinoGW connected to RSPi with latest domoticz.
                          when i connect stuff up, after some time i see some strange childids, not related to this arduino1 in no way.
                          Lots of unknown!, with V_TEMP values, with V_HUM values, even V_FORECAST, V_PRESSURE and etc. which arduino1 should not send (or no other arduino on my area).

                          Illustration:
                          <img href="http://www.lstudio.lt/wp-content/uploads/dht22problem.png">
                          http://www.lstudio.lt/wp-content/uploads/dht22problem.png

                          my code is quite simple (for ex only temperature is shown)

                          #define CHILD_DESCR "TEMP3"
                          #undef CHILD_ID
                          #define CHILD_ID 31
                          present(CHILD_ID, S_TEMP, CHILD_DESCR);
                          delay(250) ;
                          
                          loop:
                          
                            temp3=dht3.readTemperature();
                          
                          if (temp3 >= 120) {temp3 = lasttemp3;}
                          if (temp3 <= -50) {temp3 = lasttemp3;}
                          MyMessage msg31(CHILD_ID,V_TEMP);
                          send(msg31.set(temp3,1));
                          

                          so.. that is basically all

                          F 1 Reply Last reply
                          0
                          • Pavel LarkinP Pavel Larkin

                            Hello. Maybe someone could help :) hopefully..
                            I have arduino1 with 1 DHT22, which is over arduinoGW connected to RSPi with latest domoticz.
                            when i connect stuff up, after some time i see some strange childids, not related to this arduino1 in no way.
                            Lots of unknown!, with V_TEMP values, with V_HUM values, even V_FORECAST, V_PRESSURE and etc. which arduino1 should not send (or no other arduino on my area).

                            Illustration:
                            <img href="http://www.lstudio.lt/wp-content/uploads/dht22problem.png">
                            http://www.lstudio.lt/wp-content/uploads/dht22problem.png

                            my code is quite simple (for ex only temperature is shown)

                            #define CHILD_DESCR "TEMP3"
                            #undef CHILD_ID
                            #define CHILD_ID 31
                            present(CHILD_ID, S_TEMP, CHILD_DESCR);
                            delay(250) ;
                            
                            loop:
                            
                              temp3=dht3.readTemperature();
                            
                            if (temp3 >= 120) {temp3 = lasttemp3;}
                            if (temp3 <= -50) {temp3 = lasttemp3;}
                            MyMessage msg31(CHILD_ID,V_TEMP);
                            send(msg31.set(temp3,1));
                            

                            so.. that is basically all

                            F Offline
                            F Offline
                            flopp
                            wrote on last edited by flopp
                            #57

                            @Pavel-Larkin

                            I have also seen this, I noticed it last week. Some of my Nodes have those Unknown-child, but it is working correctly anyway.
                            DZ 3.5877, MyS 1.5.1, RPi 2

                            1 Reply Last reply
                            0
                            • GimlurG Offline
                              GimlurG Offline
                              Gimlur
                              wrote on last edited by
                              #58

                              Hello,
                              i have a problem with this sketch.
                              After downloading DTH.h froom Mysensors Examples, i have this error :
                              DhtTemperatureAndHumiditySensor:85: error: 'getConfig' was not declared in this scope

                              metric = getConfig().isMetric;

                              Any Idea of my mistake ?...

                              1 Reply Last reply
                              1
                              • hekH Online
                                hekH Online
                                hek
                                Admin
                                wrote on last edited by
                                #59

                                It isn't your mistake, it's ours. The examples hasn't been updated correctly to reflect the most recent change in the api.

                                It should say getControllerConfig().isMetric

                                1 Reply Last reply
                                2
                                • johnecyJ Offline
                                  johnecyJ Offline
                                  johnecy
                                  wrote on last edited by
                                  #60

                                  I have the dht22 sensor hooked up and working on a pro mini on pin 3 I get a normal temp reading but the humidity always stays at 1.0 does not read.

                                  mfalkviddM 1 Reply Last reply
                                  0
                                  • johnecyJ johnecy

                                    I have the dht22 sensor hooked up and working on a pro mini on pin 3 I get a normal temp reading but the humidity always stays at 1.0 does not read.

                                    mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #61

                                    @johnecy https://forum.mysensors.org/topic/5978/temperature-and-humidity-dht22

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      donhuan78p
                                      wrote on last edited by
                                      #62

                                      Hello everybody,
                                      hope, someone could help a newby :-)
                                      I've installed the MQTT - GW and would use the Air/Humidity - sensor. But it doesn't work properly.
                                      The Connection to the Gateway seems to be okay. But I get no Air/Humidity - Information.
                                      The sensor does not measure anything.
                                      I've tried to change the data - pin, I've tried the DHT11 and DHT22 - sensor. No choice.
                                      I'm getting mad :-)

                                      Thanks a lot.

                                      1 Reply Last reply
                                      0
                                      • gohanG Offline
                                        gohanG Offline
                                        gohan
                                        Mod
                                        wrote on last edited by
                                        #63

                                        Have you tried the basic arduino sketch that prints data to serial port?

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          donhuan78p
                                          wrote on last edited by
                                          #64

                                          Hello,
                                          thanks a lot for your answer.
                                          Yes, I did. It produced the Messages as excepted.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          16

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular