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. My Project
  3. Door, Motion and Temperature Sensor

Door, Motion and Temperature Sensor

Scheduled Pinned Locked Moved My Project
63 Posts 11 Posters 42.4k Views 4 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.
  • CaptainZapC CaptainZap

    @m26872 No idea how do to that, could you please help me ? :)

    M Offline
    M Offline
    mvdarend
    wrote on last edited by
    #7

    @CaptainZap said:

    @m26872 No idea how do to that, could you please help me ? :)

    Here is an excellent article; How and why to avoid Delay()

    1 Reply Last reply
    0
    • m26872M Offline
      m26872M Offline
      m26872
      Hardware Contributor
      wrote on last edited by m26872
      #8

      Regarding the Vera parental node issue. I see it often but don't know what's causing this. A lot of struggle usually help. I'd try things like:

      1. put a "delay(500);" before gw.begin and before gw.sendsketchinfo to make sure radio is fully powered and ready when initializing. Then redo the Vera inclusion. Try a few times.
      2. If still no success. Load and run the ClearEepromConfig sketch. Reload your sketch again and continue trying inclusion in vera.

      Perhaps you'll get a lot of ghost child nodes to delete. I use static node Ids so inclusion with cleared eeprom doesn't make the controller give me new node ids every time.

      1 Reply Last reply
      0
      • CaptainZapC Offline
        CaptainZapC Offline
        CaptainZap
        wrote on last edited by
        #9

        @mvdarend @m26872 Thanks so much for your feedback, I did apply the hints and I'll test the sketch later on today. I do have a question... does anyone know how do I upgrade my library to version 1.4.1 ? I've copied the one available from the main page, but it's version 1.4.

        Thanks.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          robosensor
          wrote on last edited by
          #10

          DallasSensors.requestTemperatures(); delays code execution up to 750ms. MySensors DS18B20 library is bit outdated, you should update library (https://github.com/milesburton/Arduino-Temperature-Control-Library) and use following code:

          In setup:

          	DallasSensors.begin();
          	DallasSensors.setWaitForConversion(false);
          

          In loop:

          		DallasSensors.requestTemperatures(); // no delay here
          		gw.wait(750); // insert another value for non-12-bit resolution
          		float tempC = DallasSensors.getTempCByIndex(1);
          
          1 Reply Last reply
          0
          • CaptainZapC Offline
            CaptainZapC Offline
            CaptainZap
            wrote on last edited by CaptainZap
            #11

            @robosensor Thank you very much for your insight... do I just download the new library and overwrite the one in the Arduino IDE install folder ?

            I've also used your code and I'm getting errors compiling it, any hints ? I guess it could be because of the library ?

            Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Mini, ATmega328"

            Door_Motion_Temp_rev2.ino: In function 'void getTemps()':
            Door_Motion_Temp_rev2:115: error: 'class MySensor' has no member named 'wait'
            Multiple libraries were found for "DallasTemperature.h"

            Used: C:\Users***\Documents\Arduino\libraries\DallasTemperature << this is where I've copied the downloaded library

            Not used: C:\Users***\Documents\Arduino\libraries\Arduino-Temperature-Control-Library-master

            'class MySensor' has no member named 'wait'

            This report would have more information with
            "Show verbose output during compilation"
            enabled in File > Preferences.

            'class MySensor' has no member named 'wait'

            R 1 Reply Last reply
            0
            • CaptainZapC CaptainZap

              @robosensor Thank you very much for your insight... do I just download the new library and overwrite the one in the Arduino IDE install folder ?

              I've also used your code and I'm getting errors compiling it, any hints ? I guess it could be because of the library ?

              Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Mini, ATmega328"

              Door_Motion_Temp_rev2.ino: In function 'void getTemps()':
              Door_Motion_Temp_rev2:115: error: 'class MySensor' has no member named 'wait'
              Multiple libraries were found for "DallasTemperature.h"

              Used: C:\Users***\Documents\Arduino\libraries\DallasTemperature << this is where I've copied the downloaded library

              Not used: C:\Users***\Documents\Arduino\libraries\Arduino-Temperature-Control-Library-master

              'class MySensor' has no member named 'wait'

              This report would have more information with
              "Show verbose output during compilation"
              enabled in File > Preferences.

              'class MySensor' has no member named 'wait'

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

              @CaptainZap yes, but update two libraries (OneWire and Dallas).

              gw.wait() function was added 1 feb 2015: https://github.com/mysensors/Arduino/commit/d45a48d8b786656968fb4b45b049e16700dd3fd0 so you should use latest stable 1.4.* code.

              CaptainZapC 1 Reply Last reply
              0
              • R robosensor

                @CaptainZap yes, but update two libraries (OneWire and Dallas).

                gw.wait() function was added 1 feb 2015: https://github.com/mysensors/Arduino/commit/d45a48d8b786656968fb4b45b049e16700dd3fd0 so you should use latest stable 1.4.* code.

                CaptainZapC Offline
                CaptainZapC Offline
                CaptainZap
                wrote on last edited by
                #13

                @robosensor I don't know where to find the complete library for version 1.4.x

                R 1 Reply Last reply
                0
                • CaptainZapC CaptainZap

                  @robosensor I don't know where to find the complete library for version 1.4.x

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

                  @CaptainZap

                  http://www.mysensors.org/download/ click on Download button under "1.4 - Latest Release" section, download zip archive, extract archive and check Arduino-master\libraries\MySensors\Version.h file.

                  CaptainZapC 1 Reply Last reply
                  0
                  • R robosensor

                    @CaptainZap

                    http://www.mysensors.org/download/ click on Download button under "1.4 - Latest Release" section, download zip archive, extract archive and check Arduino-master\libraries\MySensors\Version.h file.

                    CaptainZapC Offline
                    CaptainZapC Offline
                    CaptainZap
                    wrote on last edited by CaptainZap
                    #15

                    @robosensor Thanks, I installed that but it's version 1.5 b1 and after using it it's giving me lots of errors :| I think there have been changes in how the code is used...

                    LE: I finally found the 1.4.1 branch and downloaded it however it's still giving me the same error about wait:

                    Door_Motion_Temp_rev2.ino: In function 'void getTemps()':
                    Door_Motion_Temp_rev2:115: error: 'class MySensor' has no member named 'wait'
                    'class MySensor' has no member named 'wait'

                    LLE: Just checked the cpp and there is no wait, this is the library I used :
                    https://github.com/mysensors/Arduino/tree/1.4.1

                    Can you tell me if there will be any issue if I comment that part ?

                    R 1 Reply Last reply
                    0
                    • CaptainZapC CaptainZap

                      @robosensor Thanks, I installed that but it's version 1.5 b1 and after using it it's giving me lots of errors :| I think there have been changes in how the code is used...

                      LE: I finally found the 1.4.1 branch and downloaded it however it's still giving me the same error about wait:

                      Door_Motion_Temp_rev2.ino: In function 'void getTemps()':
                      Door_Motion_Temp_rev2:115: error: 'class MySensor' has no member named 'wait'
                      'class MySensor' has no member named 'wait'

                      LLE: Just checked the cpp and there is no wait, this is the library I used :
                      https://github.com/mysensors/Arduino/tree/1.4.1

                      Can you tell me if there will be any issue if I comment that part ?

                      R Offline
                      R Offline
                      robosensor
                      wrote on last edited by
                      #16

                      @CaptainZap https://github.com/mysensors/Arduino/archive/master.zip

                      wait.png
                      wait2.png

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

                        @robosensor

                        LOL :)

                        R 1 Reply Last reply
                        0
                        • CaptainZapC Offline
                          CaptainZapC Offline
                          CaptainZap
                          wrote on last edited by CaptainZap
                          #18

                          That was the version I was using when I first encountered the issues... anyways I'll remove arduino IDE with everything and reinstall it. Thanks.

                          @hek I also LOL-ed :D Gotta love the helping spirit in the community you guys built.

                          R 1 Reply Last reply
                          0
                          • CaptainZapC CaptainZap

                            That was the version I was using when I first encountered the issues... anyways I'll remove arduino IDE with everything and reinstall it. Thanks.

                            @hek I also LOL-ed :D Gotta love the helping spirit in the community you guys built.

                            R Offline
                            R Offline
                            robosensor
                            wrote on last edited by
                            #19

                            @CaptainZap also try to backup and clean C:\Users***\Documents\Arduino\ directory :)

                            1 Reply Last reply
                            0
                            • hekH hek

                              @robosensor

                              LOL :)

                              R Offline
                              R Offline
                              robosensor
                              wrote on last edited by
                              #20

                              @hek as I said before, Dallas library is bit outdated. Is it possible to update dallas and onewire libraries? I provided links for newer versions of this libraries in this thread. I can do PR in github myself, but I don't know how to do it :) I need to read github manuals first :)

                              requestTemperatures() is can be non-blocking in newer version of dallas library, so code can deep sleep (better for batteries) or process messages (better for repeaters and msg-receiving nodes) about 750 ms.

                              hekH 1 Reply Last reply
                              0
                              • R robosensor

                                @hek as I said before, Dallas library is bit outdated. Is it possible to update dallas and onewire libraries? I provided links for newer versions of this libraries in this thread. I can do PR in github myself, but I don't know how to do it :) I need to read github manuals first :)

                                requestTemperatures() is can be non-blocking in newer version of dallas library, so code can deep sleep (better for batteries) or process messages (better for repeaters and msg-receiving nodes) about 750 ms.

                                hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by
                                #21

                                @robosensor

                                Using github is quite easy (when you get a hang of it). We can use this as a "training session" if you want?

                                I did a quick getting-started guide here:
                                http://forum.mysensors.org/topic/330/how-to-contribute-code-to-the-mysensors-project

                                Basically you need to

                                • Fork the mysensors project on github
                                • Clone your fork from your computer.
                                • Replace the libraries that is outdated.
                                • Commit as push the changes back to your fork of github.
                                • Create a pull-request (see above instructions) which I'll review and merge.

                                Easy peasy.. :)

                                R 1 Reply Last reply
                                0
                                • hekH hek

                                  @robosensor

                                  Using github is quite easy (when you get a hang of it). We can use this as a "training session" if you want?

                                  I did a quick getting-started guide here:
                                  http://forum.mysensors.org/topic/330/how-to-contribute-code-to-the-mysensors-project

                                  Basically you need to

                                  • Fork the mysensors project on github
                                  • Clone your fork from your computer.
                                  • Replace the libraries that is outdated.
                                  • Commit as push the changes back to your fork of github.
                                  • Create a pull-request (see above instructions) which I'll review and merge.

                                  Easy peasy.. :)

                                  R Offline
                                  R Offline
                                  robosensor
                                  wrote on last edited by
                                  #22

                                  @hek thank you, I'll read and try on dallas&onewire :)

                                  hekH 1 Reply Last reply
                                  0
                                  • R robosensor

                                    @hek thank you, I'll read and try on dallas&onewire :)

                                    hekH Offline
                                    hekH Offline
                                    hek
                                    Admin
                                    wrote on last edited by
                                    #23

                                    @robosensor

                                    Great, just ask (or open a chat) if you run into trouble.

                                    R 1 Reply Last reply
                                    0
                                    • hekH hek

                                      @robosensor

                                      Great, just ask (or open a chat) if you run into trouble.

                                      R Offline
                                      R Offline
                                      robosensor
                                      wrote on last edited by
                                      #24

                                      @hek I have forked MySensors project, added 3 commits into master branch with updated libraries and updated dallas sensors example (lower power usage).

                                      I'm using similar code in my own version of MySensors 1.5-dev in my home, but I havn't tested this committed 1.4.1 github code on real hardware, so I will make PR after test on real hardware.

                                      https://github.com/mysensors/Arduino/compare/master...roboprint:master?diff=split&name=master

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

                                        Sounds good!

                                        R 1 Reply Last reply
                                        0
                                        • hekH hek

                                          Sounds good!

                                          R Offline
                                          R Offline
                                          robosensor
                                          wrote on last edited by robosensor
                                          #26

                                          @hek It seems that I did it. If this push request is correct, what I should patch? Development branch, master branch or both?

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


                                          21

                                          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