Announcement

Collapse
No announcement yet.

Event condition based on prior device status?

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

    Event condition based on prior device status?

    Hello,

    I just finshed converting from Vera to HomeSeer and I'm loving it. I'm trying to set up an event to dim a light to a certain level, only if the device was previously off. Is there a simple way to accomplish this?

    For example:
    If a light's state is now ON (or dim % between 1-99) and the light's prior state was OFF, then dim to 30%.

    I tried a few of the different options and can't get it to work correctly when the light is turned on at the switch. I think the issue is when I turn the light on manually, the state that makes it to HomeSeer is Dim X% which could vary. I tried using a range for Dim % 1-99, but then I can't change the dim level because it always triggers the event to revert to the 30% I set. Thoughts?

    #2
    To avoid having a headache try this plugin: http://www.mikemackonline.com/homese...ster_info.html


    Eman.
    TinkerLand : Life's Choices,"No One Size Fits All"

    Comment


      #3
      You can use a script with an event to do what you want. If you're interested in that, I can post an example. Alternately, there's a plugin called EasyTrigger in the Updater that I believe can do what you are looking for.

      Cheers
      Al
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        #4
        yep, the trigger called "This device's value was and becomes..." from the EasyTrigger plugin can do what you want:

        Click image for larger version

Name:	wasandbecomerange.png
Views:	1
Size:	5.9 KB
ID:	1184395

        http://board.homeseer.com/showthread.php?t=173836

        Comment


          #5
          Originally posted by ForSerious38 View Post
          Hello,

          I just finshed converting from Vera to HomeSeer and I'm loving it. I'm trying to set up an event to dim a light to a certain level, only if the device was previously off. Is there a simple way to accomplish this?

          For example:
          If a light's state is now ON (or dim % between 1-99) and the light's prior state was OFF, then dim to 30%.

          I tried a few of the different options and can't get it to work correctly when the light is turned on at the switch. I think the issue is when I turn the light on manually, the state that makes it to HomeSeer is Dim X% which could vary. I tried using a range for Dim % 1-99, but then I can't change the dim level because it always triggers the event to revert to the 30% I set. Thoughts?
          Humm, interesting question. You would think it's a simple matter of:
          IF "Device XXX changed to ON" then Dim device to 30%..

          Seems it's dependent on the dimmer you use, not the event (and maybe the driver (I'm using Zwave dimmers)). My Cooper dimmers don't always send an ON when first turned on so the event doesn't always trigger and they also like to send an ON when they reach 100%, so if someone brings it to full (100%), you'll get an ON and it will then dim to 30%

          You'll also need to throw in the additional confusion of HS controlling the device as well as any other Aux dimmers you may have connected to the primary dimmer..

          So you need logic that can somehow identify when a dimmer is first turned on, not dimming, ie up/down.. you would think that was easy, but I suspect not.
          Not sure how you'd even do it with a script, as you don't have access to the previous value, which is what you need to tell when it first turns on (was 0/OFF and now any value) without resorting to virtual devices or global variables.

          This might just be an oddity of my old Coopers as well.

          I'm curious to see what others can come up with, may it's obvious and I just haven't had enough coffee yet

          Z

          AND there it is ^

          Comment


            #6
            Originally posted by spud View Post
            yep, the trigger called "This device's value was and becomes..." from the EasyTrigger plugin can do what you want:

            [ATTACH]53743[/ATTACH]

            http://board.homeseer.com/showthread.php?t=173836
            Nice!
            Out of curiosity, how do you determine the previous value? is it part of the device structure?

            Z

            Comment


              #7
              Originally posted by vasrc View Post
              Nice!
              Out of curiosity, how do you determine the previous value? is it part of the device structure?

              Z
              when HS notifies a plugin with a value change, it passes the old and the new value.

              Comment


                #8
                Originally posted by spud View Post
                when HS notifies a plugin with a value change, it passes the old and the new value.
                Right. I should have know that since I use HSevent already... Those brain cells must have imploded last night. Old age sucks....

                Sorry for the noise,
                Z

                Comment


                  #9
                  Originally posted by ForSerious38 View Post

                  For example:
                  If a light's state is now ON (or dim % between 1-99) and the light's prior state was OFF, then dim to 30%.

                  I tried a few of the different options and can't get it to work correctly when the light is turned on at the switch. I think the issue is when I turn the light on manually, the state that makes it to HomeSeer is Dim X% which could vary. I tried using a range for Dim % 1-99, but then I can't change the dim level because it always triggers the event to revert to the 30% I set. Thoughts?
                  Your Switch must support instant status to work first of all
                  Try:
                  If device changes and becomes greater than OFF
                  AND IF device is OFF
                  Then set device dim 30%

                  Comment


                    #10
                    Originally posted by 519zwave View Post
                    Your Switch must support instant status to work first of all
                    Try:
                    If device changes and becomes greater than OFF
                    AND IF device is OFF
                    Then set device dim 30%
                    That won't work. If the trigger is true, the condition must be false. Spud's easy trigger is one solution, if you just want to set a default level from OFF. In the OP it was stated
                    Originally posted by ForSerious38
                    I tried a few of the different options and can't get it to work correctly when the light is turned on at the switch. I think the issue is when I turn the light on manually, the state that makes it to HomeSeer is Dim X% which could vary. I tried using a range for Dim % 1-99, but then I can't change the dim level because it always triggers the event to revert to the 30% I set. Thoughts?
                    which presents a second problem, how can you adjust the lights after they are on. Using the Easy Trigger trigger will allow adjustment after they are initially set. Here is how we solved the problem, it may provide some ideas.

                    I chose a series of events and a virtual device to solve the problem. We wanted to accomplish several things
                    • Set the dim level of a light when it is originally turned on
                    • Use different default levels depending on the time of day
                    • Allow override of the default level for local control
                    • Allow event control of the lighting without triggering the default level

                    Each light has a default level virtual device. For this example I will use our downstairs (basement) bathroom lights.



                    This virtual device allows me to control whether the dimmer defaults are applied or not.

                    The first event detects whether the light is turned on



                    I use the standard trigger provided with HomeSeer, but the Easy Trigger equivalent could be used. The Easy Trigger trigger could allow elimination of the virtual device, but it would not allow you to turn the light on from an event without the default level being applied. For that reason, I use a virtual device and the standard trigger. If the light is set to any level other than off and if the virtual device allowing a default level to be set is ON, the event branches out to three events that will determine the level the lights are set to. The three events are as follow





                    This set of events sets up the level to be used as a default for each time of the day. Each event uses an Easy Trigger schedule to determine the time of day applied to the condition. These schedules are set to begin and end at times based upon a certain amount of time each side of sunrise and sunset. These schedules are easy to change within Spud's plug-in and can be used throughout my event structure. Prior to using easy trigger, I used a "Twilight" virtual device that was controlled by additional events. The Easy Trigger scheduling is much easier and gives a nice graphical representation of the schedule.





                    All of my schedules are in one place and easy to edit




                    Only one of the three events can be true at any single time of day. The events also use the Dimmer Default device as a condition so that they can be called from other events such as motion controls. The last thing each of the three events do is to turn the Dimmer Default virtual device off.

                    The end result is that if the light is off and set to ANY level, the Default Level is applied. Any subsequent local adjustment can be done without triggering the Default Level events. The level can be adjusted at any time, when the light is turned off the last event is used




                    This event enables the Dimmer Default virtual device again when the light is turned OFF. This makes it ready to run again the next time the light is turned on.

                    Once the event structure was set up, I copied and edited the 5 events for the next lighting device and created a new virtual device. As I said above, when I control the lights from another event, I can directly call the three Default level events, or turn the Dimmer Default device off, then set the light to any level. Whenever the lights are turned off, whether locally or by an event, the Dimmer Default device is set to ON again to make the lights ready for the next round.
                    Last edited by randy; April 20, 2016, 08:51 PM.
                    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #11
                      Thanks for all the responses. The EasyTrigger plugin took care of what I needed.

                      Comment

                      Working...
                      X