Announcement

Collapse
No announcement yet.

Easy Trigger plug-in - Feature Requests

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cc4005
    replied
    Originally posted by rprade View Post
    This is a specific use case, may not be worth the trouble.

    We use our weather station to report luminance. I am trying to use virtual devices to set the minimum and maximum measurement thresholds for determining low light. I want to use these virtual devices in all events as a comparison to the measurement for determining low light conditions. The Easy Trigger Comparison between 2 devices works well. In order to prevent triggering too rapidly, I want to make sure the measurement has been above the maximum and below the minimum for 5 minutes. The Easy Trigger Condition “This device has been in the range [x,y] for at least...” works great, bu I have no way of dynamically setting the x or y values. For minimum I want the value to be in the range of 0,<minimum virtual device> for at least 5 minutes.

    Could it be possible to use replacement variables or expressions for x and y in the range? I don’t really need the range comparison, offering another comparison condition of the “comparison being true for at least...” would work for any number of situations. E.G. IF {luminance} has been > {minimum virtual device} for at least 5 min? Or is there another obvious solution I am missing?
    I may be underthinking this but couldn't it be done pretty simply with "comparison becomes true", a retriggered timer, and an event triggered by the timer reaching 5 min? Or another virtual device switched on/off by the comparison and an event triggered by it's value being true for 5 minutes?

    Leave a comment:


  • rprade
    replied
    This is a specific use case, may not be worth the trouble.

    We use our weather station to report luminance. I am trying to use virtual devices to set the minimum and maximum measurement thresholds for determining low light. I want to use these virtual devices in all events as a comparison to the measurement for determining low light conditions. The Easy Trigger Comparison between 2 devices works well. In order to prevent triggering too rapidly, I want to make sure the measurement has been above the maximum and below the minimum for 5 minutes. The Easy Trigger Condition “This device has been in the range [x,y] for at least...” works great, bu I have no way of dynamically setting the x or y values. For minimum I want the value to be in the range of 0,<minimum virtual device> for at least 5 minutes.

    Could it be possible to use replacement variables or expressions for x and y in the range? I don’t really need the range comparison, offering another comparison condition of the “comparison being true for at least...” would work for any number of situations. E.G. IF {luminance} has been > {minimum virtual device} for at least 5 min? Or is there another obvious solution I am missing?

    Leave a comment:


  • ian351c
    replied
    Understood about the variables. My request is to break ETDeviceName into its constituent parts: dv.Name(), dv.Location(), and dv.Location2(). Right now ETDeviceName is all three of these concatenated together.

    Leave a comment:


  • rprade
    replied
    There are 4 global variables that were added in April, ETDeviceRef, ETDeviceName, ETDeviceValue and ETDeviceStatus. Read this post.

    With regard to device time, I agree. I would also like to see a Trigger “IF any/all devices in a group have been (equal, not equal, greater than, less than) for exactly...” and/or a Condition “AND IF any/all devices in a group have been (equal to, not equal to, greater than, less than) for at least...”.

    Leave a comment:


  • ian351c
    replied
    Hi Spud,

    I've been using your plugin for years and I appreciate all the work you put into it. If you don't mind I have a couple small requests based on already implemented features:

    It would be nice to have access to hs.DeviceTime() within EasyTrigger. I use this to check batteries in a script right now (based on inspirational code from rprade). Right now we can check if a devices value has changed within a time frame using EasyTrigger, but we can't see if the device was set within a time frame (even if the value did not change). I often see that the battery level for a device will stay at 100% until it is dead. So even though the value is set whenever the battery report comes in, it doesn't change. I currently use a script to poll my batteries and battery driven devices every so often and alert when one hasn't been set in a while.

    It would also be nice to have access to the individual dv.Name(), dv.Location(), and dv.Location2() variables when a group trigger occurs. This would give me more flexibility in how I format my alert messages without having to go to a script or use a bunch of events based on individual devices.

    Thanks!

    Ian

    Leave a comment:


  • spud
    replied
    Originally posted by BigBadBuzz View Post
    spud:

    Any reason why 3.0.0.50 is listed as "BETA BETA 3.0.0.50" in the updater? Must be a SPECIAL beta... : )

    Regards,
    BBB
    Fixed!

    Leave a comment:


  • BigBadBuzz
    replied
    spud:

    Any reason why 3.0.0.50 is listed as "BETA BETA 3.0.0.50" in the updater? Must be a SPECIAL beta... : )

    Regards,
    BBB

    Leave a comment:


  • spud
    replied
    version 3.0.0.50 is in the Beta section of the updater.

    here is an example of the new "This device had its value set and expression is true..." trigger that checks if the humidity has increased of at least 2%

    Click image for larger version  Name:	trigger_expression.png Views:	1 Size:	15.1 KB ID:	1243212

    Leave a comment:


  • spud
    replied
    in version 3.0.0.49 available here I have added the trigger "This device had its value set and expression is true..."
    Please test and let me know

    Leave a comment:


  • cc4005
    replied
    Originally posted by rprade View Post
    Yes!

    classic CC

    Leave a comment:


  • rprade
    replied
    Originally posted by spud View Post

    I think I'm going to add a more generic trigger that will allow you to use mathematical expression, so for example to check for an increasing value you would use something like that:

    Code:
    IF device's value is set and expression is true:
    device: my_device
    expression: $OLDVALUE < $NEWVALUE
    and it would also allow you to use more complex expression like

    Code:
    IF device's value is set and expression is true:
    device: my_device
    expression: ($NEWVALUE - $OLDVALUE) / $OLDVALUE > 0.05
    i.e value was increased by 5%
    Yes!

    Leave a comment:


  • bsobel
    replied
    Originally posted by spud View Post

    I think I'm going to add a more generic trigger that will allow you to use mathematical expression, so for example to check for an increasing value you would use something like that:

    Code:
    IF device's value is set and expression is true:
    device: my_device
    expression: $OLDVALUE < $NEWVALUE
    and it would also allow you to use more complex expression like

    Code:
    IF device's value is set and expression is true:
    device: my_device
    expression: ($NEWVALUE - $OLDVALUE) / $OLDVALUE > 0.05
    i.e value was increased by 5%
    Even better Thanks!

    Leave a comment:


  • spud
    replied
    Originally posted by bsobel View Post
    Spud, would you kindly consider adding two additional triggers under 'a devices value is':

    1) 'Increasing' if the new value set is higher than the prior value, at the time of a value change, this is true
    2) 'Decreasing' if the new value is lower than the prior value, at the time of a value change, this is true

    I use these in my existing system to fire some notification events on things such as the spa water temp is rising past 98 (triggers an announcement that the spa is ready, but doesn't trigger when dropping from 100 back down though 98 to cooler temps). I am migrating the logic over, and while I was tempted to right a quick PI to do this, I suspect it might be useful for others as well to be in a more well known common PI such as yours.

    Best
    Bill

    I think I'm going to add a more generic trigger that will allow you to use mathematical expression, so for example to check for an increasing value you would use something like that:

    Code:
    IF device's value is set and expression is true:
    device: my_device
    expression: $OLDVALUE < $NEWVALUE
    and it would also allow you to use more complex expression like

    Code:
    IF device's value is set and expression is true:
    device: my_device
    expression: ($NEWVALUE - $OLDVALUE) / $OLDVALUE > 0.05
    i.e value was increased by 5%

    Leave a comment:


  • spud
    replied
    Originally posted by wpiman View Post
    I'd am working on an event and it might be a good addition to this plugin...

    IF (EVENT NAME) has executed (X) Times within (Y TIME) then


    For example, someone comes to cut the lawn on Thursdays... he drives over the driveways sensors over and over and we are bombarded with messages.

    It would be great to say

    *IF DRIVEWAY ALARM EVENT has executed 3 TIMES within 2 MINUTES then
    and if today is thursday
    Run temporary squelch event

    where the trigger with the star is handled by the plugin...
    With the current HS API I don't think a plugin can be notified when an event is executed, so this feature is not possible to implement.

    Leave a comment:


  • bsobel
    replied
    Spud, would you kindly consider adding two additional triggers under 'a devices value is':

    1) 'Increasing' if the new value set is higher than the prior value, at the time of a value change, this is true
    2) 'Decreasing' if the new value is lower than the prior value, at the time of a value change, this is true

    I use these in my existing system to fire some notification events on things such as the spa water temp is rising past 98 (triggers an announcement that the spa is ready, but doesn't trigger when dropping from 100 back down though 98 to cooler temps). I am migrating the logic over, and while I was tempted to right a quick PI to do this, I suspect it might be useful for others as well to be in a more well known common PI such as yours.

    Best
    Bill


    Attached Files

    Leave a comment:

Working...
X