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

    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%

    Comment


      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!

      Comment


        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!

        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          Originally posted by rprade View Post
          Yes!

          classic CC
          -Wade

          Comment


            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

            Comment


              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

              Comment


                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

                Comment


                  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!

                  Comment


                    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

                    Comment


                      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...”.
                      HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        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.

                        Comment


                          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?
                          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            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,&lt;minimum virtual device&gt; 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 &gt; {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?
                            -Wade

                            Comment


                              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.
                              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                              Comment


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

                                Comment

                                Working...
                                X