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.
  • openhardware.ioO Offline
    openhardware.ioO Offline
    openhardware.io
    wrote on last edited by openhardware.io
    #1

    https://www.openhardware.io/view/363/NodeManager

    S 1 Reply Last reply
    4
    • EfflonE Offline
      EfflonE Offline
      Efflon
      wrote on last edited by
      #2

      Wow! This seems to make things extremely simple. The documentation is really good but I wish you had a few example sketches to make things even more easy (and help us who can't bother to read all documentation ;D ).

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

        Thanks for you feedback @Efflon! Good advice to have sample sketches as well, I'll work on it!

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

          Done! I've updated the documentation with four comprehensive examples including the full sketches

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

            FYI: Added the NodeManager project under the download/api section on the main site.

            Keep up the good work!

            1 Reply Last reply
            3
            • Ivan ZI Offline
              Ivan ZI Offline
              Ivan Z
              Hardware Contributor
              wrote on last edited by
              #6

              How make not sleep sensor?

              void NodeManager::loop() {
              #if SLEEP_MANAGER == 1
              Only for sleep
              #end
              }

              May be to make wait logic

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

                @Ivan-Z there should be already something in this direction available. You still need to load the sleep module and set sleep time but you have to set sleep mode like this:

                nodeManager.setSleepMode(WAIT);
                

                And the library will use wait() instead of sleep(). All the rest will stay the same.
                I probably need to double check if there is anythig in the code which will use sleep instead of wait outside loop() so I've opened https://github.com/mysensors/NodeManager/issues/38 for this but you should be ready to go even with the current version.
                Thanks

                1 Reply Last reply
                0
                • Ivan ZI Offline
                  Ivan ZI Offline
                  Ivan Z
                  Hardware Contributor
                  wrote on last edited by
                  #8

                  Please show my sample with DHT22

                  Append optimization flag.
                  For save battery life, do not send the same values

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

                    @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 1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      user2684
                      Contest Winner
                      wrote on last edited by
                      #10

                      Hi, I've updated the project (including files and documentation) to version 1.4.
                      Main changes are:

                      • Added support for ML8511 UV intensity sensor
                      • Added support for MQ air quality sensor
                      • Added ability to manually assign a child id to a sensor
                      • Ensured compatibility for non-sleeping nodes
                      • Ability to control if waking up from an interrupt counts for a battery level report
                      • When power pins are set the sensor is powered on just after
                      • Service messages are disabled by default
                      • Bug fixes

                      Thanks!

                      1 Reply Last reply
                      2
                      • openhardware.ioO openhardware.io

                        https://www.openhardware.io/view/363/NodeManager

                        S Offline
                        S Offline
                        Straydog
                        wrote on last edited by
                        #11

                        @openhardware.io Great idea. Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?
                        Also, would love to see an example of a custom sensor/HC-SR04 distance sensor, 3-pin implementation.
                        Keep up the great work.

                        U 3 Replies Last reply
                        0
                        • S Straydog

                          @openhardware.io Great idea. Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?
                          Also, would love to see an example of a custom sensor/HC-SR04 distance sensor, 3-pin implementation.
                          Keep up the great work.

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

                          @Straydog said in 💬 NodeManager:

                          Great idea. Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?
                          Also, would love to see an example of a custom sensor/HC-SR04 distance sensor, 3-pin implementation.
                          Keep up the great work.

                          Thanks for the advice! I'd be very happy to support any sensor which would be useful for the community! I've opened https://github.com/mysensors/NodeManager/issues/63 and https://github.com/mysensors/NodeManager/issues/62.
                          Since I don't have those sensors and delivery is kind of a pain, would you like to give me a hand in testing the code I can put together? If so, please add a comment on git with some sample code and I'll integrate it into NodeManager straight away for your testing.
                          Thanks!

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

                            @user2684
                            If you send me your paypal email, I'll forward community donations to help you buy a sonoff and HC-SR04 for testing.

                            1 Reply Last reply
                            0
                            • jlehtinenJ Offline
                              jlehtinenJ Offline
                              jlehtinen
                              wrote on last edited by
                              #14

                              @user2684 Good work with NodeManager, greatly appreciated by "MySensors noob" like myself! :+1:

                              1 Reply Last reply
                              0
                              • Ivan ZI Offline
                                Ivan ZI Offline
                                Ivan Z
                                Hardware Contributor
                                wrote on last edited by
                                #15

                                This version already allows wizard (.php) to generate a sketch

                                1 Reply Last reply
                                0
                                • S Straydog

                                  @openhardware.io Great idea. Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?
                                  Also, would love to see an example of a custom sensor/HC-SR04 distance sensor, 3-pin implementation.
                                  Keep up the great work.

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

                                  @Straydog said in 💬 NodeManager:

                                  Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?

                                  I spend some time in the forum but still I'm struggling a bit to understand the Sonoff use case to then buy the right piece to test. Is it related to what has been discussed in this thread?
                                  https://forum.mysensors.org/topic/5858/sonoff-relay-using-mysensors-esp8266-wifi-or-mqtt-gateway
                                  Thanks!

                                  EfflonE S 2 Replies Last reply
                                  0
                                  • U user2684

                                    @Straydog said in 💬 NodeManager:

                                    Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?

                                    I spend some time in the forum but still I'm struggling a bit to understand the Sonoff use case to then buy the right piece to test. Is it related to what has been discussed in this thread?
                                    https://forum.mysensors.org/topic/5858/sonoff-relay-using-mysensors-esp8266-wifi-or-mqtt-gateway
                                    Thanks!

                                    EfflonE Offline
                                    EfflonE Offline
                                    Efflon
                                    wrote on last edited by
                                    #17

                                    @user2684 I have a sonoff and have posted a few examples here https://www.mysensors.org/build/sonoff, nodeManager would maybe save a few lines of code for the end user but you will have quite a lot to code :smile: I guess if you add esp8266 support, the sonoff is just a relay with a LED and a button which nodeManager already supports.

                                    U 1 Reply Last reply
                                    0
                                    • S Straydog

                                      @openhardware.io Great idea. Can we expect to see support for Sonoff/ESP8266(without SLEEP) in a near future?
                                      Also, would love to see an example of a custom sensor/HC-SR04 distance sensor, 3-pin implementation.
                                      Keep up the great work.

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

                                      @Straydog just to be sure I'm buying the right sensor, I can only see HC-SR04 with 4 pins on aliexpress I guess this is the right sensor but I will use only three of the four pins, is it the case?
                                      Thanks

                                      S 1 Reply Last reply
                                      0
                                      • EfflonE Efflon

                                        @user2684 I have a sonoff and have posted a few examples here https://www.mysensors.org/build/sonoff, nodeManager would maybe save a few lines of code for the end user but you will have quite a lot to code :smile: I guess if you add esp8266 support, the sonoff is just a relay with a LED and a button which nodeManager already supports.

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

                                        @Efflon said in 💬 NodeManager:

                                        @user2684 I have a sonoff and have posted a few examples here https://www.mysensors.org/build/sonoff,

                                        Cool project, I wonder how I've missed it so far! I understand the idea, basically the sonoff runs as a gateway (otherwise would require a radio attached which is not possible/easy) and has a relay type of sensor attached. I think I can make it easily, I'm ordering a sonoff right now so to test the implementation. I need this https://github.com/mysensors/NodeManager/issues/65 first of all and then I can adapt the SENSOR_RELAY which is already available in NodeManager. I'll keep you posted while I will progress.
                                        Thanks!

                                        1 Reply Last reply
                                        0
                                        • U user2684

                                          @Straydog just to be sure I'm buying the right sensor, I can only see HC-SR04 with 4 pins on aliexpress I guess this is the right sensor but I will use only three of the four pins, is it the case?
                                          Thanks

                                          S Offline
                                          S Offline
                                          Straydog
                                          wrote on last edited by
                                          #20

                                          @user2684 It's the regular HC-SR04, with ECHO & TRIGGER soldered together. I believe you can get them in either 5 or 3.3V
                                          There are only 3 exposed pins on the SonOff SV, I need the other pins for other sensors.
                                          Would like to help you test this project, tried to sign up to GIT yesterday but all Usernames came back as in use, will try again.
                                          Two issues 1) AVR/EEPROM is not found, with PERSIST 0 & board ESP8266. 2) Don't know how to define HC-SR04 as a custom sensor, or can disguise it as another sensor type, with a PulseWidth.

                                          Great job

                                          U 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