Announcement

Collapse
No announcement yet.

Max interval for "This device's value has NOT changed for exactly..."

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

  • Max interval for "This device's value has NOT changed for exactly..."

    Hi spud,

    Is there a maximum allowed interval for this trigger? I have a virtual device that I expect to change at least once a month, so I set the interval to 32 days, but see this in the log:

    Code:
    ERROR System.ArgumentException: '-2147483648' is not a valid value for 'Interval'. 'Interval' must be greater than 0. at System.Timers.Timer.set_Interval(Double value) at HSPI_EasyTrigger.EasyTriggerApp.RestartDeviceValueHasNotChangedTrigger(DeviceValueTrigger valueTrigger, Boolean forceRestart) at HSPI_EasyTrigger.EasyTriggerApp.AddDeviceValueToMonitor(strTrigActInfo trigInfo, Boolean isCondition) at HSPI_EasyTrigger.EasyTriggerApp.RefreshDeviceValueToMonitor()
    Thoughts?

    Thanks
    Al
    HS 3.0.0.548: 1976 Devices 1156 Events
    Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

  • #2
    Originally posted by sparkman View Post
    Hi spud,

    Is there a maximum allowed interval for this trigger? I have a virtual device that I expect to change at least once a month, so I set the interval to 32 days, but see this in the log:

    Code:
    ERROR System.ArgumentException: '-2147483648' is not a valid value for 'Interval'. 'Interval' must be greater than 0. at System.Timers.Timer.set_Interval(Double value) at HSPI_EasyTrigger.EasyTriggerApp.RestartDeviceValueHasNotChangedTrigger(DeviceValueTrigger valueTrigger, Boolean forceRestart) at HSPI_EasyTrigger.EasyTriggerApp.AddDeviceValueToMonitor(strTrigActInfo trigInfo, Boolean isCondition) at HSPI_EasyTrigger.EasyTriggerApp.RefreshDeviceValueToMonitor()
    Thoughts?

    Thanks
    Al
    What about setting an event to run once a day, checking the last changed time on the value... Then doing the calculation for number or days

    Sent from my SM-G950U using Tapatalk

    Comment


    • #3
      Originally posted by Ltek View Post
      What about setting an event to run once a day, checking the last changed time on the value... Then doing the calculation for number or days
      Thanks, yes, there are alternatives, so just trying to understand whether that limit is by design, or a bug.
      HS 3.0.0.548: 1976 Devices 1156 Events
      Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

      Comment


      • #4
        I wasn't aware of it but this is a limitation caused by the internal timers used by this trigger. The max value for such timer are 2147483647 ms, which is a little less than 25 days.
        I can't easily fix that, but I will try to add an error message when the value entered is out of range.

        Anyway note that these triggers are based on the plugin actually seeing a device value change (rather than based on the Last change value) and the timers are restarted when the plugin starts. So this would have not worked anyway if you restarted HS3 during this 32 days period.

        Comment


        • #5
          Originally posted by spud View Post
          I wasn't aware of it but this is a limitation caused by the internal timers used by this trigger. The max value for such timer are 2147483647 ms, which is a little less than 25 days.
          I can't easily fix that, but I will try to add an error message when the value entered is out of range.

          Anyway note that these triggers are based on the plugin actually seeing a device value change (rather than based on the Last change value) and the timers are restarted when the plugin starts. So this would have not worked anyway if you restarted HS3 during this 32 days period.
          Thanks spud, that is good to know that this trigger does not work over a HS restart. Are there other triggers in the plugin that also do not work over a restart? That may explain why some of my events don't fire when I expect them to.
          HS 3.0.0.548: 1976 Devices 1156 Events
          Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

          Comment


          • #6
            Seems like a pretty big HS3 design flaw, over oversight.

            It would be easy to persist across reboots and for no Time limit... A simple watchdog process and storing in variables would handle it.

            They should definitely be using the last update time (or last change) as the trigger

            Sent from my SM-G950U using Tapatalk

            Comment

            Working...
            X