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. OpenHardware.io
  3. 💬 NodeManager

💬 NodeManager

Scheduled Pinned Locked Moved OpenHardware.io
contest2017arduinonewbiemysensorsbattery sensor
196 Posts 42 Posters 67.4k 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.
  • D Dencan

    @user2684 It appears that this problem is caused by a bug in bootloaders used in some Arduino boards.

    The solution suggested is to flash optiboot bootloader to the Arduino Pro Mini. Or not using a bootloader.

    I use mostly barebone atmega328's with optiboot bootloader, working perfectly with reboot function, so I haven't been aware of the problem until now when I used a pro mini.

    Please read this article which explains the cause of the problem and suggested fix.
    https://andreasrohner.at/posts/Electronics/How-to-make-the-Watchdog-Timer-work-on-an-Arduino-Pro-Mini-by-replacing-the-bootloader/

    I will try it on a pro mini when I have time.

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

    @Dencan thanks, very good information. Based on what you are saying, I'd probably re-introduce the reboot pin as a backup solution just in case somebody doesn't want or can move away from the default bootloader. In this way both the approaches will be available. Thanks!

    1 Reply Last reply
    0
    • ronnyandreR Offline
      ronnyandreR Offline
      ronnyandre
      wrote on last edited by
      #74

      I have a hard time figuring out one simple thing... Is the NodeManager code supposed to be on the sensors? Or is it supposed to be on the Gateway? Or both??

      Newbie with RPi and Domoticz, trying to automate my home.

      Sergio RiusS 1 Reply Last reply
      0
      • ronnyandreR ronnyandre

        I have a hard time figuring out one simple thing... Is the NodeManager code supposed to be on the sensors? Or is it supposed to be on the Gateway? Or both??

        Sergio RiusS Offline
        Sergio RiusS Offline
        Sergio Rius
        wrote on last edited by
        #75

        @ronnyandre With NodeManager you can build sensors but also configure a gateway. :+1:

        ronnyandreR 1 Reply Last reply
        0
        • Sergio RiusS Sergio Rius

          @ronnyandre With NodeManager you can build sensors but also configure a gateway. :+1:

          ronnyandreR Offline
          ronnyandreR Offline
          ronnyandre
          wrote on last edited by
          #76

          @Sergio-Rius I think I understood it correctly. Code goes on the sensors, not on the gateway itself? That means, the MySensors Serial Gateway I use is only a carrier of the messages that NodeManager receives on the sensors I implement the code?

          Newbie with RPi and Domoticz, trying to automate my home.

          Sergio RiusS 1 Reply Last reply
          0
          • U user2684

            @Ivan-Z if you mean an example with DHT22, you need first of all to enable the DHT module in config.h with:

            #define MODULE_DHT 1
            

            Then just register the sensor in before() with:

            nodeManager.registerSensor(SENSOR_DHT22,6);
            

            Where 6 is the pin where the sensor is attached to. NodeManager will then create automatically two child ids, one for temperature and the other for humidity.
            As written in the documentation you need the DHT library from https://github.com/adafruit/DHT-sensor-library (or install it by using the arduino IDE). For some unknown (to me) reasons I had issues in using the library from the mysensors example.

            What do you mean by optimization flag?
            As for avoid sending the same value, this is already available, have a look at setTackLastValue() from the documentation. When set to true, the value will not be send if the same as the previous (default is of course false). I also implemented setForceUpdate(), to force to send an update after the configured number of cycles, as many examples here are using this approach.

            D Offline
            D Offline
            dakipro
            wrote on last edited by
            #77

            @user2684 Hi, i am trying to get started with NodeManager, and I have a question about dht configuration?
            I would like to set it to not update values if temperature is not changed, something like ((SensorLatchingRelay*)nodeManager.getSensor(1))->setTackLastValue(true);
            But how do I select both sensors, are they numbers 1 and 2 (both temp and humidity)?
            I would also like to add these settings to them.
            ((SensorLatchingRelay*)nodeManager.getSensor(1))->setForceUpdate(4);
            ((SensorLatchingRelay*)nodeManager.getSensor(1))->setFloatPrecision(1);

            Thanks!

            C: OpenHAB2 with node-red on linux laptop
            GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
            GW: Arduino Mega, RFLink 433Mhz

            Sergio RiusS U 2 Replies Last reply
            0
            • ronnyandreR ronnyandre

              @Sergio-Rius I think I understood it correctly. Code goes on the sensors, not on the gateway itself? That means, the MySensors Serial Gateway I use is only a carrier of the messages that NodeManager receives on the sensors I implement the code?

              Sergio RiusS Offline
              Sergio RiusS Offline
              Sergio Rius
              wrote on last edited by
              #78

              @ronnyandre NodeManager is a code wrapper. It's a collection of libraries, that has been join with a configuration script that automatically picks and does what is needed for your like.
              You can make a common temperature sensor, but if you look at the documentation and the NodeManager.h code or the ino template itself, you have options for gateway configuration.
              So you should be able to configure a gateway sketch and burn into your hardware.

              I hope this gives some light before the dinner ;)

              ronnyandreR U 2 Replies Last reply
              0
              • D dakipro

                @user2684 Hi, i am trying to get started with NodeManager, and I have a question about dht configuration?
                I would like to set it to not update values if temperature is not changed, something like ((SensorLatchingRelay*)nodeManager.getSensor(1))->setTackLastValue(true);
                But how do I select both sensors, are they numbers 1 and 2 (both temp and humidity)?
                I would also like to add these settings to them.
                ((SensorLatchingRelay*)nodeManager.getSensor(1))->setForceUpdate(4);
                ((SensorLatchingRelay*)nodeManager.getSensor(1))->setFloatPrecision(1);

                Thanks!

                Sergio RiusS Offline
                Sergio RiusS Offline
                Sergio Rius
                wrote on last edited by Sergio Rius
                #79

                @dakipro said in 💬 NodeManager:

                ((SensorLatchingRelay*)nodeManager.getSensor(1))->setForceUpdate(4);
                ((SensorLatchingRelay*)nodeManager.getSensor(1))->setFloatPrecision(1);

                SensorLatchingRelay is wrong here.
                Try:

                  int sensorDHT_Id = nodeManager.registerSensor(SENSOR_DHT22, PIN_DHT);
                  SensorDHT* sensorDHT = (SensorDHT*)nodeManager.getSensor(sensorDHT_Id);
                  sensorDHT->setSamples(5);
                  sensorDHT->setSamplesInterval(2001);
                  sensorDHT->setTackLastValue(true);
                  sensorDHT->setForceUpdate(3);
                

                Those options refer to the whole device, should be applied also to humidity. There was a bug on this but I think it was already corrected. If not, try with development version.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dakipro
                  wrote on last edited by
                  #80

                  Thanks, right after posting the question, I have found a example on the topic itself (search function on the forum does not search current topic anymore, I had to scroll down to be able to "find in page").
                  I am now using this
                  int sensorDHT_Id = nodeManager.registerSensor(SENSOR_DHT22,4);
                  SensorDHT* sensorDHT = (SensorDHT*)nodeManager.getSensor(sensorDHT_Id);

                  Will see how it goes :)

                  C: OpenHAB2 with node-red on linux laptop
                  GW: Arduino Nano - W5100 Ethernet, Nrf24l01+ 2,4Ghz mqtt
                  GW: Arduino Mega, RFLink 433Mhz

                  1 Reply Last reply
                  0
                  • Sergio RiusS Sergio Rius

                    @ronnyandre NodeManager is a code wrapper. It's a collection of libraries, that has been join with a configuration script that automatically picks and does what is needed for your like.
                    You can make a common temperature sensor, but if you look at the documentation and the NodeManager.h code or the ino template itself, you have options for gateway configuration.
                    So you should be able to configure a gateway sketch and burn into your hardware.

                    I hope this gives some light before the dinner ;)

                    ronnyandreR Offline
                    ronnyandreR Offline
                    ronnyandre
                    wrote on last edited by
                    #81

                    @Sergio-Rius Thanks man! I will definitely take a closer look. I just one silly last question....

                    Trying to use a simple DS18B20 temperature sensor, and I get the following error:

                    error: 'SENSOR_DS18B20' was not declared in this scope
                    nodeManager.registerSensor(SENSOR_DS18B20,3);

                    Seems like it doesn't like me declaring it. I have installed Dallas Temperature and One Wire through Arduino libraries.

                    Newbie with RPi and Domoticz, trying to automate my home.

                    U 1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mickecarlsson
                      wrote on last edited by
                      #82

                      @ronnyandre you need to uninstall those libraries and install those mentioned in the heading: Installing the dependencies: NodeManager

                      ronnyandreR 1 Reply Last reply
                      0
                      • M mickecarlsson

                        @ronnyandre you need to uninstall those libraries and install those mentioned in the heading: Installing the dependencies: NodeManager

                        ronnyandreR Offline
                        ronnyandreR Offline
                        ronnyandre
                        wrote on last edited by
                        #83

                        @mickecarlsson Thanks, I will try that later today :smiley:

                        Newbie with RPi and Domoticz, trying to automate my home.

                        1 Reply Last reply
                        0
                        • Sergio RiusS Sergio Rius

                          @ronnyandre NodeManager is a code wrapper. It's a collection of libraries, that has been join with a configuration script that automatically picks and does what is needed for your like.
                          You can make a common temperature sensor, but if you look at the documentation and the NodeManager.h code or the ino template itself, you have options for gateway configuration.
                          So you should be able to configure a gateway sketch and burn into your hardware.

                          I hope this gives some light before the dinner ;)

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

                          @Sergio-Rius @ronnyandre just to add something on top of what already discussed regarding the gateway thing, yes you can use NodeManager for the gateway as well or alternatively a standard gateway sketch, those are fully compatibile since NodeManager adds very little when running as a gateway, it just relies on the standard MySensors library and directives

                          1 Reply Last reply
                          0
                          • D dakipro

                            @user2684 Hi, i am trying to get started with NodeManager, and I have a question about dht configuration?
                            I would like to set it to not update values if temperature is not changed, something like ((SensorLatchingRelay*)nodeManager.getSensor(1))->setTackLastValue(true);
                            But how do I select both sensors, are they numbers 1 and 2 (both temp and humidity)?
                            I would also like to add these settings to them.
                            ((SensorLatchingRelay*)nodeManager.getSensor(1))->setForceUpdate(4);
                            ((SensorLatchingRelay*)nodeManager.getSensor(1))->setFloatPrecision(1);

                            Thanks!

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

                            @dakipro in addition to what @Sergio-Rius already pointed out correctly, consider when multiple child IDs are created, you would need to call those functions on EACH id. Have a look at https://github.com/mysensors/NodeManager/issues/176 for more details. Thanks

                            Sergio RiusS 1 Reply Last reply
                            0
                            • ronnyandreR ronnyandre

                              @Sergio-Rius Thanks man! I will definitely take a closer look. I just one silly last question....

                              Trying to use a simple DS18B20 temperature sensor, and I get the following error:

                              error: 'SENSOR_DS18B20' was not declared in this scope
                              nodeManager.registerSensor(SENSOR_DS18B20,3);

                              Seems like it doesn't like me declaring it. I have installed Dallas Temperature and One Wire through Arduino libraries.

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

                              @ronnyandre ensure MODULE_DS18B20 is enabled in your config.h otherwise SENSOR_DS18B20 will not be made available. Thanks

                              1 Reply Last reply
                              0
                              • U user2684

                                @dakipro in addition to what @Sergio-Rius already pointed out correctly, consider when multiple child IDs are created, you would need to call those functions on EACH id. Have a look at https://github.com/mysensors/NodeManager/issues/176 for more details. Thanks

                                Sergio RiusS Offline
                                Sergio RiusS Offline
                                Sergio Rius
                                wrote on last edited by
                                #87

                                @user2684 on #176 issue... and the sample I pasted before... then we have to configure Samples, SamplesInterval, TackLastValue and ForceUpdate for Temp and Hum separately?
                                It doesn't make sense to me.

                                U 1 Reply Last reply
                                0
                                • Sergio RiusS Sergio Rius

                                  @user2684 on #176 issue... and the sample I pasted before... then we have to configure Samples, SamplesInterval, TackLastValue and ForceUpdate for Temp and Hum separately?
                                  It doesn't make sense to me.

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

                                  @Sergio-Rius yes, this is the case, since two different and completely independent child IDs are created, you need to call the methods on both. This is true for any sensor creating multiple IDs. And you're right, it doesn't make sense to me either, it is something I've realized recently. I'm tracking it down with https://github.com/mysensors/NodeManager/issues/198 but I do not expect this to be an easy fix. Thanks

                                  1 Reply Last reply
                                  1
                                  • V Offline
                                    V Offline
                                    vikasjee
                                    wrote on last edited by
                                    #89

                                    Hi, what's your calendar for v 1.6.0. I was looking forward to IO-Expander MCP23017 and TTP226/9 support in this release...

                                    U 1 Reply Last reply
                                    0
                                    • V vikasjee

                                      Hi, what's your calendar for v 1.6.0. I was looking forward to IO-Expander MCP23017 and TTP226/9 support in this release...

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

                                      @vikasjee this was the plan, you're right, but I had to postpone a good number of requests supposed to be part of v1.6 since I wanted to allow this https://forum.mysensors.org/topic/6980/browser-based-firmware-generator which is dependent on NodeManager to come to life asap. So unfortunately I had to move those enhancement requiring some effort to v1.7 even if I already acquired the hardware. Sorry for that

                                      V 1 Reply Last reply
                                      0
                                      • U user2684

                                        @vikasjee this was the plan, you're right, but I had to postpone a good number of requests supposed to be part of v1.6 since I wanted to allow this https://forum.mysensors.org/topic/6980/browser-based-firmware-generator which is dependent on NodeManager to come to life asap. So unfortunately I had to move those enhancement requiring some effort to v1.7 even if I already acquired the hardware. Sorry for that

                                        V Offline
                                        V Offline
                                        vikasjee
                                        wrote on last edited by
                                        #91

                                        @user2684 No issues! When are you planning for 1.7.0? Looking forward to an early release especially the IO-Expander MCP23017 support...

                                        U 1 Reply Last reply
                                        0
                                        • V vikasjee

                                          @user2684 No issues! When are you planning for 1.7.0? Looking forward to an early release especially the IO-Expander MCP23017 support...

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

                                          @vikasjee v1.7 will be somewhere after summer since v1.6 should be out by the end of this month I guess. But I can promise to start looking into IO-Expander MCP23017 support as the first thing as v1.7 development will start so to make it available first thing into the development branch :)

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


                                          12

                                          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