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

  • jvm
    replied
    How about a "That_Device" identifier which works on device groups. The idea is that if you have a group set to detect a change, such as "Any Device whose Type Is ... has a value set that is ...", then if the trigger occurs, you could use the "That Device" to reference the changed item. for example to process logic like . . .

    IF Any Device whose Type Is Z-Wave Batter has a value set that is not equal to 0
    AND THAT_DEVICE has a value less than X
    AND THAT_DEVICE has a value greater than Y
    AND THAT_DEVICE last changed value at time ....

    Leave a comment:


  • Wade
    replied
    Originally posted by rprade View Post
    That would absolutely work and could be a solution, but would be difficult due to the fact that I also add or subtract offsets to the minimum and maximum values based on the time of day and the devices I am controlling.
    .
    For example the angle of the sun will affect the luminance readings based upon the time of day - early morning and late evening sun generates a lower luminance reading, despite the fact that the perceived brightness might be the same. This is caused by the fact that the measuring device is pointing up and is actually a calculated value based on solar radiation. The solar radiation is greater when the sun is at a 90 degree angle to the sensor, than when it is at an oblique angle. I also add or subtract from the values for areas of the house that have different sun.
    Boy was I ever underthinking it. Thanks for the thorough explanation.
    Last edited by randy; September 20, 2018, 01:08 PM. Reason: Oops, meant to edit my original post for a typo

    Leave a comment:


  • randy
    replied
    Originally posted by cc4005 View Post

    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?
    That would absolutely work and could be a solution, but would be difficult due to the fact that I also add or subtract offsets to the minimum and maximum values based on the time of day and the devices I am controlling.

    For example the angle of the sun will affect the luminance readings based upon the time of day - early morning and late evening sun generates a lower luminance reading, despite the fact that the perceived brightness might be the same. This is caused by the fact that the measuring device is pointing up and is actually a calculated value based on solar radiation. The solar radiation is greater when the sun is at a 90 degree angle to the sensor, than when it is at an oblique angle. I also add or subtract from the values for areas of the house that have different sun.
    Last edited by randy; September 20, 2018, 01:06 PM.

    Leave a comment:


  • Wade
    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:


  • randy
    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:


  • randy
    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:


  • Wade
    replied
    Originally posted by rprade View Post
    Yes!

    classic CC

    Leave a comment:


  • randy
    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:

Working...
X