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. Hardware
  3. DHT sketch version 2.0.0 error [solved]

DHT sketch version 2.0.0 error [solved]

Scheduled Pinned Locked Moved Hardware
16 Posts 5 Posters 9.8k Views 3 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.
  • bisschopsrB Offline
    bisschopsrB Offline
    bisschopsr
    wrote on last edited by bisschopsr
    #1

    @hek: I started with using the new DHT sketch (v1.1) from git. When opening the sketch in Visual Studio, it reports an error on: dht.readSensor(true); apperently this is not an allow function from the DHT library. The error message is:
    0_1472478369956_upload-1cbe1423-c289-4903-83ea-5bcb64391554

    I used the DHT library form mysensors Git.

    Do you have any suggestions on this?

    Thx

    Ralph

    Domoticz, P1 meter interface, MySensors and more to come!

    mfalkviddM 1 Reply Last reply
    0
    • bisschopsrB bisschopsr

      @hek: I started with using the new DHT sketch (v1.1) from git. When opening the sketch in Visual Studio, it reports an error on: dht.readSensor(true); apperently this is not an allow function from the DHT library. The error message is:
      0_1472478369956_upload-1cbe1423-c289-4903-83ea-5bcb64391554

      I used the DHT library form mysensors Git.

      Do you have any suggestions on this?

      Thx

      Ralph

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

      @bisschopsr the readSensor function is available in the DHT library in MySensors git:
      https://github.com/mysensors/MySensorsArduinoExamples/blob/e97ae9e2df18e29cb9dc3c4f5945795b7baca6a9/libraries/DHT/DHT.h#L62

      The error message says that the function is declared on line 83, which is different from line 62.

      Maybe you have more than one version of the DHT library installed?

      bisschopsrB 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @bisschopsr the readSensor function is available in the DHT library in MySensors git:
        https://github.com/mysensors/MySensorsArduinoExamples/blob/e97ae9e2df18e29cb9dc3c4f5945795b7baca6a9/libraries/DHT/DHT.h#L62

        The error message says that the function is declared on line 83, which is different from line 62.

        Maybe you have more than one version of the DHT library installed?

        bisschopsrB Offline
        bisschopsrB Offline
        bisschopsr
        wrote on last edited by
        #3

        @mfalkvidd: No, I only have one, I double checked. But you are write about the DHT lib, that is where it is going wrong. I see that you are looking in the branch itself, The version I used is from the ZIP (at the bottom of the read-me) That version differs a lot:

        82  protected:
        83  void readSensor();
        84
        85  float temperature;
        86 float humidity;
        

        That is where the error is, different version in the referenced ZIP. Confusing and put me on the wrong track :-(.

        Thx
        Ralph

        Domoticz, P1 meter interface, MySensors and more to come!

        mfalkviddM 1 Reply Last reply
        0
        • bisschopsrB bisschopsr

          @mfalkvidd: No, I only have one, I double checked. But you are write about the DHT lib, that is where it is going wrong. I see that you are looking in the branch itself, The version I used is from the ZIP (at the bottom of the read-me) That version differs a lot:

          82  protected:
          83  void readSensor();
          84
          85  float temperature;
          86 float humidity;
          

          That is where the error is, different version in the referenced ZIP. Confusing and put me on the wrong track :-(.

          Thx
          Ralph

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

          @bisschopsr good observation. We should probably fix the readme so we avoid confusing more people. Which readme are you referring to? I'm unable to fina a zip reference in https://github.com/mysensors/MySensorsArduinoExamples and https://github.com/mysensors/MySensors

          bisschopsrB 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @bisschopsr good observation. We should probably fix the readme so we avoid confusing more people. Which readme are you referring to? I'm unable to fina a zip reference in https://github.com/mysensors/MySensorsArduinoExamples and https://github.com/mysensors/MySensors

            bisschopsrB Offline
            bisschopsrB Offline
            bisschopsr
            wrote on last edited by
            #5

            @mfalkvidd This one: https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT at the bottom is installation with a link to a ZIP file called DHT, this downloads the libray files.

            Thx for the help by the way. Much appreciated!

            Regards,
            Ralph

            Domoticz, P1 meter interface, MySensors and more to come!

            mfalkviddM 1 Reply Last reply
            0
            • bisschopsrB bisschopsr

              @mfalkvidd This one: https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT at the bottom is installation with a link to a ZIP file called DHT, this downloads the libray files.

              Thx for the help by the way. Much appreciated!

              Regards,
              Ralph

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

              @bisschopsr ah, that one. That's a bit hard to fix, unfortunately.

              I don't think the MySensors project should modify it, since it belongs to the DHT library. The DHT library readme suggests that you use the latest version of the library, available from their github repository. That is expected.

              But the latest version of the DHT library has some changes. It is for example missing the public function the MySensors example is using, as you noticed, which breaks the example. That's why MySensorsArduinoExamples includes the required libraries, which "correct" versions.

              The right way to use MySensorsArduinoExamples is to download the MySensorsArduinoExamples zip file from https://github.com/mysensors/MySensorsArduinoExamples. That zip file includes all libraries, so there is no need to fetch them from somewhere else.

              Dependency management is messy, unfortunately.

              bisschopsrB 1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                @bisschopsr ah, that one. That's a bit hard to fix, unfortunately.

                I don't think the MySensors project should modify it, since it belongs to the DHT library. The DHT library readme suggests that you use the latest version of the library, available from their github repository. That is expected.

                But the latest version of the DHT library has some changes. It is for example missing the public function the MySensors example is using, as you noticed, which breaks the example. That's why MySensorsArduinoExamples includes the required libraries, which "correct" versions.

                The right way to use MySensorsArduinoExamples is to download the MySensorsArduinoExamples zip file from https://github.com/mysensors/MySensorsArduinoExamples. That zip file includes all libraries, so there is no need to fetch them from somewhere else.

                Dependency management is messy, unfortunately.

                bisschopsrB Offline
                bisschopsrB Offline
                bisschopsr
                wrote on last edited by
                #7

                @mfalkvidd I agree, it's always difficult if your solution depends on external libraries. However if we use a modified version of DHT in our MySensors, we should not call it DTH, but something like MyDHT. That makes it specific for MySensors. Currently the risk is that a DHT library is in the library directory that is not standard, other sketches (non MySensors) might break on it.

                I did download the full set you suggested already and applied it. The error is now gone. Now for me to sort out why radio's are not communicating, but that is off topic...

                Ralph

                Domoticz, P1 meter interface, MySensors and more to come!

                mfalkviddM 1 Reply Last reply
                0
                • bisschopsrB bisschopsr

                  @mfalkvidd I agree, it's always difficult if your solution depends on external libraries. However if we use a modified version of DHT in our MySensors, we should not call it DTH, but something like MyDHT. That makes it specific for MySensors. Currently the risk is that a DHT library is in the library directory that is not standard, other sketches (non MySensors) might break on it.

                  I did download the full set you suggested already and applied it. The error is now gone. Now for me to sort out why radio's are not communicating, but that is off topic...

                  Ralph

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

                  @bisschopsr MySensors does not use a modified version of DHT. MySensors is using an old version, since the new version isn't compatible (they have removed at least one public function).

                  Edit: I was wrong. MySensors have made a private function public, without upstreaming the change.

                  bisschopsrB 1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @bisschopsr MySensors does not use a modified version of DHT. MySensors is using an old version, since the new version isn't compatible (they have removed at least one public function).

                    Edit: I was wrong. MySensors have made a private function public, without upstreaming the change.

                    bisschopsrB Offline
                    bisschopsrB Offline
                    bisschopsr
                    wrote on last edited by bisschopsr
                    #9

                    @mfalkvidd Aha clear, but the mismatch stays the same, isn't it? Anyway lets close this thread, DHT is running now, so I'm happy :-).

                    Domoticz, P1 meter interface, MySensors and more to come!

                    R 1 Reply Last reply
                    1
                    • bisschopsrB bisschopsr

                      @mfalkvidd Aha clear, but the mismatch stays the same, isn't it? Anyway lets close this thread, DHT is running now, so I'm happy :-).

                      R Offline
                      R Offline
                      Reza
                      wrote on last edited by
                      #10

                      @bisschopsr
                      hi , i have some problem . i download https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT and install this but there is error in line : dht.readsensor(true);

                      bisschopsrB 1 Reply Last reply
                      0
                      • R Reza

                        @bisschopsr
                        hi , i have some problem . i download https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT and install this but there is error in line : dht.readsensor(true);

                        bisschopsrB Offline
                        bisschopsrB Offline
                        bisschopsr
                        wrote on last edited by
                        #11

                        @Reza Hi Reza, sorry for the little delay in replying. Anyway, read the response of @mfalkvidd 4 steps up. He gives the link for the correct library. If that does not work, there might be another problem with your libraries. Did you check if you really are using the correct one. Sometimes the old one is persistent, so you think you have the correct one, but in practice you don't. Compare the one you have downloaded with the one in your IDE to be sure.

                        Ralph

                        Domoticz, P1 meter interface, MySensors and more to come!

                        R 1 Reply Last reply
                        0
                        • bisschopsrB bisschopsr

                          @Reza Hi Reza, sorry for the little delay in replying. Anyway, read the response of @mfalkvidd 4 steps up. He gives the link for the correct library. If that does not work, there might be another problem with your libraries. Did you check if you really are using the correct one. Sometimes the old one is persistent, so you think you have the correct one, but in practice you don't. Compare the one you have downloaded with the one in your IDE to be sure.

                          Ralph

                          R Offline
                          R Offline
                          Reza
                          wrote on last edited by
                          #12

                          @bisschopsr said:

                          Hi Reza, sorry for the little delay in replying. Anyway, read the response of @mfalkvidd 4 steps up. He gives the link for the correct library. If that does not work, there might be another problem with your libraries. Did you check if you really are using the correct one. Sometimes the old one is persistent, so you think you have the correct one, but in practice you don't. Compare the one you have downloaded with the one in your IDE to be sure.

                          thank you for answer , but this is dont solve for me :(

                          bisschopsrB 1 Reply Last reply
                          0
                          • R Reza

                            @bisschopsr said:

                            Hi Reza, sorry for the little delay in replying. Anyway, read the response of @mfalkvidd 4 steps up. He gives the link for the correct library. If that does not work, there might be another problem with your libraries. Did you check if you really are using the correct one. Sometimes the old one is persistent, so you think you have the correct one, but in practice you don't. Compare the one you have downloaded with the one in your IDE to be sure.

                            thank you for answer , but this is dont solve for me :(

                            bisschopsrB Offline
                            bisschopsrB Offline
                            bisschopsr
                            wrote on last edited by
                            #13

                            @Reza Ok, and you did check the library compiled with your sketch is the correct one? the error is exactly the same as I had, so it really looks like you are using a different library. This is a tricky thing, so please check. What IDE are you using?

                            Domoticz, P1 meter interface, MySensors and more to come!

                            R 1 Reply Last reply
                            0
                            • bisschopsrB bisschopsr

                              @Reza Ok, and you did check the library compiled with your sketch is the correct one? the error is exactly the same as I had, so it really looks like you are using a different library. This is a tricky thing, so please check. What IDE are you using?

                              R Offline
                              R Offline
                              Reza
                              wrote on last edited by
                              #14

                              @bisschopsr
                              arduino 1.6.8

                              1 Reply Last reply
                              0
                              • clio75C Offline
                                clio75C Offline
                                clio75
                                wrote on last edited by
                                #15

                                Hi @bisschopsr
                                I got this error when i'm using this lib
                                0_1476722804472_upload-fff536fa-e6c8-498c-b881-e4a96da10b64

                                Any Idea. I'm using IDE 1.6.12. new install and Installed Mysensor through the Manage library. My sensor is working (updated my gw and other sensors, but can't upgrade my DHT sensors.
                                Thanx for your help

                                1 Reply Last reply
                                0
                                • hekH Offline
                                  hekH Offline
                                  hek
                                  Admin
                                  wrote on last edited by
                                  #16

                                  @clio75
                                  Just a warning. Just ignore it and be happy. ;)

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


                                  14

                                  Online

                                  11.7k

                                  Users

                                  11.2k

                                  Topics

                                  113.0k

                                  Posts


                                  Copyright 2019 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