Skip to content
  • 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. OpenHardware.io
  3. 💬 NodeManager
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 NodeManager

Scheduled Pinned Locked Moved OpenHardware.io
contest2017arduinonewbiemysensorsbattery sensor
196 Posts 42 Posters 67.3k Views 41 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.
  • Felix HaverkampF Offline
    Felix HaverkampF Offline
    Felix Haverkamp
    wrote on last edited by Felix Haverkamp
    #161

    can anyone explain me the signal node? i get this values with setReportIntervalSeconds(1);

    271860 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    272947 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    274033 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    275120 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    276206 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    277293 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    278378 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    279468 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    280554 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
    281641 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
    282728 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
    283812 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
    284898 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
    
    U 1 Reply Last reply
    0
    • Felix HaverkampF Offline
      Felix HaverkampF Offline
      Felix Haverkamp
      wrote on last edited by
      #162

      is there a possibilty to only send values if the value has changed?

      1 Reply Last reply
      0
      • Felix HaverkampF Felix Haverkamp

        can anyone explain me the signal node? i get this values with setReportIntervalSeconds(1);

        271860 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        272947 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        274033 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        275120 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        276206 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        277293 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        278378 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        279468 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        280554 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
        281641 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
        282728 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
        283812 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967259
        284898 TSF:MSG:SEND,1-1-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967260
        
        U Offline
        U Offline
        user2684
        Contest Winner
        wrote on last edited by
        #163

        @felix-haverkamp the signal node is supposed to send the RSSI when the radio supports it. What you are looking at is a v1.7 bug, fixed in the dev branch of v1.8. If you want an easy fix without the need to upgrade, just remove the uint32_t cast at line 5017 of NodeManagerLibrary.ino (https://github.com/mysensors/NodeManager/blob/master/NodeManagerLibrary.ino#L5017).
        To send the values only if the value has changed, you need first of all to turn FEATURE_CONDITIONAL_REPORT on, then you can use setValueDelta() and setForceUpdateMinutes() of the Child class to achieve what you are looking for

        Felix HaverkampF 1 Reply Last reply
        0
        • U user2684

          @felix-haverkamp the signal node is supposed to send the RSSI when the radio supports it. What you are looking at is a v1.7 bug, fixed in the dev branch of v1.8. If you want an easy fix without the need to upgrade, just remove the uint32_t cast at line 5017 of NodeManagerLibrary.ino (https://github.com/mysensors/NodeManager/blob/master/NodeManagerLibrary.ino#L5017).
          To send the values only if the value has changed, you need first of all to turn FEATURE_CONDITIONAL_REPORT on, then you can use setValueDelta() and setForceUpdateMinutes() of the Child class to achieve what you are looking for

          Felix HaverkampF Offline
          Felix HaverkampF Offline
          Felix Haverkamp
          wrote on last edited by Felix Haverkamp
          #164

          @user2684
          thx, that is what was what i am looking for.

          1 Reply Last reply
          0
          • Felix HaverkampF Offline
            Felix HaverkampF Offline
            Felix Haverkamp
            wrote on last edited by
            #165

            @user2684
            FEATURE_CONDITIONAL_REPORT & setValueDelta()

            would be nice for other users to document this function. With this i am able to only send values to the gateway when its changed. Using it for a Light Sensor and dont need the value every 10 seconds and not every 10 Minutes....
            Just when it changes (1 second) and only when it changes.

            U 1 Reply Last reply
            0
            • Felix HaverkampF Felix Haverkamp

              @user2684
              FEATURE_CONDITIONAL_REPORT & setValueDelta()

              would be nice for other users to document this function. With this i am able to only send values to the gateway when its changed. Using it for a Light Sensor and dont need the value every 10 seconds and not every 10 Minutes....
              Just when it changes (1 second) and only when it changes.

              U Offline
              U Offline
              user2684
              Contest Winner
              wrote on last edited by
              #166

              @felix-haverkamp if you set setValueDelta() to e.g. 0.1 or 0.01, then the sensor will not report if the value has not changed, if I have understood correctly your point. setValueDelta() will set the minimum difference (+ or -) that the new value should have in order to be reported. Let me know I've misunderstood something. Thanks

              1 Reply Last reply
              0
              • Felix HaverkampF Offline
                Felix HaverkampF Offline
                Felix Haverkamp
                wrote on last edited by
                #167

                @user2684 i just mean, we have to put this is the documentation.

                currently i have a strange problem:

                the Motion Sensors doesnt reset. I checked with my old Motion sketch and everything is fine.
                Only sends the Value "1".

                11132 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:1
                16513 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:1
                26243 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:1

                U 1 Reply Last reply
                0
                • Felix HaverkampF Felix Haverkamp

                  @user2684 i just mean, we have to put this is the documentation.

                  currently i have a strange problem:

                  the Motion Sensors doesnt reset. I checked with my old Motion sketch and everything is fine.
                  Only sends the Value "1".

                  11132 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:1
                  16513 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:1
                  26243 TSF:MSG:SEND,1-1-0-0,s=2,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:1

                  U Offline
                  U Offline
                  user2684
                  Contest Winner
                  wrote on last edited by
                  #168

                  @felix-haverkamp got it, thanks, I've opened this issue https://github.com/mysensors/NodeManager/issues/366.

                  Regarding the sensor motion, weird, by default should attach to CHANGE interrupt so to intercept both. Any chance to share NodeManager's debug log as well? Thanks

                  Felix HaverkampF 1 Reply Last reply
                  0
                  • U user2684

                    @felix-haverkamp got it, thanks, I've opened this issue https://github.com/mysensors/NodeManager/issues/366.

                    Regarding the sensor motion, weird, by default should attach to CHANGE interrupt so to intercept both. Any chance to share NodeManager's debug log as well? Thanks

                    Felix HaverkampF Offline
                    Felix HaverkampF Offline
                    Felix Haverkamp
                    wrote on last edited by
                    #169

                    @user2684
                    i think conditional report is the problem:

                    #define FEATURE_CONDITIONAL_REPORT ON

                    without it works fine.

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      user2684
                      Contest Winner
                      wrote on last edited by
                      #170

                      Every new version of NodeManager, I try to review and hopefully improve its architecture. This time looked like a simple and quick task but eventually ended up in a complete and deep review of the code. Many many many things have changed with the main objective to better integrate with the MySensors library and simplify the life of users willing to contribute or to add support for new sensors.

                      The new file structure (with a dedicated file for each supported sensor) and the way the package is delivered (as an arduino library now) go into this direction. There are also included a good amount of new features but still in most of the cases, resulting a smaller code.

                      All the details are available at https://github.com/mysensors/NodeManager/pull/391 which will be merged into the development branch shortly.

                      Due to the many changes, if anybody would be willing to give it a try and report any bug, would be really great. Thanks!

                      1 Reply Last reply
                      4
                      • alowhumA Offline
                        alowhumA Offline
                        alowhum
                        Plugin Developer
                        wrote on last edited by
                        #171

                        Just wanted to say that NodeManager is awesome. I can't believe I only now really had a better look at what it is. I always thought it was some kind of software you had to install, and that it was used by professionals to manage complicated sensor nets.

                        For the last few months I've been thinking "wouldn't it be useful if there was some kind of beginner friendly web interface where you could select which devices you want, and then it creates the code for you". This is so close to that. Thank you for this incredible work!

                        U 1 Reply Last reply
                        1
                        • alowhumA alowhum

                          Just wanted to say that NodeManager is awesome. I can't believe I only now really had a better look at what it is. I always thought it was some kind of software you had to install, and that it was used by professionals to manage complicated sensor nets.

                          For the last few months I've been thinking "wouldn't it be useful if there was some kind of beginner friendly web interface where you could select which devices you want, and then it creates the code for you". This is so close to that. Thank you for this incredible work!

                          U Offline
                          U Offline
                          user2684
                          Contest Winner
                          wrote on last edited by
                          #172

                          @alowhum many thanks for the feedback, really appreciated!

                          1 Reply Last reply
                          2
                          • J Offline
                            J Offline
                            Jiri Hron
                            wrote on last edited by
                            #173

                            Is it possible to "force" send SensorDoor value regularly?

                            I am using magnetic sensor together with interrupt feature but when sensor status is change too fast before main loop is finished, sensor value remains in wrong state until magnetic sensor value is physically changed again.

                            So I would like to set that SensorDoor value will be set regularly like e.g. temperature sensors values. I tried to add:

                            door.setReportIntervalMinutes(5);
                            

                            But it does not work in this case. Value is not reported based on this interval. Only way how to get SensorDoor value back to right state is physically change its value (open/close magnetic sensors).

                            Btw Nodemanager is really awsome. Great work!

                            U 1 Reply Last reply
                            0
                            • faustiF Offline
                              faustiF Offline
                              fausti
                              wrote on last edited by fausti
                              #174

                              Hi, I need some advice for my following problem..:

                              Situation: Arduino ist connected to an raspberry gateway with openhab -> works just fine.
                              To the arduino I have connected a PIR on 3 and a photoresistor (LDR) with an 10k resistor on A0 -> works just fine.
                              On first boot (after connecting etc.) the arduino sends motion status + LDR value. But after that first msg. only the motion (tripped) is send.
                              What I want: I want that the arduino sleeps until there is an interrupt comming from the PIR and then sends the motion status+light value (LDR) and then sleeps again 4ever until the next interrupt.
                              Problem: As I said, it only sends the light value only once.. and then never again. On the arduino debug I can see, that only motion is send:
                              NodeManager v1.7
                              LIB V=2.3.0 R=N E=X T=N A=A S=S B=-
                              LDR I=1 P=16 T=23
                              MOTION I=2 P=1 T=16
                              RADIO...OK
                              PRES I=1 T=16 D=LDR
                              PRES I=2 T=1 D=MOTION
                              READY

                              MY I=5 M=255
                              INT P=3, V=0
                              INT P=3 M=1
                              INT P=2 M=255
                              MOTION I=2 P=3 V=0
                              SEND D=0 I=2 C=0 T=16 S= I=0 F=0.00
                              LDR I=1 V=352 %=34 <-- first an last time LDR sends it's value
                              SEND D=0 I=1 C=0 T=23 S= I=0 F=0.00
                              INT P=3, V=1
                              MOTION I=2 P=3 V=1
                              SEND D=0 I=2 C=0 T=16 S= I=0 F=0.00
                              INT P=3, V=0
                              MOTION I=2 P=3 V=0
                              SEND D=0 I=2 C=0 T=16 S= I=0 F=0.00
                              ...
                              Hope you can help me :grimacing: many thanks in advance :-)

                              // General settings
                              #define SKETCH_NAME "Test2"
                              #define SKETCH_VERSION "1.0"
                              //#define MY_DEBUG
                              
                              // NRF24 radio settings
                              #define MY_RADIO_NRF24
                              #define MY_SIGNING_SIMPLE_PASSWD "xxx"
                              #define MY_ENCRYPTION_SIMPLE_PASSWD "xxx" 
                              #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                              #define MY_RF24_CHANNEL (124)
                              
                              // Advanced settings
                              #define MY_BAUD_RATE 9600
                              //#define MY_SMART_SLEEP_WAIT_DURATION_MS 500
                              #define MY_SPLASH_SCREEN_DISABLED
                              
                              /***********************************
                               * NodeManager modules for supported sensors
                               */
                              #define USE_ANALOG_INPUT
                              #define USE_INTERRUPT
                              /***********************************
                               * NodeManager built-in features
                               */
                              
                              // Enable/disable NodeManager's features
                              #define FEATURE_DEBUG ON
                              #define FEATURE_POWER_MANAGER OFF
                              #define FEATURE_INTERRUPTS ON
                              #define FEATURE_CONDITIONAL_REPORT OFF
                              #define FEATURE_EEPROM OFF
                              #define FEATURE_SLEEP ON
                              #define FEATURE_RECEIVE OFF
                              #define FEATURE_TIME OFF
                              #define FEATURE_RTC OFF
                              #define FEATURE_SD OFF
                              #define FEATURE_HOOKING OFF
                              
                              /***********************************
                               * Load NodeManager Library
                               */
                              #include "NodeManagerLibrary.h"
                              NodeManager node;
                              /***********************************
                               * Add your sensors below
                               */
                              // Attached sensors
                              SensorLDR ldr(node,A0);
                              //SensorInterrupt interrupt(node,3);
                              SensorMotion motion(node,3);
                              /***********************************
                               * Main Sketch
                               */
                              
                              // before
                              void before() {
                                // setup the serial port baud rate
                                Serial.begin(MY_BAUD_RATE);
                                /*
                                * Configure your sensors below
                                */
                                node.setReportIntervalSeconds(10);
                                node.setSleepSeconds(60);
                                /*
                                * Configure your sensors above
                                */
                                node.before();
                              }
                              
                              // presentation
                              void presentation() {
                                // call NodeManager presentation routine
                                node.presentation();
                              }
                              
                              // setup
                              void setup() {
                                // call NodeManager setup routine
                                node.setup();
                              }
                              
                              // loop
                              void loop() {
                                // call NodeManager loop routine
                                node.loop();
                              }
                              
                              #if FEATURE_RECEIVE == ON
                              // receive
                              void receive(const MyMessage &message) {
                                // call NodeManager receive routine
                                node.receive(message);
                              }
                              #endif
                              
                              #if FEATURE_TIME == ON
                              // receiveTime
                              void receiveTime(unsigned long ts) {
                                // call NodeManager receiveTime routine
                                node.receiveTime(ts);
                              }
                              #endif
                              
                              faustiF 1 Reply Last reply
                              0
                              • faustiF fausti

                                Hi, I need some advice for my following problem..:

                                Situation: Arduino ist connected to an raspberry gateway with openhab -> works just fine.
                                To the arduino I have connected a PIR on 3 and a photoresistor (LDR) with an 10k resistor on A0 -> works just fine.
                                On first boot (after connecting etc.) the arduino sends motion status + LDR value. But after that first msg. only the motion (tripped) is send.
                                What I want: I want that the arduino sleeps until there is an interrupt comming from the PIR and then sends the motion status+light value (LDR) and then sleeps again 4ever until the next interrupt.
                                Problem: As I said, it only sends the light value only once.. and then never again. On the arduino debug I can see, that only motion is send:
                                NodeManager v1.7
                                LIB V=2.3.0 R=N E=X T=N A=A S=S B=-
                                LDR I=1 P=16 T=23
                                MOTION I=2 P=1 T=16
                                RADIO...OK
                                PRES I=1 T=16 D=LDR
                                PRES I=2 T=1 D=MOTION
                                READY

                                MY I=5 M=255
                                INT P=3, V=0
                                INT P=3 M=1
                                INT P=2 M=255
                                MOTION I=2 P=3 V=0
                                SEND D=0 I=2 C=0 T=16 S= I=0 F=0.00
                                LDR I=1 V=352 %=34 <-- first an last time LDR sends it's value
                                SEND D=0 I=1 C=0 T=23 S= I=0 F=0.00
                                INT P=3, V=1
                                MOTION I=2 P=3 V=1
                                SEND D=0 I=2 C=0 T=16 S= I=0 F=0.00
                                INT P=3, V=0
                                MOTION I=2 P=3 V=0
                                SEND D=0 I=2 C=0 T=16 S= I=0 F=0.00
                                ...
                                Hope you can help me :grimacing: many thanks in advance :-)

                                // General settings
                                #define SKETCH_NAME "Test2"
                                #define SKETCH_VERSION "1.0"
                                //#define MY_DEBUG
                                
                                // NRF24 radio settings
                                #define MY_RADIO_NRF24
                                #define MY_SIGNING_SIMPLE_PASSWD "xxx"
                                #define MY_ENCRYPTION_SIMPLE_PASSWD "xxx" 
                                #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                                #define MY_RF24_CHANNEL (124)
                                
                                // Advanced settings
                                #define MY_BAUD_RATE 9600
                                //#define MY_SMART_SLEEP_WAIT_DURATION_MS 500
                                #define MY_SPLASH_SCREEN_DISABLED
                                
                                /***********************************
                                 * NodeManager modules for supported sensors
                                 */
                                #define USE_ANALOG_INPUT
                                #define USE_INTERRUPT
                                /***********************************
                                 * NodeManager built-in features
                                 */
                                
                                // Enable/disable NodeManager's features
                                #define FEATURE_DEBUG ON
                                #define FEATURE_POWER_MANAGER OFF
                                #define FEATURE_INTERRUPTS ON
                                #define FEATURE_CONDITIONAL_REPORT OFF
                                #define FEATURE_EEPROM OFF
                                #define FEATURE_SLEEP ON
                                #define FEATURE_RECEIVE OFF
                                #define FEATURE_TIME OFF
                                #define FEATURE_RTC OFF
                                #define FEATURE_SD OFF
                                #define FEATURE_HOOKING OFF
                                
                                /***********************************
                                 * Load NodeManager Library
                                 */
                                #include "NodeManagerLibrary.h"
                                NodeManager node;
                                /***********************************
                                 * Add your sensors below
                                 */
                                // Attached sensors
                                SensorLDR ldr(node,A0);
                                //SensorInterrupt interrupt(node,3);
                                SensorMotion motion(node,3);
                                /***********************************
                                 * Main Sketch
                                 */
                                
                                // before
                                void before() {
                                  // setup the serial port baud rate
                                  Serial.begin(MY_BAUD_RATE);
                                  /*
                                  * Configure your sensors below
                                  */
                                  node.setReportIntervalSeconds(10);
                                  node.setSleepSeconds(60);
                                  /*
                                  * Configure your sensors above
                                  */
                                  node.before();
                                }
                                
                                // presentation
                                void presentation() {
                                  // call NodeManager presentation routine
                                  node.presentation();
                                }
                                
                                // setup
                                void setup() {
                                  // call NodeManager setup routine
                                  node.setup();
                                }
                                
                                // loop
                                void loop() {
                                  // call NodeManager loop routine
                                  node.loop();
                                }
                                
                                #if FEATURE_RECEIVE == ON
                                // receive
                                void receive(const MyMessage &message) {
                                  // call NodeManager receive routine
                                  node.receive(message);
                                }
                                #endif
                                
                                #if FEATURE_TIME == ON
                                // receiveTime
                                void receiveTime(unsigned long ts) {
                                  // call NodeManager receiveTime routine
                                  node.receiveTime(ts);
                                }
                                #endif
                                
                                faustiF Offline
                                faustiF Offline
                                fausti
                                wrote on last edited by fausti
                                #175

                                @fausti
                                ok, I have solved it myself - the PIR made all that trouble.
                                I did connect the PIR on 3.3V (similar to https://forum.mysensors.org/uploads/upload-4bdca27e-3c36-4c68-9e54-947b9f4717b4.jpg).

                                Problem was, that when arduino wakes up the radio, the power drop would kinda restart the PIR, which causes an interrupt. Think a similar problem was discussed here:
                                https://forum.mysensors.org/topic/6511/hc-sr501-3-3v-randomly-sends-tripped-when-radio-is-on

                                Anyways - you surly would have helped, if i would not have found it. Great forum! :-)

                                1 Reply Last reply
                                1
                                • J Jiri Hron

                                  Is it possible to "force" send SensorDoor value regularly?

                                  I am using magnetic sensor together with interrupt feature but when sensor status is change too fast before main loop is finished, sensor value remains in wrong state until magnetic sensor value is physically changed again.

                                  So I would like to set that SensorDoor value will be set regularly like e.g. temperature sensors values. I tried to add:

                                  door.setReportIntervalMinutes(5);
                                  

                                  But it does not work in this case. Value is not reported based on this interval. Only way how to get SensorDoor value back to right state is physically change its value (open/close magnetic sensors).

                                  Btw Nodemanager is really awsome. Great work!

                                  U Offline
                                  U Offline
                                  user2684
                                  Contest Winner
                                  wrote on last edited by
                                  #176

                                  @jiri-hron I think you can achieve what you need by using FEATURE_TIME. In this way when woken up, NodeManager will go back to sleep only for the remainder time left. Not ideal but I couldn't find a better way to understand for how long the node has been sleeping before the interrupt.

                                  1 Reply Last reply
                                  0
                                  • I Offline
                                    I Offline
                                    iteafreely
                                    wrote on last edited by
                                    #177

                                    It looks like there is a limit of 1 type of each sensor. Is there a way to modify this?

                                    My use-case is a french sliding glass door. I would like to use a single node with 2 magnetic sensors (one on each end of the node) with the node mounted in the middle of the door, so that if either side is moved the interrupt is triggered.

                                    U zboblamontZ 2 Replies Last reply
                                    0
                                    • I iteafreely

                                      It looks like there is a limit of 1 type of each sensor. Is there a way to modify this?

                                      My use-case is a french sliding glass door. I would like to use a single node with 2 magnetic sensors (one on each end of the node) with the node mounted in the middle of the door, so that if either side is moved the interrupt is triggered.

                                      U Offline
                                      U Offline
                                      user2684
                                      Contest Winner
                                      wrote on last edited by
                                      #178

                                      @iteafreely your understanding is correct. I see two options here: you can either create a new custom sensor inheriting from SensorDoor and adding an additional child and the extra logic you require or create two instances of SensorDoor and playing with hooking functions to make one checking on the other. In this latter case you probably need some additional variables to keep track of the status.

                                      1 Reply Last reply
                                      0
                                      • R Offline
                                        R Offline
                                        reinhold
                                        Hardware Contributor
                                        wrote on last edited by reinhold
                                        #179

                                        @iteafreely I don't think there is a limit of one sensor per type, not even for interrupts like door sensors. You just need to make sure you are using different pins and different child ids for the two magnetic sensors. I'm using 8 analog sensors (MQ-... gas sensors) on eight different pins on the same node and it works just fine.

                                        Of course, if you need some interdependence on what the two magnetic sensors report, then you must follow @user2684's suggestion of creating a custom sensor (a C++ class derived from an existing sensor class).
                                        But if you simply want two independent magnetic sensors (for each of the ends of your sliding door), then you can simply create two instances of SensorDoor on two different pins (here pins 3 and 4) and different hardcoded child_id (1 and 2 in this case):

                                        SensorDoor doorLeft(node,3,1);
                                        SensorDoor doorRight(node, 4,2);
                                        

                                        Unfortunately, both of them will report to the gateway with name "DOOR" (and there's no way to change it without subclassing SensorDoor), but they will have a different child_id 1 and 2 to distinguish the two values sent by the node.

                                        You can then use your smart home controller to handle the two door sensors like one.

                                        U 1 Reply Last reply
                                        0
                                        • I iteafreely

                                          It looks like there is a limit of 1 type of each sensor. Is there a way to modify this?

                                          My use-case is a french sliding glass door. I would like to use a single node with 2 magnetic sensors (one on each end of the node) with the node mounted in the middle of the door, so that if either side is moved the interrupt is triggered.

                                          zboblamontZ Offline
                                          zboblamontZ Offline
                                          zboblamont
                                          wrote on last edited by
                                          #180

                                          @iteafreely Not sure of software issues as I don't use NodeManager, but your use-case indicates you do not need to know which door is opened, only that one or both is/are.
                                          If by magnetic sensor you mean magnet/reed, would a single reed where both doors meet, or two reeds (one on each door end) wired in parallel, to a single interrupt pin not provide this?

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


                                          8

                                          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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular