Announcement

Collapse
No announcement yet.

Event with multiple "AND IF"

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

    Event with multiple "AND IF"

    Hi everybody
    I am pretty new to HomeSeer, but have managed to install my system (HomeSeer 4) with JowiHue and multiple devices. I now want to create an event:
    When the motion sensor see motion after 9PM and before sunrise it should turn on the lights in the living room at 40% and after 20 seconds turn off the lights again...
    But I can't seem to get it to work... it works fine before I insert the two AND IF sentences, but after I insert them, the event doesn't work.

    Can anybody say what I am doing wrong? I have been around this forum and on Google to see if I misunderstand the AND IF and the OR IF... but still no luck :-/ Click image for larger version

Name:	HomeSeerEventNightLight.png
Views:	213
Size:	265.7 KB
ID:	1441558

    #2
    If you change the second and if to just after 21:00 Does the event trigger properly? If yes then this will probably require two events.

    Comment


      #3
      Events do not currently span midnight. I would expect that event to work between 2100 and 2359.

      I say currently because it was announced in the HS4 roadmap they will have time frames that span across midnight; that's just not implemented yet.
      HS4 Pro on Shuttle NC10U, Win10; Z-NET
      Number of Devices: 1005
      Number of Events: 293

      Plug-Ins: BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, Marquis monoprice Amp, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, rnbWeather, Worx Landroid, Z-Wave

      External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

      Comment


        #4
        Jonny has the correct answer. HS has the day begin and end at midnight, so a time can never be before sunrise, but after 21:00, because after 21:00 ends at midnight. The only native Condition that can cross midnight is “Nighttime”.

        Read here for further explanation. You can duplicate your Trigger and first Condition then two separate Time conditions. The example I used in the linked post is:

        IF Trigger
        AND IF The time is after 11:00PM

        OR IF Trigger
        AND IF The time is before 3:00AM

        Another good solution is the Easy Trigger plug-in, which provides schedules that can easily span two days crossing midnight.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Originally posted by rprade View Post
          Jonny has the correct answer. HS has the day begin and end at midnight, so a time can never be before sunrise, but after 21:00, because after 21:00 ends at midnight. The only native Condition that can cross midnight is “Nighttime”.

          Read here for further explanation. You can duplicate your Trigger and first Condition then two separate Time conditions. The example I used in the linked post is:

          IF Trigger
          AND IF The time is after 11:00PM

          OR IF Trigger
          AND IF The time is before 3:00AM

          Another good solution is the Easy Trigger plug-in, which provides schedules that can easily span two days crossing midnight.
          Hi guys
          Thank you - it almost work as I want it to. But I would like for it to stop if the light is already in in the living room.

          This is what I inserted so far.
          IF
          motion sensor changes and becomes Motion
          AND IF
          The time is after 21:00
          OR IF
          motion sensor changes and becomes Motion
          AND IF
          The time is before 07:00

          THEN
          Set Device: Living Room light On/Off/Dim to 40%
          Wait 5 Seconds
          Set Device: Living Room light On/Off/Dim to 100%
          Set Device: Living Room light On/Off/Dim to Off

          Every time I add another AND IF to each of the IF and OR IF i halts - I would have thought that an AND IF the light is on in the living room THEN, would do the trick?

          Comment


            #6
            I think you want the additional AND IF to be AND IF the light is OFF, then turn the light on

            Comment


              #7
              Originally posted by Toest View Post

              Hi guys
              Thank you - it almost work as I want it to. But I would like for it to stop if the light is already in in the living room.

              This is what I inserted so far.
              IF
              motion sensor changes and becomes Motion
              AND IF
              The time is after 21:00
              OR IF
              motion sensor changes and becomes Motion
              AND IF
              The time is before 07:00

              THEN
              Set Device: Living Room light On/Off/Dim to 40%
              Wait 5 Seconds
              Set Device: Living Room light On/Off/Dim to 100%
              Set Device: Living Room light On/Off/Dim to Off

              Every time I add another AND IF to each of the IF and OR IF i halts - I would have thought that an AND IF the light is on in the living room THEN, would do the trick?
              IF motion sensor changes and becomes Motion
              AND IF The time is after 21:00
              AND IF the living room light is Off

              OR IF motion sensor changes and becomes Motion
              AND IF The time is before 07:00
              AND IF the living room light is Off


              Your actions are confusing. I don’t understand setting it to 40%, waiting 5 seconds and essentially turning the light off. The commands to set it to 100% as well as the next one setting it to Off will be executed at once.

              THEN
              Set Device: Living Room light On/Off/Dim to 40%
              Wait 5 Seconds
              Set Device: Living Room light On/Off/Dim to 100%
              Set Device: Living Room light On/Off/Dim to Off

              HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

              Comment


                #8
                Originally posted by rprade View Post
                IF motion sensor changes and becomes Motion
                AND IF The time is after 21:00
                AND IF the living room light is Off

                OR IF motion sensor changes and becomes Motion
                AND IF The time is before 07:00
                AND IF the living room light is Off


                Your actions are confusing. I don’t understand setting it to 40%, waiting 5 seconds and essentially turning the light off. The commands to set it to 100% as well as the next one setting it to Off will be executed at once.

                THEN
                Set Device: Living Room light On/Off/Dim to 40%
                Wait 5 Seconds
                Set Device: Living Room light On/Off/Dim to 100%
                Set Device: Living Room light On/Off/Dim to Off
                I understand that the 5 seconds confuse - I forgot to change it after testing.

                what I want to do is. When my kids walk to our bedroom at night. I want the light to turn on with 40% for 3 minutes and afterwards turn the light off.

                The reason why it checks if the light is off, is that I don’t want the light to get dimmed if we are in the living room, and the reason why the lights are turned up to 100% right before the light are turned off, is that I want the light to turn on with 100% the next time - even if someone uses the light switch (power off/power on).

                But do you know why my two AND IF doesn’t work? Is there a solution?

                Comment


                  #9
                  Originally posted by Toest View Post
                  I understand that the 5 seconds confuse - I forgot to change it after testing.

                  what I want to do is. When my kids walk to our bedroom at night. I want the light to turn on with 40% for 3 minutes and afterwards turn the light off.

                  The reason why it checks if the light is off, is that I don’t want the light to get dimmed if we are in the living room, and the reason why the lights are turned up to 100% right before the light are turned off, is that I want the light to turn on with 100% the next time - even if someone uses the light switch (power off/power on).

                  But do you know why my two AND IF doesn’t work? Is there a solution?
                  The only problem you stated in post #5 above was that the event runs even if the light is Off
                  Thank you - it almost work as I want it to. But I would like for it to stop if the light is already in in the living room.
                  I added AND IF the living room is Off to each of the groups to correct that.

                  IF motion sensor changes and becomes Motion trigger with motion
                  AND IF The time is after 21:00 event will only run between 9:00PM and midnight
                  AND IF the living room light is Off event will run only if light is off

                  OR IF motion sensor changes and becomes Motion
                  AND IF The time is before 07:00 event will only run between midnight and 7:00AM
                  AND IF the living room light is Off event will run only if light is off

                  I changed the Wait from 5 seconds to 5 minutes

                  THEN
                  Set Device: Living Room light On/Off/Dim to 40% sets light to 40%
                  Wait 5 minutes
                  Set Device: Living Room light On/Off/Dim to 100% sets light to 100%
                  Set Device: Living Room light On/Off/Dim to Off sets light to Off

                  HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    Originally posted by rprade View Post
                    The only problem you stated in post #5 above was that the event runs even if the light is Off
                    I added AND IF the living room is Off to each of the groups to correct that.

                    IF motion sensor changes and becomes Motion trigger with motion
                    AND IF The time is after 21:00 event will only run between 9:00PM and midnight
                    AND IF the living room light is Off event will run only if light is off

                    OR IF motion sensor changes and becomes Motion
                    AND IF The time is before 07:00 event will only run between midnight and 7:00AM
                    AND IF the living room light is Off event will run only if light is off

                    I changed the Wait from 5 seconds to 5 minutes

                    THEN
                    Set Device: Living Room light On/Off/Dim to 40% sets light to 40%
                    Wait 5 minutes
                    Set Device: Living Room light On/Off/Dim to 100% sets light to 100%
                    Set Device: Living Room light On/Off/Dim to Off sets light to Off
                    First off, thank you for your help!
                    My problem is, that I tried to add the extra AND IF to each AND IF, but it stops working every time I add the extra AND IF... hmm

                    Comment


                      #11
                      How about a screenshot of your event?
                      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        #12
                        Click image for larger version  Name:	65FBC4BD-EFBE-4C97-9302-21AF2E4407EA.jpeg Views:	0 Size:	55.3 KB ID:	1441799 Here is a screenshot.
                        as soon as I add the second AND IF sentences, it halts?

                        just to clarify:
                        The devices are installed through JowiHue, and the Light I link to is an entire room with 3 lights, but have experimented with choosing only one light, with no changed result :-/

                        thank you again for your time

                        Comment


                          #13
                          If you change the motion and value to off as a group condition you could then write the event as

                          If Time is After 21:00
                          And If All the Group Conditions are True

                          Or If Time is Before Sunrise
                          And If All the Group Conditions are True

                          Then Set Device to 40%
                          Wait X Minutes
                          Set device to 100%
                          Set Device to Off

                          Group Conditons
                          Light is Off
                          Motion is Detected

                          You could also make two events.

                          Comment


                            #14
                            double check that your living room light device is reporting accurately. Living room light not showing it's status properly could account for the issue. You might also try changing to 'set and not equal to on'
                            HS4 Pro on Shuttle NC10U, Win10; Z-NET
                            Number of Devices: 1005
                            Number of Events: 293

                            Plug-Ins: BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, Marquis monoprice Amp, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, rnbWeather, Worx Landroid, Z-Wave

                            External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

                            Comment


                              #15
                              Thanks guys, I will try to change the Event to what you suggest and see what works best :-)

                              Thank you soo much! Also gave me a bit more insight with Event-ing in HomeSeer :-)

                              have a great Christmas.
                              (I will be away from the house for the next couple days, but will test when I come back home) :-)

                              Comment

                              Working...
                              X