Announcement

Collapse
No announcement yet.

Value NOT changed for exactly XX

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

    Value NOT changed for exactly XX

    Hi

    I hope for some help as im struggling with my recently purchased easy trigger plugin.

    My goal is to be notified if a device has not been updated within the last hour.

    I have set the trigger "The device value has NOT changed for exactly" to one hour.

    But i experience some unstability about the trigger (im triggering an email). It only trigger 1/3 -> 1/2 of the time. Am i doing something wrong, or maybe misunderstand the intention of the trigger. I cannot find much documentation about usage or other forum threads about the same issue.

    Can some of you help here ?

    Br. Jonas

    #2
    Originally posted by levring View Post
    Hi

    I hope for some help as im struggling with my recently purchased easy trigger plugin.

    My goal is to be notified if a device has not been updated within the last hour.

    I have set the trigger "The device value has NOT changed for exactly" to one hour.

    But i experience some unstability about the trigger (im triggering an email). It only trigger 1/3 -> 1/2 of the time. Am i doing something wrong, or maybe misunderstand the intention of the trigger. I cannot find much documentation about usage or other forum threads about the same issue.

    Can some of you help here ?

    Br. Jonas
    You need to make sure the devices Last Change is not being updated, even though the value may not change. In some cases a device can have its value set (changing the Last Change) but the value is not actually changed. This is true of many 3rd party plug-in controlled devices. HomeSeer has a configuration option on devices to prevent this. It is: "Do not update device last change time if device value does not change:".

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	57.2 KB
ID:	1197194
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Originally posted by rprade View Post
      You need to make sure the devices Last Change is not being updated
      it is currently unchecked as I receive multiple updates with same value, but that's okay the last update it being updated.. My issue is to monitor if a sensor eg. Is out of battery (no battery reporting), resulting in no updates every hour.

      /Jonas

      Comment


        #4
        Wouldn't you just create an event that reacts to battery level?

        Otherwise, create a timer and then one event that "restarts" the timer each time there is an update and another event that reacts to the timer exceeding a certain length of time (and then resets the timer so you get another alert same length of time later if no further updates).

        Comment


          #5
          Originally posted by Tillsy View Post
          Wouldn't you just create an event that reacts to battery level?
          As said.. I have no battery reporting on these devices, so unfortunately not an option.

          Originally posted by Tillsy View Post
          Otherwise, create a timer and then one event that "restarts" the timer each time there is an update and another event that reacts to the timer exceeding a certain length of time (and then resets the timer so you get another alert same length of time later if no further updates).
          This could work.. But I would prefer the easy trigger to work as (at least) i would expect.

          Comment


            #6
            Are there any conditions? If a condition was false right when the "exactly" trigger happens, it would probably get missed. Maybe post a screen shot of the event.

            Perhaps try "This device's value has NOT changed for at least...", then set "Cannot Re-Run For" in the event options. Then after that amount of time you will be reminded again if the problem hasn't been corrected.

            Comment


              #7
              I didn’t realize that you were only looking at the device being set rather than updated. Your Trigger should work reliably, so I am at a loss as to why it is intermittent.

              For a test, change your Trigger to be a recurring Trigger of every 5 minutes. Then use the Easy Trigger Condition “This device’s value has NOT changed for at least...”. This will cause the event to continually run as soon as the device has not changed for at least an hour. To stop the event from running away use the advanced options “Cannot Re-Run For:” and set it for the frequency you would like it to generate emails. Set it for 60 minutes and you will get an email once an hour until the device updates.

              Edit: I didn’t realize I had parroted most of David’s post above until I had finished.
              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

              Comment


                #8
                Code:
                Starting timer for "device value has NOT changed" trigger with interval=X ms

                Comment


                  #9
                  thank you for that input. I would expect the trigger to actually look at the last updated timestamp, and not a actual value change. But ill find a way around it.
                  Thanks

                  Comment


                    #10
                    Spud, what if you add a 'device has not been updated/set' option that uses the timestamp... If the device uses setting do not change timestamp unless the value changes - an option in HS3, I think?
                    Originally posted by spud View Post
                    Code:
                    Starting timer for "device value has NOT changed" trigger with interval=X ms
                    Sent from my SM-G950U using Tapatalk

                    Comment


                      #11
                      Originally posted by Ltek View Post
                      Spud, what if you add a 'device has not been updated/set' option that uses the timestamp... If the device uses setting do not change timestamp unless the value changes - an option in HS3, I think?
                      If that change is implemented, maybe call it "device TIMESTAMP has not been updated/set" for clarity?

                      Comment


                        #12
                        It occurs to me that a script I use might be of help. Here is the script
                        Code:
                        Sub Main(ByVal Parm As Object)
                        
                            Try
                                Dim ListOfDevices() As Integer = {280, 278, 270, 269, 137, 89, 136, 134, 122, 125, 134, 133, 124}
                        	'Boiler Supply, Boiler Return, BP S, BP R, LR S, LR R, MBR S, MBR R, RO S, RO R, MO S, MO R
                        
                                For Each Device As Integer In ListOfDevices
                        
                                    ' hs.writelog("DeviceLastChange", "Device Reference: " & Device & " Minutes Since Last Changed State: " & hs.DeviceTime(Device))
                        
                                    If hs.DeviceTime(Device) > 45 Then
                        
                                         hs.writelog("Sensor Error", “”& hs.DeviceName(Device) & " has not updated in over " & hs.DeviceTime(Device) & " minutes")
                        
                                        'do something here, trigger an event, send an email, make a warning sound etc
                        
                                    End If
                                Next
                        
                            Catch ex As Exception : hs.writelog("DeviceLastChange", "Error: " & ex.message)
                            End Try
                        
                        End Sub
                        It is not that sophisticated, but it checks all of my critical temperature probes for updates. There is an array of devices defined by their RefIDs at the top. The script loops through the Devices and if any of them have not changed in 45 minutes, it can do anything. You can use hs.TriggerEvent to run an Event, or generate a log entry as I do. I monitor the log and use log entries to generate Pushover messages or trigger an Event. You can replace the 45 with any value in minutes as appropriate. The commented out logging is just used for diagnostic purposes.

                        Since I only care about the temperature probes in low temperatures - they monitor water and hydronic pipe temperatures, I use this Event monitoring three separate outdoor temperature readings

                        Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	45.3 KB
ID:	1197242

                        Then use UltraLog monitoring to trigger this Event, sending a pushover message, since there is nothing to to do other than let me know there is a problem. Separate Events monitor the OWServers network connectivity and if the UltraOneWire3 plug-in is connected and running.

                        Click image for larger version

Name:	Capture1.PNG
Views:	1
Size:	32.7 KB
ID:	1197241
                        Last edited by randy; June 24, 2018, 04:21 PM.
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          A script is good; built-into Easy Trigger is better for many reasons


                          Taking this to a logical extension. Adding both:
                          'value has not changed for exactly X time'

                          'value has not changed for exactly X time from last change of Device ABC' (this provides sequence ability in Events)



                          Makes things a lot easier in many ways. Examples...


                          Motion detection for Occupancy - 'ET group' of motion sensors, none have changed in X period of Time


                          Motion detection for direction (sequencing) - Motion1 then Motion2 then... etc.


                          Also, predictive usage (thing happening in this sequence, so we do XYZ)

                          Door1 then Light1 then Light 2, etc

                          Comment

                          Working...
                          X