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.
  • M MHofer

    hello, I wanted to use the function for FEATURE_CONDITIONAL_REPORT for an LDR sensor but except a value when starting the arduino, no more values are transferred, must be configured for the function specifically something? Node manager 1.8dev

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

    @mhofer a few issues came out with conditional reporting during some recent tests, https://github.com/mysensors/NodeManager/pull/430 just merged into development should have solved them. Could you please give it a try? Thanks!

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

      Hello all, NodeManager v1.8 is almost ready and likewise with the previous releases I like to give brave users a few weeks to test it out before actually releasing it. If you are one of those, download it from https://github.com/mysensors/NodeManager/tree/development; for a full list of changes, have a look at https://github.com/mysensors/NodeManager/projects/2.

      Of course feel free to open a ticket on Github for any issue you could come across. Thanks!

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maddinthebrain
        wrote on last edited by maddinthebrain
        #187

        Re: 💬 NodeManager

        Hi @user2684,
        Hi all,

        First a great compliment for this work! This should make things just easy, but...
        It doesn't work for me. I have Ethernet Gateway and a 1wire Tempsensor node. Both flashed with the sketches from tutorials found on the mysensors.org website. Those are working without any problem.

        Now I have Tsl2561 Lux sensor. This is supported by nodemanager. Just downloaded the latest dev version uncommented two lines as expected, but it the node won't appear.

        The sketch looks as followed

        /*
        * The MySensors Arduino library handles the wireless radio link and protocol
        * between your home built sensors/actuators and HA controller of choice.
        * The sensors forms a self healing radio network with optional repeaters. Each
        * repeater and gateway builds a routing tables in EEPROM which keeps track of the
        * network topology allowing messages to be routed to nodes.
        *
        * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
        * Copyright (C) 2013-2017 Sensnology AB
        * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
        *
        * Documentation: http://www.mysensors.org
        * Support Forum: http://forum.mysensors.org
        *
        * This program is free software; you can redistribute it and/or
        * modify it under the terms of the GNU General Public License
        * version 2 as published by the Free Software Foundation.
        */
        
        /**************************
        Template
        
        This sketch can be used as a template since containing the most relevant MySensors library configuration settings, 
        NodeManager's settings, all its the supported sensors commented out and a sketch structure fully functional to operate with
        NodeManager. Just uncomment the settings you need and the sensors you want to add and configure the sensors in before()
        */
        
        /**********************************
         * MySensors node configuration
         */
        
        // General settings
        #define SKETCH_NAME "NodeManager"
        #define SKETCH_VERSION "1.0"
        //#define MY_DEBUG
        //#define MY_NODE_ID 99
        
        // NRF24 radio settings
        #define MY_RADIO_NRF24
        //#define MY_RF24_ENABLE_ENCRYPTION
        //#define MY_RF24_CHANNEL 125
        //#define MY_RF24_PA_LEVEL RF24_PA_HIGH
        //#define MY_DEBUG_VERBOSE_RF24
        //#define MY_RF24_DATARATE RF24_250KBPS
        
        // RFM69 radio settings
        //#define MY_RADIO_RFM69
        //#define MY_RFM69_FREQUENCY RFM69_433MHZ
        //#define MY_IS_RFM69HW
        //#define MY_RFM69_NEW_DRIVER
        //#define MY_RFM69_ENABLE_ENCRYPTION
        //#define MY_RFM69_NETWORKID 100
        //#define MY_DEBUG_VERBOSE_RFM69
        //#define MY_RF69_IRQ_PIN D1
        //#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN
        //#define MY_RF69_SPI_CS D2
        //#define MY_RFM69_ATC_MODE_DISABLED
        
        // RFM95 radio settings
        //#define MY_RADIO_RFM95
        //#define MY_RFM95_FREQUENCY (RFM95_868MHZ)
        //#define MY_DEBUG_VERBOSE_RFM95
        //#define MY_RFM95_MAX_POWER_LEVEL_DBM (20)
        //#define MY_RFM95_IRQ_PIN D1
        //#define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
        //#define MY_RFM95_CS_PIN D8
        
        // RS485 serial transport settings
        //#define MY_RS485
        //#define MY_RS485_BAUD_RATE 9600
        //#define MY_RS485_DE_PIN 2
        //#define MY_RS485_MAX_MESSAGE_LENGTH 40
        //#define MY_RS485_HWSERIAL Serial1
        
        // Message signing settings
        //#define MY_SIGNING_SOFT
        //#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
        //#define MY_SIGNING_REQUEST_SIGNATURES
        //#define MY_SIGNING_ATSHA204
        //#define MY_SIGNING_ATSHA204_PIN 4
        //#define MY_SIGNING_REQUEST_SIGNATURES
        
        // OTA Firmware update settings
        //#define MY_OTA_FIRMWARE_FEATURE
        //#define OTA_WAIT_PERIOD 300
        //#define FIRMWARE_MAX_REQUESTS 2
        //#define MY_OTA_RETRY 2
        
        // OTA debug output
        //#define MY_DEBUG_OTA (0)
        //#define MY_OTA_LOG_SENDER_FEATURE
        //#define MY_OTA_LOG_RECEIVER_FEATURE
        //#define MY_DEBUG_OTA_DISABLE_ACK
        
        // Advanced settings
        #define MY_BAUD_RATE 9600
        //#define MY_SMART_SLEEP_WAIT_DURATION_MS 500
        #define MY_SPLASH_SCREEN_DISABLED
        //#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
        //#define MY_SIGNAL_REPORT_ENABLED
        
        // Optimizations when running on 2032 Coin Cell. Also set nodeManager.setSleepBetweenSend(500) and run the board at 1Mhz
        //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
        //#define MY_TRANSPORT_WAIT_READY_MS  5000
        //#define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000
        //#define MY_PARENT_NODE_ID 0
        //#define MY_PARENT_NODE_IS_STATIC
        
        /**********************************
         * MySensors gateway configuration
         */
         
        // Common gateway settings
        //#define MY_REPEATER_FEATURE
        
        // Serial gateway settings
        //#define MY_GATEWAY_SERIAL
        
        // Ethernet gateway settings
        //#define MY_GATEWAY_W5100
        
        // ESP8266 gateway settings
        //#define MY_GATEWAY_ESP8266
        //#define MY_ESP8266_SSID ""
        //#define MY_ESP8266_PASSWORD ""
        
        // Gateway networking settings
        //#define MY_IP_ADDRESS 192,168,178,87
        //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
        //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
        //#define MY_PORT 5003
        //#define MY_GATEWAY_MAX_CLIENTS 2
        //#define MY_USE_UDP
        
        // Gateway MQTT settings
        //#define MY_GATEWAY_MQTT_CLIENT
        //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
        //#define MY_PORT 1883
        //#define MY_MQTT_USER "username"
        //#define MY_MQTT_PASSWORD "password"
        //#define MY_MQTT_CLIENT_ID "mysensors-1"
        //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
        //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
        
        // Gateway inclusion mode
        //#define MY_INCLUSION_MODE_FEATURE
        //#define MY_INCLUSION_BUTTON_FEATURE
        //#define MY_INCLUSION_MODE_DURATION 60
        //#define MY_DEFAULT_LED_BLINK_PERIOD 300
        
        // Gateway Leds settings
        //#define MY_DEFAULT_ERR_LED_PIN 4
        //#define MY_DEFAULT_RX_LED_PIN  5
        //#define MY_DEFAULT_TX_LED_PIN  6
        
        /***********************************
         * NodeManager configuration
         */
        
        #define NODEMANAGER_DEBUG ON
        #define NODEMANAGER_INTERRUPTS ON
        #define NODEMANAGER_SLEEP OFF
        #define NODEMANAGER_RECEIVE OFF
        #define NODEMANAGER_DEBUG_VERBOSE ON
        #define NODEMANAGER_POWER_MANAGER OFF
        #define NODEMANAGER_CONDITIONAL_REPORT OFF
        #define NODEMANAGER_EEPROM OFF
        #define NODEMANAGER_TIME OFF
        #define NODEMANAGER_RTC OFF
        #define NODEMANAGER_SD OFF
        #define NODEMANAGER_HOOKING OFF
        #define NODEMANAGER_OTA_CONFIGURATION OFF
        #define NODEMANAGER_SERIAL_INPUT OFF
        
        // import NodeManager library (a nodeManager object will be then made available)
        #include <MySensors_NodeManager.h>
        
        /***********************************
         * Add your sensors
         */
        
        //PowerManager power(5,6);
         
        //#include <sensors/SensorBattery.h>
        //SensorBattery battery;
        
        //#include <sensors/SensorConfiguration.h>
        //SensorConfiguration configuration;
        
        //#include <sensors/SensorSignal.h>
        //SensorSignal signal;
        
        //#include <sensors/SensorAnalogInput.h>
        //SensorAnalogInput analog(A0);
        
        //#include <sensors/SensorLDR.h>
        //SensorLDR ldr(A0);
        
        //#include <sensors/SensorRain.h>
        //SensorRain rain(A0);
        
        //#include <sensors/SensorSoilMoisture.h>
        //SensorSoilMoisture soil(A0);
        
        //#include <sensors/SensorThermistor.h>
        //SensorThermistor thermistor(A0);
        
        //#include <sensors/SensorML8511.h>
        //SensorML8511 ml8511(A0);
        
        //#include <sensors/SensorACS712.h>
        //SensorACS712 acs712(A0);
        
        //#include <sensors/SensorDigitalInput.h>
        //SensorDigitalInput digitalIn(6);
        
        //#include <sensors/SensorDigitalOutput.h>
        //SensorDigitalOutput digitalOut(6);
        
        //#include <sensors/SensorRelay.h>
        //SensorRelay relay(6);
        
        //#include <sensors/SensorLatchingRelay1Pin.h>
        //SensorLatchingRelay1Pin latching1pin(6);
        
        //#include <sensors/SensorLatchingRelay2Pins.h>
        //SensorLatchingRelay2Pins latching2pins(6,7);
        
        //#include <sensors/SensorDHT11.h>
        //SensorDHT11 dht11(6);
        
        //#include <sensors/SensorDHT22.h>
        //SensorDHT22 dht22(6);
        
        //#include <sensors/SensorSHT21.h>
        //SensorSHT21 sht21;
        
        //#include <sensors/SensorHTU21D.h>
        //SensorHTU21D htu21;
        
        //#include <sensors/SensorInterrupt.h>
        //SensorInterrupt interrupt(3);
        
        //#include <sensors/SensorDoor.h>
        //SensorDoor door(3);
        
        //#include <sensors/SensorMotion.h>
        //SensorMotion motion(3);
        
        //#include <sensors/SensorDs18b20.h>
        //SensorDs18b20 ds18b20(6);
        
        //#include <sensors/SensorBH1750.h>
        //SensorBH1750 bh1750;
        
        //#include <sensors/SensorMLX90614.h>
        //SensorMLX90614 mlx90614;
        
        //#include <sensors/SensorBME280.h>
        //SensorBME280 bme280;
        
        //#include <sensors/SensorBMP085.h>
        //SensorBMP085 bmp085;
        
        //#include <sensors/SensorBMP180.h>
        //SensorBMP180 bmp180;
        
        //#include <sensors/SensorBMP280.h>
        //SensorBMP280 bmp280;
        
        //#include <sensors/SensorSonoff.h>
        //SensorSonoff sonoff;
        
        //#include <sensors/SensorHCSR04.h>
        //SensorHCSR04 hcsr04(6,7);
        
        //#include <sensors/SensorMCP9808.h>
        //SensorMCP9808 mcp9808;
        
        //#include <sensors/SensorMQ.h>
        //SensorMQ mq(A0);
        
        //#include <sensors/SensorMHZ19.h>
        //SensorMHZ19 mhz19(6,7);
        
        //#include <sensors/SensorAM2320.h>
        //SensorAM2320 am2320;
        
        #include <sensors/SensorTSL2561.h>
        SensorTSL2561 tsl2561;
        
        //#include <sensors/SensorPT100.h>
        //SensorPT100 pt100(6);
        
        //#include <sensors/SensorDimmer.h>
        //SensorDimmer dimmer(3);
        
        //#include <sensors/SensorRainGauge.h>
        //SensorRainGauge rainGauge(3);
        
        //#include <sensors/SensorPowerMeter.h>
        //SensorPowerMeter powerMeter(3);
        
        //#include <sensors/SensorWaterMeter.h>
        //SensorWaterMeter waterMeter(3);
        
        //#include <sensors/SensorPlantowerPMS.h>
        //SensorPlantowerPMS pms(6,7);
        
        //#include <sensors/SensorVL53L0X.h>
        //SensorVL53L0X vl53l0x(3);
        
        //#include <sensors/DisplaySSD1306.h>
        //DisplaySSD1306 ssd1306;
        
        //#include <sensors/SensorSHT31.h>
        //SensorSHT31 sht31;
        
        //#include <sensors/SensorSI7021.h>
        //SensorSI7021 si7021;
        
        //#include <sensors/SensorChirp.h>
        //SensorChirp chirp;
        
        //#include <sensors/DisplayHD44780.h>
        //DisplayHD44780 hd44780;
        
        //#include <sensors/SensorTTP.h>
        //SensorTTP ttp;
        
        //#include <sensors/SensorServo.h>
        //SensorServo servo(6);
        
        //#include <sensors/SensorAPDS9960.h>
        //SensorAPDS9960 apds9960(3);
        
        //#include <sensors/SensorNeopixel.h>
        //SensorNeopixel neopixel(6);
        
        //#include <sensors/SensorSDS011.h>
        //SensorSDS011 sds011(6,7);
        
        //#include <sensors/SensorFPM10A.h>
        //SensorFPM10A fpm10a(4,5);
        
        //#include <sensors/SensorPH.h>
        //SensorPH ph(A0);
        
        //#include <sensors/SensorPca9685W.h>
        //SensorPca9685W pca9685W;
        
        //#include <sensors/SensorPca9685Rgb.h>
        //SensorPca9685Rgb pca9685Rgb;
        
        //#include <sensors/SensorPca9685Rgbw.h>
        //SensorPca9685Rgbw pca9685Rgbw;
        
        //#include <sensors/SensorDSM501A.h>
        //SensorDSM501A DSM501A;
        
        //#include <sensors/SensorPN532.h>
        //SensorPN532 pn532;
        
        //#include <sensors/SensorCCS811.h>
        //SensorCCS811 ccs811;
        
        //#include <sensors/SensorGSM.h>
        //SensorGSM gsm(6,7);
        
        /***********************************
         * Main Sketch
         */
        
        // before
        void before() {
        	
          /***********************************
           * Configure your sensors
           */
           
          // report measures of every attached sensors every 10 seconds
          nodeManager.setReportIntervalSeconds(10);
          // report measures of every attached sensors every 10 minutes
          //nodeManager.setReportIntervalMinutes(10);
          // set the node to sleep in 30 seconds cycles
          //nodeManager.setSleepSeconds(30);
          // set the node to sleep in 5 minutes cycles
          //nodeManager.setSleepMinutes(5);
          // report battery level every 10 minutes
          //battery.setReportIntervalMinutes(10);
          // set an offset to -1 to a thermistor sensor
          //thermistor.setOffset(-1);
          // change the id of a the first child of a sht21 sensor
          //sht21.children.get(1)->setChildId(5);
          // report only when the analog value is above 40%
          //analog.children.get(1)->setMinThreshold(40);
          // power all the nodes through dedicated pins
          //nodeManager.setPowerManager(power);
        
          // call NodeManager before routine
          nodeManager.before();
        }
        
        // presentation
        void presentation() {
          // call NodeManager presentation routine
          nodeManager.presentation();
        }
        
        // setup
        void setup() {
          // call NodeManager setup routine
          nodeManager.setup();
        }
        
        // loop
        void loop() {
          // call NodeManager loop routine
          nodeManager.loop();
        }
        
        #if NODEMANAGER_RECEIVE == ON
        // receive
        void receive(const MyMessage &message) {
          // call NodeManager receive routine
          nodeManager.receive(message);
        }
        #endif
        
        #if NODEMANAGER_TIME == ON
        // receiveTime
        void receiveTime(unsigned long ts) {
          // call NodeManager receiveTime routine
          nodeManager.receiveTime(ts);
        }
        #endif
        

        Now what's wrong, what's missing?

        Help is highly appreciated! Thanks

        Martin

        U 1 Reply Last reply
        0
        • A Offline
          A Offline
          alfredosc8
          wrote on last edited by alfredosc8
          #188

          Did same body the port on Intel Edison? Arduino IDE is not finding SerialPort.h ?

          1 Reply Last reply
          0
          • M maddinthebrain

            Re: 💬 NodeManager

            Hi @user2684,
            Hi all,

            First a great compliment for this work! This should make things just easy, but...
            It doesn't work for me. I have Ethernet Gateway and a 1wire Tempsensor node. Both flashed with the sketches from tutorials found on the mysensors.org website. Those are working without any problem.

            Now I have Tsl2561 Lux sensor. This is supported by nodemanager. Just downloaded the latest dev version uncommented two lines as expected, but it the node won't appear.

            The sketch looks as followed

            /*
            * The MySensors Arduino library handles the wireless radio link and protocol
            * between your home built sensors/actuators and HA controller of choice.
            * The sensors forms a self healing radio network with optional repeaters. Each
            * repeater and gateway builds a routing tables in EEPROM which keeps track of the
            * network topology allowing messages to be routed to nodes.
            *
            * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
            * Copyright (C) 2013-2017 Sensnology AB
            * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
            *
            * Documentation: http://www.mysensors.org
            * Support Forum: http://forum.mysensors.org
            *
            * This program is free software; you can redistribute it and/or
            * modify it under the terms of the GNU General Public License
            * version 2 as published by the Free Software Foundation.
            */
            
            /**************************
            Template
            
            This sketch can be used as a template since containing the most relevant MySensors library configuration settings, 
            NodeManager's settings, all its the supported sensors commented out and a sketch structure fully functional to operate with
            NodeManager. Just uncomment the settings you need and the sensors you want to add and configure the sensors in before()
            */
            
            /**********************************
             * MySensors node configuration
             */
            
            // General settings
            #define SKETCH_NAME "NodeManager"
            #define SKETCH_VERSION "1.0"
            //#define MY_DEBUG
            //#define MY_NODE_ID 99
            
            // NRF24 radio settings
            #define MY_RADIO_NRF24
            //#define MY_RF24_ENABLE_ENCRYPTION
            //#define MY_RF24_CHANNEL 125
            //#define MY_RF24_PA_LEVEL RF24_PA_HIGH
            //#define MY_DEBUG_VERBOSE_RF24
            //#define MY_RF24_DATARATE RF24_250KBPS
            
            // RFM69 radio settings
            //#define MY_RADIO_RFM69
            //#define MY_RFM69_FREQUENCY RFM69_433MHZ
            //#define MY_IS_RFM69HW
            //#define MY_RFM69_NEW_DRIVER
            //#define MY_RFM69_ENABLE_ENCRYPTION
            //#define MY_RFM69_NETWORKID 100
            //#define MY_DEBUG_VERBOSE_RFM69
            //#define MY_RF69_IRQ_PIN D1
            //#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN
            //#define MY_RF69_SPI_CS D2
            //#define MY_RFM69_ATC_MODE_DISABLED
            
            // RFM95 radio settings
            //#define MY_RADIO_RFM95
            //#define MY_RFM95_FREQUENCY (RFM95_868MHZ)
            //#define MY_DEBUG_VERBOSE_RFM95
            //#define MY_RFM95_MAX_POWER_LEVEL_DBM (20)
            //#define MY_RFM95_IRQ_PIN D1
            //#define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
            //#define MY_RFM95_CS_PIN D8
            
            // RS485 serial transport settings
            //#define MY_RS485
            //#define MY_RS485_BAUD_RATE 9600
            //#define MY_RS485_DE_PIN 2
            //#define MY_RS485_MAX_MESSAGE_LENGTH 40
            //#define MY_RS485_HWSERIAL Serial1
            
            // Message signing settings
            //#define MY_SIGNING_SOFT
            //#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
            //#define MY_SIGNING_REQUEST_SIGNATURES
            //#define MY_SIGNING_ATSHA204
            //#define MY_SIGNING_ATSHA204_PIN 4
            //#define MY_SIGNING_REQUEST_SIGNATURES
            
            // OTA Firmware update settings
            //#define MY_OTA_FIRMWARE_FEATURE
            //#define OTA_WAIT_PERIOD 300
            //#define FIRMWARE_MAX_REQUESTS 2
            //#define MY_OTA_RETRY 2
            
            // OTA debug output
            //#define MY_DEBUG_OTA (0)
            //#define MY_OTA_LOG_SENDER_FEATURE
            //#define MY_OTA_LOG_RECEIVER_FEATURE
            //#define MY_DEBUG_OTA_DISABLE_ACK
            
            // Advanced settings
            #define MY_BAUD_RATE 9600
            //#define MY_SMART_SLEEP_WAIT_DURATION_MS 500
            #define MY_SPLASH_SCREEN_DISABLED
            //#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
            //#define MY_SIGNAL_REPORT_ENABLED
            
            // Optimizations when running on 2032 Coin Cell. Also set nodeManager.setSleepBetweenSend(500) and run the board at 1Mhz
            //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
            //#define MY_TRANSPORT_WAIT_READY_MS  5000
            //#define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000
            //#define MY_PARENT_NODE_ID 0
            //#define MY_PARENT_NODE_IS_STATIC
            
            /**********************************
             * MySensors gateway configuration
             */
             
            // Common gateway settings
            //#define MY_REPEATER_FEATURE
            
            // Serial gateway settings
            //#define MY_GATEWAY_SERIAL
            
            // Ethernet gateway settings
            //#define MY_GATEWAY_W5100
            
            // ESP8266 gateway settings
            //#define MY_GATEWAY_ESP8266
            //#define MY_ESP8266_SSID ""
            //#define MY_ESP8266_PASSWORD ""
            
            // Gateway networking settings
            //#define MY_IP_ADDRESS 192,168,178,87
            //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
            //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
            //#define MY_PORT 5003
            //#define MY_GATEWAY_MAX_CLIENTS 2
            //#define MY_USE_UDP
            
            // Gateway MQTT settings
            //#define MY_GATEWAY_MQTT_CLIENT
            //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
            //#define MY_PORT 1883
            //#define MY_MQTT_USER "username"
            //#define MY_MQTT_PASSWORD "password"
            //#define MY_MQTT_CLIENT_ID "mysensors-1"
            //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
            //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
            
            // Gateway inclusion mode
            //#define MY_INCLUSION_MODE_FEATURE
            //#define MY_INCLUSION_BUTTON_FEATURE
            //#define MY_INCLUSION_MODE_DURATION 60
            //#define MY_DEFAULT_LED_BLINK_PERIOD 300
            
            // Gateway Leds settings
            //#define MY_DEFAULT_ERR_LED_PIN 4
            //#define MY_DEFAULT_RX_LED_PIN  5
            //#define MY_DEFAULT_TX_LED_PIN  6
            
            /***********************************
             * NodeManager configuration
             */
            
            #define NODEMANAGER_DEBUG ON
            #define NODEMANAGER_INTERRUPTS ON
            #define NODEMANAGER_SLEEP OFF
            #define NODEMANAGER_RECEIVE OFF
            #define NODEMANAGER_DEBUG_VERBOSE ON
            #define NODEMANAGER_POWER_MANAGER OFF
            #define NODEMANAGER_CONDITIONAL_REPORT OFF
            #define NODEMANAGER_EEPROM OFF
            #define NODEMANAGER_TIME OFF
            #define NODEMANAGER_RTC OFF
            #define NODEMANAGER_SD OFF
            #define NODEMANAGER_HOOKING OFF
            #define NODEMANAGER_OTA_CONFIGURATION OFF
            #define NODEMANAGER_SERIAL_INPUT OFF
            
            // import NodeManager library (a nodeManager object will be then made available)
            #include <MySensors_NodeManager.h>
            
            /***********************************
             * Add your sensors
             */
            
            //PowerManager power(5,6);
             
            //#include <sensors/SensorBattery.h>
            //SensorBattery battery;
            
            //#include <sensors/SensorConfiguration.h>
            //SensorConfiguration configuration;
            
            //#include <sensors/SensorSignal.h>
            //SensorSignal signal;
            
            //#include <sensors/SensorAnalogInput.h>
            //SensorAnalogInput analog(A0);
            
            //#include <sensors/SensorLDR.h>
            //SensorLDR ldr(A0);
            
            //#include <sensors/SensorRain.h>
            //SensorRain rain(A0);
            
            //#include <sensors/SensorSoilMoisture.h>
            //SensorSoilMoisture soil(A0);
            
            //#include <sensors/SensorThermistor.h>
            //SensorThermistor thermistor(A0);
            
            //#include <sensors/SensorML8511.h>
            //SensorML8511 ml8511(A0);
            
            //#include <sensors/SensorACS712.h>
            //SensorACS712 acs712(A0);
            
            //#include <sensors/SensorDigitalInput.h>
            //SensorDigitalInput digitalIn(6);
            
            //#include <sensors/SensorDigitalOutput.h>
            //SensorDigitalOutput digitalOut(6);
            
            //#include <sensors/SensorRelay.h>
            //SensorRelay relay(6);
            
            //#include <sensors/SensorLatchingRelay1Pin.h>
            //SensorLatchingRelay1Pin latching1pin(6);
            
            //#include <sensors/SensorLatchingRelay2Pins.h>
            //SensorLatchingRelay2Pins latching2pins(6,7);
            
            //#include <sensors/SensorDHT11.h>
            //SensorDHT11 dht11(6);
            
            //#include <sensors/SensorDHT22.h>
            //SensorDHT22 dht22(6);
            
            //#include <sensors/SensorSHT21.h>
            //SensorSHT21 sht21;
            
            //#include <sensors/SensorHTU21D.h>
            //SensorHTU21D htu21;
            
            //#include <sensors/SensorInterrupt.h>
            //SensorInterrupt interrupt(3);
            
            //#include <sensors/SensorDoor.h>
            //SensorDoor door(3);
            
            //#include <sensors/SensorMotion.h>
            //SensorMotion motion(3);
            
            //#include <sensors/SensorDs18b20.h>
            //SensorDs18b20 ds18b20(6);
            
            //#include <sensors/SensorBH1750.h>
            //SensorBH1750 bh1750;
            
            //#include <sensors/SensorMLX90614.h>
            //SensorMLX90614 mlx90614;
            
            //#include <sensors/SensorBME280.h>
            //SensorBME280 bme280;
            
            //#include <sensors/SensorBMP085.h>
            //SensorBMP085 bmp085;
            
            //#include <sensors/SensorBMP180.h>
            //SensorBMP180 bmp180;
            
            //#include <sensors/SensorBMP280.h>
            //SensorBMP280 bmp280;
            
            //#include <sensors/SensorSonoff.h>
            //SensorSonoff sonoff;
            
            //#include <sensors/SensorHCSR04.h>
            //SensorHCSR04 hcsr04(6,7);
            
            //#include <sensors/SensorMCP9808.h>
            //SensorMCP9808 mcp9808;
            
            //#include <sensors/SensorMQ.h>
            //SensorMQ mq(A0);
            
            //#include <sensors/SensorMHZ19.h>
            //SensorMHZ19 mhz19(6,7);
            
            //#include <sensors/SensorAM2320.h>
            //SensorAM2320 am2320;
            
            #include <sensors/SensorTSL2561.h>
            SensorTSL2561 tsl2561;
            
            //#include <sensors/SensorPT100.h>
            //SensorPT100 pt100(6);
            
            //#include <sensors/SensorDimmer.h>
            //SensorDimmer dimmer(3);
            
            //#include <sensors/SensorRainGauge.h>
            //SensorRainGauge rainGauge(3);
            
            //#include <sensors/SensorPowerMeter.h>
            //SensorPowerMeter powerMeter(3);
            
            //#include <sensors/SensorWaterMeter.h>
            //SensorWaterMeter waterMeter(3);
            
            //#include <sensors/SensorPlantowerPMS.h>
            //SensorPlantowerPMS pms(6,7);
            
            //#include <sensors/SensorVL53L0X.h>
            //SensorVL53L0X vl53l0x(3);
            
            //#include <sensors/DisplaySSD1306.h>
            //DisplaySSD1306 ssd1306;
            
            //#include <sensors/SensorSHT31.h>
            //SensorSHT31 sht31;
            
            //#include <sensors/SensorSI7021.h>
            //SensorSI7021 si7021;
            
            //#include <sensors/SensorChirp.h>
            //SensorChirp chirp;
            
            //#include <sensors/DisplayHD44780.h>
            //DisplayHD44780 hd44780;
            
            //#include <sensors/SensorTTP.h>
            //SensorTTP ttp;
            
            //#include <sensors/SensorServo.h>
            //SensorServo servo(6);
            
            //#include <sensors/SensorAPDS9960.h>
            //SensorAPDS9960 apds9960(3);
            
            //#include <sensors/SensorNeopixel.h>
            //SensorNeopixel neopixel(6);
            
            //#include <sensors/SensorSDS011.h>
            //SensorSDS011 sds011(6,7);
            
            //#include <sensors/SensorFPM10A.h>
            //SensorFPM10A fpm10a(4,5);
            
            //#include <sensors/SensorPH.h>
            //SensorPH ph(A0);
            
            //#include <sensors/SensorPca9685W.h>
            //SensorPca9685W pca9685W;
            
            //#include <sensors/SensorPca9685Rgb.h>
            //SensorPca9685Rgb pca9685Rgb;
            
            //#include <sensors/SensorPca9685Rgbw.h>
            //SensorPca9685Rgbw pca9685Rgbw;
            
            //#include <sensors/SensorDSM501A.h>
            //SensorDSM501A DSM501A;
            
            //#include <sensors/SensorPN532.h>
            //SensorPN532 pn532;
            
            //#include <sensors/SensorCCS811.h>
            //SensorCCS811 ccs811;
            
            //#include <sensors/SensorGSM.h>
            //SensorGSM gsm(6,7);
            
            /***********************************
             * Main Sketch
             */
            
            // before
            void before() {
            	
              /***********************************
               * Configure your sensors
               */
               
              // report measures of every attached sensors every 10 seconds
              nodeManager.setReportIntervalSeconds(10);
              // report measures of every attached sensors every 10 minutes
              //nodeManager.setReportIntervalMinutes(10);
              // set the node to sleep in 30 seconds cycles
              //nodeManager.setSleepSeconds(30);
              // set the node to sleep in 5 minutes cycles
              //nodeManager.setSleepMinutes(5);
              // report battery level every 10 minutes
              //battery.setReportIntervalMinutes(10);
              // set an offset to -1 to a thermistor sensor
              //thermistor.setOffset(-1);
              // change the id of a the first child of a sht21 sensor
              //sht21.children.get(1)->setChildId(5);
              // report only when the analog value is above 40%
              //analog.children.get(1)->setMinThreshold(40);
              // power all the nodes through dedicated pins
              //nodeManager.setPowerManager(power);
            
              // call NodeManager before routine
              nodeManager.before();
            }
            
            // presentation
            void presentation() {
              // call NodeManager presentation routine
              nodeManager.presentation();
            }
            
            // setup
            void setup() {
              // call NodeManager setup routine
              nodeManager.setup();
            }
            
            // loop
            void loop() {
              // call NodeManager loop routine
              nodeManager.loop();
            }
            
            #if NODEMANAGER_RECEIVE == ON
            // receive
            void receive(const MyMessage &message) {
              // call NodeManager receive routine
              nodeManager.receive(message);
            }
            #endif
            
            #if NODEMANAGER_TIME == ON
            // receiveTime
            void receiveTime(unsigned long ts) {
              // call NodeManager receiveTime routine
              nodeManager.receiveTime(ts);
            }
            #endif
            

            Now what's wrong, what's missing?

            Help is highly appreciated! Thanks

            Martin

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

            @maddinthebrain sorry for the huge delay...would you mind sharing the logs? Also feel free to open an issue on https://github.com/mysensors/NodeManager/issues with the logs. Thanks!

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

              Hello All, NodeManager v1.8 has just been released! I've opened up as usual a dedicated thread on the forum containing all the details of new release: https://forum.mysensors.org/topic/9944/nodemanager-v1-8-now-available

              1 Reply Last reply
              0
              • RPunktR Offline
                RPunktR Offline
                RPunkt
                wrote on last edited by RPunkt
                #191

                Question about PowerManger:
                I am a bit confused or I can't find the right information.
                I have an Ultrasonic sensor (SensorHCSR04) that needs to be only powered in case of measuring, due to power consumption.
                An the sensor needs to be switched on a time before the actual measuring starts.
                So my first approach was to switch the
                #define NODEMANAGER_POWER_MANAGER ON
                Then I set

                 nodeManager.setPowerPins(5,6,500)
                

                Where I a a bit surprised, why I need two pins (for vcc and ground)?
                At what logic level are the when the PowerManager switches to ON or OFF?
                Do I need to connect both pins, or is the vcc- connection enough?
                Anyway, somehow it did not work with me. It seemed, that the pins are not switched in that way, that pin5 goes to ground and pin 6 goes to 3,3 volt.
                So I found that thing :

                // power all the nodes through dedicated pins
                nodeManager.setPowerManager(power);
                

                But here is no timing possible.
                Am I missing something?

                U 1 Reply Last reply
                0
                • RPunktR RPunkt

                  Question about PowerManger:
                  I am a bit confused or I can't find the right information.
                  I have an Ultrasonic sensor (SensorHCSR04) that needs to be only powered in case of measuring, due to power consumption.
                  An the sensor needs to be switched on a time before the actual measuring starts.
                  So my first approach was to switch the
                  #define NODEMANAGER_POWER_MANAGER ON
                  Then I set

                   nodeManager.setPowerPins(5,6,500)
                  

                  Where I a a bit surprised, why I need two pins (for vcc and ground)?
                  At what logic level are the when the PowerManager switches to ON or OFF?
                  Do I need to connect both pins, or is the vcc- connection enough?
                  Anyway, somehow it did not work with me. It seemed, that the pins are not switched in that way, that pin5 goes to ground and pin 6 goes to 3,3 volt.
                  So I found that thing :

                  // power all the nodes through dedicated pins
                  nodeManager.setPowerManager(power);
                  

                  But here is no timing possible.
                  Am I missing something?

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

                  @rpunkt you don't necessarily need to use an additional pin for ground, just set the value to -1 in case you don't need it (https://github.com/mysensors/NodeManager/blob/master/nodemanager/PowerManager.cpp#L34). The logic is when PowerManager is set, at the end of a sleep cycle, the virtual vcc pin is set to HIGH and all the sensors' loop are executed, then is set back to LOW and board goes back to sleep.
                  To use it for all the sensors try just with:

                  #define NODEMANAGER_POWER_MANAGER ON
                  PowerManager power(5,6, 500);
                  nodeManager.setPowerManager(power);
                  

                  Also ensure the sensor can work with the limited current the arduino's pin is able to provide. Thanks

                  RPunktR 1 Reply Last reply
                  1
                  • U user2684

                    @rpunkt you don't necessarily need to use an additional pin for ground, just set the value to -1 in case you don't need it (https://github.com/mysensors/NodeManager/blob/master/nodemanager/PowerManager.cpp#L34). The logic is when PowerManager is set, at the end of a sleep cycle, the virtual vcc pin is set to HIGH and all the sensors' loop are executed, then is set back to LOW and board goes back to sleep.
                    To use it for all the sensors try just with:

                    #define NODEMANAGER_POWER_MANAGER ON
                    PowerManager power(5,6, 500);
                    nodeManager.setPowerManager(power);
                    

                    Also ensure the sensor can work with the limited current the arduino's pin is able to provide. Thanks

                    RPunktR Offline
                    RPunktR Offline
                    RPunkt
                    wrote on last edited by
                    #193

                    @user2684 Thanks for the advice. Now I got it running.:yum::pray:

                    1 Reply Last reply
                    1
                    • RPunktR Offline
                      RPunktR Offline
                      RPunkt
                      wrote on last edited by
                      #194

                      @user2684
                      Hello, it is me again. Going the next steps.
                      Now I want to operate another sensor (SensorVL53L0X).
                      this sensor should transmit the distance and the battery voltage every hour. in between it should sleep.
                      The normal reporting interval of the battery is once every hour
                      I set setReportIntervalHours(1); to report the sensor value.
                      But how do I set the node to sleep in between?
                      setSleepOrWait(True); and sleepBetweenSend(); ?
                      or
                      setSleepOrWait(True); and setSleepMinutes(60); ?
                      And is the NodeManager so clever that all the transmits are at the same time,
                      meaning once every hour the sensor value and the battery voltage is transmitted.

                      U 1 Reply Last reply
                      0
                      • RPunktR RPunkt

                        @user2684
                        Hello, it is me again. Going the next steps.
                        Now I want to operate another sensor (SensorVL53L0X).
                        this sensor should transmit the distance and the battery voltage every hour. in between it should sleep.
                        The normal reporting interval of the battery is once every hour
                        I set setReportIntervalHours(1); to report the sensor value.
                        But how do I set the node to sleep in between?
                        setSleepOrWait(True); and sleepBetweenSend(); ?
                        or
                        setSleepOrWait(True); and setSleepMinutes(60); ?
                        And is the NodeManager so clever that all the transmits are at the same time,
                        meaning once every hour the sensor value and the battery voltage is transmitted.

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

                        @rpunkt you just need to set setSleepMinutes() which will automatically put the board to sleep for the given timeframe. At the end of it, any sensor due to report at that time or before it, will do

                        RPunktR 1 Reply Last reply
                        0
                        • U user2684

                          @rpunkt you just need to set setSleepMinutes() which will automatically put the board to sleep for the given timeframe. At the end of it, any sensor due to report at that time or before it, will do

                          RPunktR Offline
                          RPunktR Offline
                          RPunkt
                          wrote on last edited by
                          #196

                          @user2684 Thanks a lot

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


                          14

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.0k

                          Posts


                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular