Announcement

Collapse
No announcement yet.

Invalid / Error state check in EasyTrigger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invalid / Error state check in EasyTrigger

    Hi,

    Within the regular HS Event check there is the facility to trigger an event when a device has an Invalid/Error flag set to true. This typically gets set by the system when a device has not responded to a request in a timely manner, a poll request to the child device fixes it, or a resend.



    Click image for larger version

Name:	$3AFD481904C33DDC.jpg
Views:	22
Size:	39.8 KB
ID:	1288731

    The problem with this is that it is 'per device' so I was thinking if there is a way of using EasyTrigger's 'member of group' facility to trigger on the same Invalid/Error flag instead of just the value. Then there would be a single event using EasyTrigger instead of potentially hundreds.

    Hidden flag is &hs.DeviceInvalidValue(xxx)

    Thanks in advance,

    David

  • #2
    Daveyboy. I think that what you are looking for can be achieved with existing Easy Trigger functionality, though it may not have been obvious. The "error state" is usually just a single numeric value (or possibly a range of values) which you can find from the device's "Status Graphics" tab. What's missing is that Easy Trigger doesn't let you pick the value by the label shown on the Status Graphics page -- you have to enter the actual error value.

    So, let's say the Status Graphics tab shows that the error state for your device is the value 254. All you need to do is use Easy Trigger's "Any device's value in this group changes and becomes..." function and use the number "254".

    On the other hand, if your device's error is represented by a range, let's say 100-254, then you would use Easy Trigger's "Any device's value in this group had its value set and expression is true" and use an expression like: ($NEWVALUE > 99) || ($NEWVALUE < 255).

    I think this gets you want you want for the detection part.

    The more difficult part is to do the poll on the correct device. There you will need to use a script to do the polling and you will use the Easy Trigger global variables ETDeviceRef, ETDeviceName, ETDEviceLocation1, ETDeviceLocation2, ETDeviceValue and ETDeviceStatus to poll the device that caused the trigger. The use of these variables is further explained in the User Guide at Post #5, here: https://forums.homeseer.com/forum/ul...175#post864175

    So, in your Actions section you would use the "Run a Script or Script Command" function, check "Execute immediate script command" and use a script to act on ETDeviceRef. I think the following script works for Z-Wave devices:

    &nhs.PluginFunction("Z-Wave", "", "PollDevice", new Object(){hs.GetVar("etdeviceref")} )

    If the number of devices in the group isn't too large and you want to avoid scripting (or you have something that isn't Z-Wave and you can't figure out the script) you could also just do individual polls to all the devices whenever any one of them is put into an error state. Polling isn't that "expensive" in terms of processing time and this should be a rare occurrence anyway.

    Does this solve the problem?

    Comment


    • #3
      Originally posted by jvm View Post
      I think that what you are looking for can be achieved with existing Easy Trigger functionality, though it may not have been obvious. The "error state" is usually just a single numeric value (or possibly a range of values) which you can find from the device's "Status Graphics" tab. What's missing is that Easy Trigger doesn't let you pick the value by the label shown on the Status Graphics page -- you have to enter the actual error value.

      So, let's say the Status Graphics tab shows that the error state for your device is the value 254. All you need to do is use Easy Trigger's "Any device's value in this group changes and becomes..." function and use the number "254".
      Unfortunately z-wave devices that go to the Unknown state, do not have a special value associated with that "status". The device value/status will stay at whatever it was already. I've asked HS for this as an enhancement, but has not been implemented and don't believe there are plans to do so.
      HS 3.0.0.548: 1976 Devices 1156 Events
      Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

      Comment


      • #4
        Originally posted by sparkman View Post

        Unfortunately z-wave devices that go to the Unknown state, do not have a special value associated with that "status". The device value/status will stay at whatever it was already. I've asked HS for this as an enhancement, but has not been implemented and don't believe there are plans to do so.
        It seems this may be device dependent (or else there's a subtlety to the issue that I"m missing). For example, I have some Schlage door locks which have "Unknown" states for their "Power Management Notification" and "System Notification" sub-devices ( 254 = Unknown). I also have some Fibaro leak sensors which have an "Unknown" state for their "Water Notification" sub-devices (again, 254 = Unknown).

        So it seems the technique I outlined may work for at least some categories of devices. Or did I miss something in the problem?

        Comment


        • #5
          Yes indeed. There is a separate flag set by HS DeviceInvalidValue(xxx) - completely separate to the device values and the corresponding Status Graphics settings.

          My understanding is this value is set when a Z wave device is sent a command but HS doesn't receive a confirmation response from the device (due to sleep, timeout, congestion etc..etc). The value in HS remains the same as sparkman mentions above and would only change to the new value if a response is received from the device (99% of the time I hasten to add). HS then sets the DeviceInvalidValue(xxx) flag which incidentally can be search for using Jon00's DeviceViewer app.

          My request is how/if EasyTrigger could catch this hidden field as a Group based trigger in order that an action can be fired off to fix the issue. As mentioned in the OP native HS can do this, but it has to be configured for EVERY device, which is a ball ache.

          Comment


          • #6
            Daveyboy. Now I understand. Thanks. I never realized the Invalid / Error state referred to a separate flag -- I always though it was one of the enumerated Status Graphics states. Thanks for explaining.

            Comment

            Working...
            X