SetsleepSeconds is not a member of class NodeManager



  • Hello,

    since a few days I try out the new nodemanager version 1.7.
    so far everything works which I need very well, but when I try to set SetsleepSeconds I get the above error when compiling.
    i am using arduino ide 1.8.5 with current mysensors library and arduino mega 2560 r3 board
    the error occurs even with almost unchanged example sketch

    **********************************
     * 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
    
    // 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 node.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 modules for supported sensors
     */
    
    //#define USE_BATTERY
    //#define USE_SIGNAL
    //#define USE_CONFIGURATION
    //#define USE_ANALOG_INPUT
    //#define USE_THERMISTOR
    //#define USE_ML8511
    //#define USE_ACS712
    //#define USE_DIGITAL_INPUT
    //#define USE_DIGITAL_OUTPUT
    //#define USE_DHT
    //#define USE_SHT21
    //#define USE_INTERRUPT
    //#define USE_DS18B20
    //#define USE_BH1750
    //#define USE_MLX90614
    //#define USE_BME280
    //#define USE_BMP085_180
    //#define USE_BMP280
    //#define USE_SONOFF
    //#define USE_HCSR04
    //#define USE_MCP9808
    //#define USE_MQ
    //#define USE_MHZ19
    //#define USE_AM2320
    //#define USE_TSL2561
    //#define USE_PT100
    //#define USE_DIMMER
    //#define USE_PULSE_METER
    //#define USE_PMS
    //#define USE_VL53L0X
    //#define USE_SSD1306
    //#define USE_SHT31
    //#define USE_SI7021
    //#define USE_CHIRP
    //#define USE_HD44780
    //#define USE_TTP
    //#define USE_SERVO
    //#define USE_APDS9960
    //#define USE_NEOPIXEL
    
    /***********************************
     * 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 ON
    #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
     */
    
    // built-in sensors
    //SensorBattery battery(node);
    //SensorConfiguration configuration(node);
    //SensorSignal signal(node);
    //PowerManager power(5,6);
    
    // Attached sensors
    //SensorAnalogInput analog(node,A0);
    //SensorLDR ldr(node,A0);
    //SensorRain rain(node,A0);
    //SensorSoilMoisture soil(node,A0);
    //SensorThermistor thermistor(node,A0);
    //SensorML8511 ml8511(node,A0);
    //SensorACS712 acs712(node,A0);
    //SensorDigitalInput digitalIn(node,6);
    //SensorDigitalOutput digitalOut(node,6);
    //SensorRelay relay(node,6);
    //SensorLatchingRelay1Pin latching1pin(node,6);
    //SensorLatchingRelay2Pins latching2pins(node,6,7);
    //SensorDHT11 dht11(node,6);
    //SensorDHT22 dht22(node,6);
    //SensorSHT21 sht21(node);
    //SensorHTU21D htu21(node);
    //SensorInterrupt interrupt(node,3);
    //SensorDoor door(node,3);
    //SensorMotion motion(node,3);
    //SensorDs18b20 ds18b20(node,6);
    //SensorBH1750 bh1750(node);
    //SensorMLX90614 mlx90614(node);
    //SensorBME280 bme280(node);
    //SensorBMP085 bmp085(node);
    //SensorBMP180 bmp180(node);
    //SensorBMP280 bmp280(node);
    //SensorSonoff sonoff(node);
    //SensorHCSR04 hcsr04(node,6);
    //SensorMCP9808 mcp9808(node);
    //SensorMQ mq(node,A0);
    //SensorMHZ19 mhz19(node,6,7);
    //SensorAM2320 am2320(node);
    //SensorTSL2561 tsl2561(node);
    //SensorPT100 pt100(node,6);
    //SensorDimmer dimmer(node,3);
    //SensorRainGauge rainGauge(node,3);
    //SensorPowerMeter powerMeter(node,3);
    //SensorWaterMeter waterMeter(node,3);
    //SensorPlantowerPMS pms(node,6,7);
    //SensorVL53L0X vl53l0x(node,3);
    //DisplaySSD1306 ssd1306(node);
    //SensorSHT31 sht31(node);
    //SensorSI7021 si7021(node);
    //SensorChirp chirp(node);
    //DisplayHD44780 hd44780(node);
    //SensorTTP ttp(node);
    //SensorServo servo(node,6);
    //SensorAPDS9960 apds9960(node,3);
    //SensorNeopixel neopixel(node,6);
    
    /***********************************
     * Main Sketch
     */
    
    // before
    void before() {
      // setup the serial port baud rate
      Serial.begin(MY_BAUD_RATE);
      /*
      * Configure your sensors below
      */
      // report measures of every attached sensors every 10 seconds
      //node.setReportIntervalSeconds(10);
      // report measures of every attached sensors every 10 minutes
      //node.setReportIntervalMinutes(10);
      // set the node to sleep in 30 seconds cycles
      node.setSleepSeconds(30);
      // set the node to sleep in 5 minutes cycles
      //node.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
      //node.setPowerManager(power);
      /*
      * 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
    

    did I forget to set a setting or where could the problem lie?
    thank you for your effort?

    best regards
    Stefan



  • I kick myself 😑 ...gateway and sleep don't fit very well ...Problem solved!!!


  • Contest Winner

    @usernobody even if you're right, gateway and sleep do not fit very well, it should compile just fine. Do you have the compilation error to share? Thanks!


 

327
Online

7.8k
Users

8.7k
Topics

93.0k
Posts