Wrong Child ID in Vera Logs


  • Admin

    Hello,

    I am using version 1.3b3 and I'm having a strange issue with a binary child node. I have combined the binary sensor with the DHT temp/humidity sensor. The temp and humidity are working well but the binary sensor isn't updating correctly.

    After some testing it looks like the wrong child node is being sent to Vera. In the Arduino code I specified a Child ID of 2 but the it is showing up as 3 in the Vera logs. The strange thing is when I do the inclusion the correct child ID is created (2). Once the inclusion is finished and I monitor the logs it is using ID 3 instead of 2. Another strange thing is the logs aren't updated when the device is triggered, only when something else happens. So, for example, if I trigger the binary sensor it won't show up as triggered in Vera logs until another entry happens like a light switch is turned on or a PLEG action takes place.

    I have tried to completely remove the sensors from Vera, clear EEPROM then re-upload the code to the Arduino and include in Vera but that gave the same results. For some reason it wants to use ID 3 instead of 2.

    Here are a couple of screenshots of my sensor:
    upload-6e742df9-916d-47ac-8622-3b81e94403f0
    upload-861700cb-9ce3-4f89-86d0-1ce56ddf562a
    upload-7c7f5553-2359-48d2-aafc-0ca95d43d91c

    Here is a screenshot of the log:
    upload-3c235724-3ec8-4269-8b23-a70f0663d51a

    Here is my code in case anyone wants to see that.
    HumidityBedOccupancySensor.ino

    Has anyone experienced this before and do you know of a fix?

    Thanks,

    Pete


  • Admin

    Change

     gw.sendVariable(DIGITAL_INPUT_SENSOR, V_TRIPPED, value==0 ? "1" : "0");  
    

    To

     gw.sendVariable(CHILD_ID_OCCUPANCY, V_TRIPPED, value==0 ? "1" : "0");

  • Admin

    @hek And that is why I will never be a programmer... I must have looked at that code 4 times! Anyway, thanks! I'll change it tonight when I get home.

    Do you think it would be worth updating the example here: http://www.mysensors.org/build/binary to add a child id? I'm wondering if there may be other people out there that may make the same mistake as me.

    Thanks again for all you do. I love this stuff!


Log in to reply
 

Suggested Topics

14
Online

11.2k
Users

11.1k
Topics

112.5k
Posts