NodeManager v1.6-dev: comments and issues


  • Contest Winner

    This thread is intended to host any discussion related to the beta version of NodeManager v1.6 available at https://github.com/mysensors/NodeManager/tree/development



  • Hi,

    I just try to get the TSL2561 Sensor (i2C) working, but without success! The nomal Arduino example scetch works perfect, but it seems, that the sensor would not be not initialized within nodemanager or something like that ...

    Here my code:

    int myTSL2561 = nodeManager.registerSensor(SENSOR_TSL2561);
    ((SensorTSL2561*)nodeManager.getSensor(myTSL2561))->setAddress(TSL2561_ADDR_FLOAT);
    ((SensorTSL2561*)nodeManager.getSensor(myTSL2561))->setGain(TSL2561_GAIN_16X);
    ((SensorTSL2561*)nodeManager.getSensor(myTSL2561))->setTiming(TSL2561_INTEGRATIONTIME_101MS);
    ((SensorTSL2561*)nodeManager.getSensor(myTSL2561))->setSpectrum(TSL2561_VISIBLE);
    //nodeManager.registerSensor(SENSOR_BME280);

    I also tried with only theregister line (nodeManager.registerSensor(SENSOR_TSL2561);), but the same. The BME280 works fine (if enabled).

    what confuses me:

    why is the constructor like that -> SensorTSL2561::SensorTSL2561(NodeManager* node_manager, int child_id): Sensor(node_manager, child_id,A2) ???

    The TSL2561 is connected at A4,A5 because of i2c, but the constructor uses A2 ???

    serial output:

    REG I=1 P=16 P=16 T=37
    NodeManager v1.6-dev
    LIB V=2.1.1 R=N T=N A=A S=- B=-
    INT P=3 M=255
    INT P=2 M=255
    RADIO OK
    PRES I=200, T=23
    PRES I=201, T=30
    BATT V=3.45 P=100
    SEND D=0 I=201 C=0 T=38 S= I=0 F=3.45
    PRES I=1 T=16
    READY

    MY I=113 M=1
    TSL I=1 L=19
    SEND D=0 I=1 C=0 T=37 S= I=19 F=0.00
    SLEEP 600s

    Does anybody have a solution?

    Best regards

    Frank (Betonmoewe)


  • Contest Winner

    @betonmoewe thanks for reporting this issue. The A2 used is irrelevant since for i2c sensors, the pin provided is not used at all but has to be a valid pin. I may be wrong but I see a "19" reported. Is the issue about the wrong value or something different? Thanks



  • hi,

    yes, there is a value, but there is no output (presentation) of the value ... the bme sensor works perfect. Wy is this an "I" value and not a "F" like the other values?

    AWAKE
    TSL I=1 L=2521
    SEND D=0 I=1 C=1 T=37 S= I=2521 F=0.00
    BME I=2 T=24.76
    SEND D=0 I=2 C=1 T=0 S= I=0 F=24.76
    BME I=3 H=52.88
    SEND D=0 I=3 C=1 T=1 S= I=0 F=52.88
    BME I=4 P=1007.86
    SEND D=0 I=4 C=1 T=4 S= I=0 F=1007.86
    SLEEP 60s

    Best regards

    Frank (Betonmoewe)


  • Contest Winner

    @betonmoewe the way I read it is a message of type 37 (V_LEVEL) whose value is 2521 has been sent to the controller. S, I and F correspond to string, integer and float and depending on the sensor a value is set to only one of those. So your reported light level is 2521. The BME sensor reports float values so 24.76 is under F. Does it make sense? Thanks



  • okok ... my fault ... you are right LUX is int not float ...

    but no reading is send (I use fhem as reciever):

    2017-08-13 18:57:18 Global global ATTR MYSENSOR_113 mode node
    2017-08-13 18:57:18 Global global ATTR MYSENSOR_113 version 2.1.1
    2017-08-13 18:57:18 MYSENSORS_DEVICE MYSENSOR_113 parentId: 110
    2017-08-13 18:57:18 MYSENSORS_DEVICE MYSENSOR_113 SKETCH_NAME: MultiSensor_NM
    2017-08-13 18:57:19 MYSENSORS_DEVICE MYSENSOR_113 batterylevel: 100
    2017-08-13 18:57:19 MYSENSORS_DEVICE MYSENSOR_113 temperature2: 24.84
    2017-08-13 18:57:19 MYSENSORS_DEVICE MYSENSOR_113 humidity3: 50.85
    2017-08-13 18:57:19 MYSENSORS_DEVICE MYSENSOR_113 pressure4: 1007.90

    no brightness1 and I have no idea ...

    Best regards

    Betonmoewe


  • Contest Winner

    @betonmoewe mmm this is weird, as far as there is a:

    SEND D=0 I=1 C=1 T=37 S= I=2521 F=0.00
    

    should imply send() has been called successfully. Any chance to check debug output in the gateway to ensure messages are actually delivered? Thanks



  • I will try tomorrow ...

    thanks for your help !



  • ok ... if I change V_LEVEL to V_LIGHT_LEVEL in NodeManager.cpp, I got a reading ... strange

    By the way: I have a small problem with the BME Sensor: pressure and forecast have both the same ID

    mapReading_forecast4 4 forecast
    mapReading_pressure4 4 pressure

    is this correct?

    I have got a forcast reading only one time 😞

    Betonmoewe


  • Contest Winner

    @betonmoewe thanks, but according to https://www.mysensors.org/download/serial_api_20, V_LIGHT_LEVEL is for uncalibrated light level (0-100%) V_LEVEL for light level in lux. Anyway, glad you made it working for your setup.

    As for the duplicated child ID issue, this shouldn't happen (https://github.com/mysensors/NodeManager/blob/development/NodeManager.cpp#L3277). I wonder if you have reached the maximum number of child IDs, try increasing MAX_SENSORS (e.g. #define MAX_SENSORS 15) in your config.h. Thanks



  • FYI
    I already had report this in "https://forum.mysensors.org/topic/6534/nodemanager/100", but in that case I was already using V1.6-dev version.

    *ArduiSens 4 days ago

    @user2684, why does NodeManager take so many sketch memory?
    e.g.
    (#define BATTERY_MANAGER 1; #define DEBUG 1; #define MODULE_DS18B20 1)
    sketch NodeManager RS485 config for DS18B20 --> 28730 bytes (93%) of program storage space. Maximum is 30720 bytes.

    own sketch for RS485 SR04T --> 17078 bytes (55%) of program storage space. Maximum is 30720 bytes.

    OK, DS18B20 and SR04T are not the same but DS18B20 is less complex, so 38% more memory is pretty much.*



  • Hello,

    I see a problem when using setSleepSeconds / setPowerPins in combination with the serial RS485 option.

    void before() {
    // setup the serial port baud rate
    Serial.begin(MY_BAUD_RATE);
    nodeManager.setSleepSeconds(30);
    nodeManager.setPowerPins(11,12,1000);

    /*

    • Register below your sensors
      */
      nodeManager.registerSensor(SENSOR_DS18B20,3);

    gives a temperature value of 7368:
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=255,c=3,t=22,pt=5,l=4,sg=0:7368
    3;255;3;0;22;7368
    RECV S=3 I=255 C=3 T=22 P=


    void before() {
    // setup the serial port baud rate
    Serial.begin(MY_BAUD_RATE);
    nodeManager.setReportIntervalSeconds(50);

    /*

    • Register below your sensors
      */
      nodeManager.registerSensor(SENSOR_DS18B20,3);

    gives a correct value:
    0;255;3;0;9;TSF:MSG:READ,3-3-0,s=1,c=1,t=0,pt=7,l=5,sg=0:19.75
    3;1;1;0;0;19.75
    RECV S=3 I=1 C=1 T=0 P=


  • Contest Winner

    @ArduiSens thanks, I'll keep track about this issue issue with this https://github.com/mysensors/NodeManager/issues/210


  • Contest Winner

    @ArduiSens do you have the full logs to share for the setSleepSeconds / setPowerPins issue? because from what you have posted, that 3;255;3;0;22;7368 should be a heartbeat response not the value of the temperature. Thanks!


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 4
  • 2

59
Online

11.4k
Users

11.1k
Topics

112.7k
Posts