Announcement

Collapse
No announcement yet.

Automated Lighting control...

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

    Automated Lighting control...

    Like most of you, I am seeking to do simple automated lighting control around the house. My experience with HS3 is that the event processing of this example is not significantly better than HS2. For example, it does not appear that this use case can be implemented via one event.

    Am I correct? Can this be done with one event and without a plugin? Seems that something this simple should be part of a smart home solution.

    If Motion changes to Violated
    then Remove Delayed Device Actions for Light
    then Turn Device On unless already on *** hint unless already on. Don't want to flood lighting signals
    then Set Device Light to 50% after delay of 15 Minutes
    then Set Device Light to off after delay of 5 minutes

    Thank you!
    HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

    #2
    Originally posted by Krumpy View Post
    Can this be done with one event and without a plugin?
    Not sure what you mean 'without a plugin'. You will need a plugin to interface to most motion sensors and a plugin to control the lights. I assume you mean no other plugins in addition to those. If so, then I think the answer is a qualified yes.
    The qualification is that you would need to avoid flooding the system with lighting signals, not by requiring the light to be off, but by restricting how often the event can run.

    If Motion changes to Violated
    then Remove Delayed Device Actions for Light
    then Turn Device On unless already on *** hint unless already on. Don't want to flood lighting signals
    then Set Device Light to 50% after delay of 15 Minutes
    then Set Device Light to off after delay of 5 minutes
    If motion detected
    Then remove delayed actions for the light
    Then turn the light on
    Then turn the light to 50 percent after a delay of 15 minutes
    Then turn the light off after a delay of 20 minutes
    Cannot re-tirgger for 1 min

    If the constraint that the light be off is non-negotiable, then you'll need two events. Something like this:

    #1
    If motion detected
    Then remove delayed actions for the light
    Then if the conditions are true Run Event #2
    Then turn the light to 50 percent after a delay of 15 minutes
    Then turn the light off after a delay of 20 minutes

    #2
    If this event is manually triggered
    And if the light is not On
    And if the light is not 50% brightness
    Then turn the light on
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      This should be close to what you described, but technically you only wanted the condition applied to the lights on action, this applies it to all actions. Otherwise yes, you need multiple events. Same as this example but remove the condition here, make another manually triggered event with that condition, then replace the second Then here with Run Another Event only if the conditions are true.
      Attached Files

      Comment


        #4
        John,
        In your example, the removal of delayed event actions is redundant, I think, since by requiring the light to be off you are also requiring that the delayed actions have already occurred, unless someone turns off the light manually.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Good point, presuming the only thing delayed is turning it off as is usually the case around here.

          FWIW, I can see the desire to Keep It Simple and wonder why we can't do things in one event. I felt that way too. As time passed I got over that, and now often have lots of events to accomplish exactly what I want to do. HS can handle many hundreds of events no problem (I've tested with over 1000), even on a little Zee S2, so long as they evaluate false most of the time and there are not tons of actions being executed all the time.

          Comment


            #6
            Originally posted by Uncle Michael View Post
            John,
            In your example, the removal of delayed event actions is redundant, I think, since by requiring the light to be off you are also requiring that the delayed actions have already occurred, unless someone turns off the light manually.
            And the problem with that is the Condition. If you are in that room for over 15 minutes, the lights will turn off no matter what.

            This is why I have separate events for turning lights on and turning them off. Delayed actions are nice, but in this case I find it far easier this way.

            For instance:

            If X changes and becomes "Motion"
            And if the lights are Off
            Then Turn on the lights.

            If X has been "No Motion" for exactly/for at least "10 minutes"
            And the lights are On
            Then turn off the lights

            (you can use the for exactly or for at least, it's up to you. I tend to do "for exactly" instead).

            With the above, if it has been "no motion" for 9 minutes and 45 seconds and then becomes motion, the lights just stay on. No Delayed actions to cancel.

            I've also moved to using BLRadar because in some rooms I have more than 1 sensor and this lets me use 1 device to set "occupancy" instead of multiple (which really complicated events).

            edit: otherwise, you can use the 1 event if you remove the condition, but it will send extra "noise". Might be nice if HST implemented an action of "Set device to "X", but only if "Y").... Actually, I know someone who might be able to help with that, but I"m not sure..... @Spud, I'm looking at you, bud!

            Comment


              #7
              Originally posted by sirmeili View Post
              And the problem with that is the Condition. If you are in that room for over 15 minutes, the lights will turn off no matter what.

              This is why I have separate events for turning lights on and turning them off. Delayed actions are nice, but in this case I find it far easier this way.

              For instance:

              If X changes and becomes "Motion"
              And if the lights are Off
              Then Turn on the lights.

              If X has been "No Motion" for exactly/for at least "10 minutes"
              And the lights are On
              Then turn off the lights

              (you can use the for exactly or for at least, it's up to you. I tend to do "for exactly" instead).

              With the above, if it has been "no motion" for 9 minutes and 45 seconds and then becomes motion, the lights just stay on. No Delayed actions to cancel.

              I've also moved to using BLRadar because in some rooms I have more than 1 sensor and this lets me use 1 device to set "occupancy" instead of multiple (which really complicated events).

              edit: otherwise, you can use the 1 event if you remove the condition, but it will send extra "noise". Might be nice if HST implemented an action of "Set device to "X", but only if "Y").... Actually, I know someone who might be able to help with that, but I"m not sure..... @Spud, I'm looking at you, bud!

              I second the use of separate events for occupancy. I use an event that turns the light on when motion is detected and stops the timer. Another event starts the timer as the motion becomes secure and a third event that sets the vacancy mode when the timer hits the preset.

              I think testing for the status "And the lights are On" could lead to a failed event if the status is out of sync with reality.
              Last edited by Kitar; December 24, 2016, 11:22 AM.

              Comment


                #8
                We use the "and lights are on" to keep the lights from going to full brightness if we had dimmed them previously.

                There are many ways to approach occupancy and we chose this:

                Event #1

                If motion1 = motion
                Or if motion2= motion
                Or if scene main room switch is single tapped on
                Then start room timer
                Set virtual room occupancy to occupied
                Set virtual last motion detected to room

                Event #2

                If room timer >= 1 second
                And if house is awake
                And if lights are not on
                Then turn lights on to dim 100
                Or if room timer >= 1 second
                And if house is asleep
                And if lights are not on
                Then turn lights on to dim 5%

                Event #3

                If room timer becomes > 45 minutes '(or whatever works for your lifestyle)
                Then turn off all lights
                Set virtual room occupancy to unoccupied
                Stop room timer
                Set room timer to 0

                This approach works for us because we try to have as little physical interaction with the house as possible. So, when all zones are unoccupied in house except bedrooms if house not vacant, then set house to sleep.

                In every room we set the primary light switch, the one that is closest to the entrance and intuitively the one you would reach for, to disable timers in that room/zone if if a triple tap off is received. Conversely, a triple tap on or the house becoming asleep at 0200 returns the state of the timers to enabled.

                A double tap will turn on or off all lights in the room.

                A single tap on will turn the associated load to on (100%) rather than to last on.

                Of course, we are using HS dimmers and switches. We also have Philips warm glow LED bulbs; they work well with the HS dimmers.

                As I said, there are many ways to skin a cat (and we have two of these fur balls). For another example, look at RPrades's event clinic for motion/occupancy.

                Michael
                Last edited by Rvtravlr; December 23, 2016, 08:56 PM.
                Michael

                Comment

                Working...
                X