Need help with NODEMANAGER_CONDITIONAL_REPORT



  • Hi all,

    Is there anyone that can post an example on how to use the conditional report function in Nodemanager (1.8)?

    I want to create a sht21 temperature sensor that reports only when the temperature is changed by 1.5 degrees.

    Any help welcome



  • 
    //Switch
      door.children.get(1)->setDescription("Heizung");
    
    //Lichtsensor
      ldr.children.get(1)->setValueDelta(1.1);
      ldr.children.get(1)->setUpdateLastValue(UPDATE_ON_SEND);
    
    //Temp Hum
      dht22.children.get(1)->setValueDelta(0.2); //temp
      dht22.children.get(1)->setUpdateLastValue(UPDATE_ON_SEND);
    
      dht22.children.get(2)->setValueDelta(0.5); //hum
      dht22.children.get(2)->setUpdateLastValue(UPDATE_ON_SEND);
    

    the lightsensor only reports when the value changed by 1.1

    To recognize this, the current value compared to the last reported value = UPDATE_ON_SEND



  • Great thanks a lot!


Log in to reply
 

Suggested Topics

  • 2
  • 1
  • 2
  • 2
  • 16
  • 2

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts