Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Flood Sensor Check-In ZWave Value Change


Theitprofessor
 Share

Question

For the Flood Sensor FGFS-101 ZW5 v3.4 do any of the ZWave values change even for a short period of time when the device checks in with my non Fibaro ZWave controller so I can write a program to notify me if the device has not checked when it should?  I'm trying to have my controller alert me of a possible malfunction, dead battery, or communication issue without me having to look at an app or physically run a test on each sensor.  I looked in the manual for something and couldn't find anything.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Z-Wave battery devices (with very rare exceptions) have a "Wake Up Interval" in seconds. Your gateway allows you to set that interval eg to 3600 s = 1 hour. Then each hour your " non Fibaro ZWave controller" gets a "Wake Up" command from the device. The Fibaro gateways apply a status called "dead" to a device when it misses 2 or 3 (cannot remember the exact number) intervals. In your example, if your Flood Sensor has no more battery power it would go "dead" after 2 ot 3 hours.

 

On 7/10/2022 at 9:10 PM, Theitprofessor said:

run a test on each sensor

You cannot send commands to a battery device (again ... with very rare exceptions...) but your controller may or might "queue" such command to the next wake up interval. That would be more or less an equivalent to just checking *if* the device wakes up.

 

However... It is purely a software decision...

 

I think your question is an ongoing discussion on the zwave-js bug tracker

 

Please login or register to see this link.

 

The summary of that is imho exactly what you are asking:

 

Please login or register to see this code.

 

Edited by petergebruers
Link to comment
Share on other sites

  • 0
  • Inquirer
  • OK, I don't think we are on the same page.  I'm more than familiar with how battery operated devices work.  Let me try to explain another way.  I'm not talking about the controller contacting the battery operated device.  I'm talking about when the battery operated device hits it's wake up period (I think the default is 6 hours) and reaches out to communicate to the controller.  In the direction of device --> controller.  When that happens it does a couple things, it checks for any parameter/configuration changes it may need to apply and also possibly may update some of the device zwave values stored in the controller.  These are the values I see...

    Basic Control = status of "0 through 255"

    Leak Detection Alarm = status of "on or off"

    Notification Sensor = two status conditions of battery level "0% through 100%" and responding "true or false"

    Home Security Alarm = status of "idle or tamper"

    Tamper Alarm = status of "on or off"

    Multilevel Sensor = temperature in Celsius = "any number value with 2 decimal places"

    Water Alarm = status of "idle or leak detected"

    My controller can run a program that can monitor all of these values via if-then-else programing built in.  What I'm looking for is one of these values changing when the device checks in every 6 hours.  I can create a state variable to start with like "1" and when the when the device checks in at 6 hours it just resets to "1".  If it doesn't check in I can increment the state variable by "1" to = "2" now and wait another 6 hours and so on.  In my program if the state variable ever reaches "5" (24 hours) I can trigger an email and/or sms and/or push message to let me know my device hasn't checked in for 24 hours and I should see what might be wrong with it.  It doesn't matter what it is at this point because the point of the notification is to let me know it's something and I can't rely on a leak detection while it's in the current condition.  If the check-in doesn't happen the first couple times but maybe does the 3rd, I can just reset the state variable back to "1" and we start the 24 hour clock all over again.  So what I'm looking for is one of those status values that changes even for a short period on my controller when the devices checks in or (reaches out to check for parameter changes).  After typing all of this now I think it might be the Notification Sensor responding true.  But I'm not sure if that happens on a normal check in or when some other event happens like a leak or temperature value outside of normal configured range or a tamper alarm happening.  I guess I could do a lot of trial and error to figure it out but it would be nice if the folks that built this stuff had it in the manual.

    • Like 1
    Link to comment
    Share on other sites

    • 0
    4 hours ago, Theitprofessor said:

    hits it's wake up period (I think the default is 6 hours) and reaches out to communicate to the controller. 

    All the device does is is send a "I am awake" to the controller. It only sends data if it has anything to say.

     

    But while it is awake, it can respond to GET requests from the controller. How, and if, your controller queues GET commands is not something I can answer without you telling me what software it uses.

     

    So the shortest possible dialag would be:

    - batt device -> controller: I am awake

    - conttoller -> batt device: Nothing more to say, go to sleep

     

    It is plausible that your controller asks for the battery level of the device

     

    - batt device -> controller: I am awake

    - controller -> batt device: GET battery

    - batt device -> controller: REPORT battery

    - controller -> batt device: Nothing more to say, go to sleep

     

    So setting the battery level (again, assuming your controller allows this) in its database to an implausible level might work (eg set it to 101 - if it changes to anything else the device has "checked in")

     

    4 hours ago, Theitprofessor said:

    My controller can run a program that can monitor all of these values via if-then-else programing built in. 

    If I understand you correctly, you could eg set temperature to an implausuble value eg 100 then see if it changes to a more reasonable one

     

    4 hours ago, Theitprofessor said:

    and when the when the device checks in at 6 hours it just resets to "1".

    IIRC the Z-Wave spec says that devices should ignore invalid values for parameters

     

    This might something for you to try, if your software allows setting parameters programatically

     

    I take a random example from the manual "1. Alarm cancellation delay - Delays flood alarm cancelation for the device after flooding has ceased. Available settings: 0 - 3 600 (in seconds, each 1s)

     

    This suggests that 4000 is an invalid value for parameter 1. I also expect your controller to do a GET after the parameter was set, because of that Z-Wave rule saying that he device may have ignored it.

     

    4 hours ago, Theitprofessor said:

    So what I'm looking for is one of those status values that changes even for a short period on my controller when the devices checks in

     

    Without further investigation, the safest thing to assume is that the devices wakes up and the controller sends it back to sleep asap, so there is no real exchange of data. I don't know what your "controller" has programmed in. It is possible that this particular device does something, but you / I really need Zniffer to investigate that.

     

    IMHO the only value that is kind of "periodic" is the temperature, but there is a catch: "10. Temperature measurement interval - New temperature value is reported to the main controller if it differs from the previously measured by hysteresis (defined in parameter 12).

     

    I can confirm, eg in my cellar, that the temperature is stable for many hours and this would not work.

     

    Does this help?

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • You gave me some things to think about.  Thank you.  Another point I'd like to make clear.  Everything I'm doing is all contained with in the controller.  Variable settings and all of that (in the controller)  Not one thing I'm doing in this program involves communicating "to" the device "from" the controller.  I'm also "not" trying to write to any of this battery device's parameters.  If I can somehow "listen" not "send" from the controller at the end of that 6 hour window when the device checks-in and my controller can recognize that happened, everything I need to do can all happen with-in the controller and I don't need anything else from the device.  I have some things I'm going to play around with and test.  Thanks again for your time.

    Link to comment
    Share on other sites

    • 0
    18 hours ago, Theitprofessor said:

    If I can somehow "listen" not "send" from the controller at the end of that 6 hour window

    Well, if that "controller" is e real Z-Wave controller, based on ZW500 or ZW700 and running the so called "serial protocol" - then this controller is rather "dumb" and will simply pass the "device is awake event" over its serial line.

     

    If you have access to that (raw) data, there is zero magic involved in detecting if the device woke up... It is a defined Z-Wave Command Class and in the development docs. There are no known exceptions to that wake up rhythm. A battery device does send this after each wake up interval .

     

    18 hours ago, Theitprofessor said:

    Not one thing I'm doing in this program involves communicating "to" the device "from" the controller.

     

    In fact, I do hope you or your controller or your gateway software DO send something: "Send device to sleep"

     

    If you only capture the "awake" message and do not send the "no more information" than the device will stay awake for a certain time. It is not specified in the spec IIRC but you can expect a battery device to stay awake for about 10 seconds.

     

    This is a waste of energy so good software should send a message to return the device to sleep ASAP.

     

    The other "send" option I have mentioned are there because it seems to me, you do not get any signal from your software layers that the device woke. What I am suggesting (eg change a parameter) are ways to circumvent this problem and make your controller "expose" the fact that it was able to communicate.

     

    You can find all the details in "Z-Wave Management Command Class Specification" document that can be downloaded from the Alliiance site

     

    Please login or register to see this link.

     

    Here is a picture of the Wake Up sequence

     

    Please login or register to see this attachment.

     

    When it comes to periodic reporting of sensors, there is only one spec and it says "the fastest a sensor can report is once every 30 seconds". It does not say "slowest" so IMHO periodic sensor reports cannot be 100% trusted to determine if a device is "alive"

     

    When it comes to determining if a battery device is still working, the only universal option is "Wake Up Notification"...

     

     

     

    • Like 1
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...