Reliability again



  • Since I don't want to hijack @ServiceXp thread I create a new one.

    I have executed the serial gateway for some weeks now and have had the following sensors connected:

    1. Node 1 with energy pulse meter, always sending every 20 sec
    2. Node 2 with light and temperature, always send every 30 sec
    3. Node 2 with DHT22 (temp and humidity), always send every 30 sec

    All of them ignored the previous value and always send. I log all events to file with timestamp and can see if they got to Vera3 in time of not.
    This led to slow-down of previously successful measurements from (1), probably from gateway's single thread handling. Changed (2) and (3) to only send changed values and (1) got almost 100% sends successful (a few took longer time).

    So I felt it being quite OK to implement in "production" so, on (1) I added two DS18B20 and on the desk and included them without any problem. Sure the temperature logged as it should but energy meter didn't because no sensor connected. Mounted them in a enclosure and everything mounted it at almost the same location as before.

    Then nothing except for the first message arrives and it seems to lock at (from Vera):

    50      09/14/14 21:28:04.096   luup_log:97: Arduino: Requesting status for: 1;1 <0x2ea2b680>
    50      09/14/14 21:28:04.096   luup_log:97: Arduino: Request status for Variable1 <0x2ea2b680>
    50      09/14/14 21:28:04.097   luup_log:97: Arduino: Sending: 1;1;1;0;24;330127 <0x2ea2b680>
    

    So I feel this being a lot time consuming (even though fun) but still would like to see it more stable.
    Should be mentioned that ALL other sensors stopped working when doing this change.

    I like this project a lot but even for a geek it can be too much problems based on invested time.

    I will get the stuff ready for my ethernet gateway as next step...


  • Admin

    @jocke4u said:

    Should be mentioned that ALL other sensors stopped working when doing this change.

    This is strange. @Yveaux could this be related to bugfix you've done in development? Sound like all sensors picks up the parent or id request response.



  • For correctness and to read the log the sensors have these Node/Child IDs

    • NodeID 1 with energy pulse meter (ChildID 1) and temperatures (ChildID 2 and 3), always sending every 20 sec
    • NodeID 2 with light (ChildID 0) and temperature (ChildID 1), send changed values every 30 sec
    • NodeID 4 with DHT22 i.e. temperature (ChildID 1) and humidity (ChildID 0), send changed values every 30 sec

    Attached log file from Vera3 where Vera3 was reloaded and gateway was stuck on "Sending: 1;1;1;0;24;331604" so Gateway was rebooted 11:47:07.468 and again stucked with the same.

    LuaUPnP.log


  • Admin

    What type of radio do you have on the gateway? Amplified? If yes, did you follow the troubleshoot page instruction and lowering the transmit power or feeding the radio with from some other source than the Nanos 3.3V output which might be insufficient at full power?

    Still doesn't explain the loss communication with the rest of the nodes you explained above (if your radio don't enter some weird state after power brownout).



  • @hek
    I have amplified version on both Gateway and this sensor (NodeID 1). Both have 47 uF capacitor. I have used RF24_PA_LOW explicitly before but with 1.4 that is the default but I now see it's only for gateway but sensors uses RF24_PA_MAX as default, right? I guess that is because most sensors doesn't use amplified version.
    Will change the sensor code to start with.

    I guess the other sensors stops working because gateway fails on sending Variable1 and hangs?!


  • Mod

    @hek I didn't fix that (yet) as we didn't agree on the solution yet 😉
    Let's finish that discussion then and fix this bug 👊



  • I had a similar problem.
    When the sensor node doesn't receive kWh from the gateway it "spams" the radio network with the kWh request. (Value 24)
    In my case all of the other senors also lost communication.
    If i set "boolean pcReceived = true;" it works.


  • Admin

    @JeJ
    Yes, thats it! A bug in the PulseSensor code.
    I will check in an updated version during the evening (CET). lastSend must be updated in loop().

     .....
     } else if (sendTime && !pcReceived) {
        // No count received. Try requesting it again
       gw.request(CHILD_ID, V_VAR1);
       lastSend=now;
     }
    .....

  • Admin

    Fix for this has been checked into master now.



  • Thanks guys. Nice catch. I also had this problem with the water version.



  • Can someone explain how to call gw.begin(); in a sensor to adjust the power level?

    I read the troubleshooting page but it wasn't clear how the parameters would look.

    When calling the function, do you have to call all the parameters or just the power level?

    gw.begin(RF24_PA_LOW); ?

    Is it the same for a gateway?


  • Admin

    The best place to set the power level is in MyConfig.h. You can set the channel, gateway power level and sensor power level. See https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MyConfig.h



  • Thanks @blacey . I was trying to configure it per sensor without having to remember to go in to the library each time.

    This works fine, though.



  • @hek
    Thanks for the fix.
    I have implemented it but still the gateway hangs when sending the requested KWH value to the sensor. Doesn't it have any timeout etc?

    I have also implemented the fix + lowered PA. Still not working.



  • @blacey said:

    The best place to set the power level is in MyConfig.h.

    I am not sure if I agree if you have different sensors with different hardware (as I have) since changing MyConfig.h will change it globally.

    @tbully
    I have used this code:

    gw.begin(incomingMessage, AUTO, false, AUTO, RF24_PA_LOW);
    

    Since the PA parameter is the fourth one, you need to set the ones before (but go with defaults for the ones after)


  • Admin

    @jocke4u said:

    I have implemented it but still the gateway hangs when sending the requested KWH value to the sensor.

    Strange. Is the sensor still "spamming" the gateway?



  • The fix certainly fixed the random "spamming" issue for me. I was tearing my hair out on that one.

    I have not had the hang yet but have only been running my water sensors (pulse, just like the power) for 4-5 days.



  • @hek said:

    Strange. Is the sensor still "spamming" the gateway?

    Damn, I made the fix but because of a stupid reason I uploaded the old version 😞
    I have now loaded a limited software with only EnergyPulseMeter, it partly works but I get too many "fail" when sending (even though many reaches GW).
    As next step I think I need to connect an external 5V power supply and AMS1117 to feed the radio and hopefully get better reliability in transmits.
    I guess no extra capacitor is needed due to 800mA max current?


  • Admin

    @jocke4u said:

    I have used this code:

    gw.begin(incomingMessage, AUTO, false, AUTO, RF24_PA_LOW);

    Since the PA parameter is the fourth one, you need to set the ones before (but go with defaults for the ones after)

    Yes, the MySensors configuration design is to set the unified configuration parameters in MyConfig.h to ensure common sensor configs (.e.g. channel) across sensors but then override on a per-sensor basis as needed.


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 1
  • 6
  • 6

45
Online

11.4k
Users

11.1k
Topics

112.6k
Posts