Announcement

Collapse
No announcement yet.

Event question

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

    Event question

    I am trying to setup an event that will reset a light to a dim value (5%) after sunset, but before 11PM if that light has been off for at least 1 minute and on for at least 10 minutes. I have switchlinc 2 way switches, so homeseer knows when someone manually turns the light on locally.

    I originally setup the following conditional event for the light being off.

    - If Time is After Sunset
    - If Time is Before 11PM
    - If light device has been off for at least 1 minute

    Then Dim light to 5%.

    That did not work. If I remove the time events, everything works just fine. Currently I am disabling and enabling that event using the script line in the event itself to make it work and adding nighttime in the condition.

    What I would like it to end up being is something similar to the following.

    - If Time is After Sunset
    - If Time is Before 11PM
    - If light device has been off for at least 1 minute

    OR

    - If Time is After Sunset
    - If Time is Before 11PM
    - If light device has been on for at least 10 minutes

    Then Dim light to 5%.

    Also, the event that I currently have running is based on the above, but the time is set to nighttime. This causes the event to run every 10 minutes. Anyone have any ideas on how to set this up? Would I need Super Trigger to make this work?

    #2
    I think a variable might work for the time trigger. Set up a variable that will be set to on at sunset and off at 11. Then set up an event with the trigger being "By condition" and have your or events put in there. This should work.

    Comment


      #3
      Why would the built in events not work for this?

      If all the conditions all have to be true, which in my case it was, it should trigger the event. If I read the below correctly, then anytime between Sunset and 11PM and the light device being off, the light should then dim to 5%. Is that not how it should work?

      - If Time is After Sunset
      - If Time is Before 11PM
      - If light device has been off for at least 1 minute

      Then Dim light to 5%.

      Would a script be better suited for something like this?

      Also, for the light being on, how would one determine if the light is already dimmed to 5% and not have the event trigger? Having the device dimmed to 5% is the same as having the light ON. How would one get around that one?

      Comment


        #4
        I'm not sure why the time conditions give problems. They might work and then sometimes they don't. I started using the variables for certain triggers when time is involved, it made it easier than trying to figure out why a certain event didn't trigger.

        For your other question, the easiest way around this would be to use 2-way x10 switches or the zwave switches. That way you will always know their status.

        Comment


          #5
          I don't know if this will help. Following are two scripts I use to control stair and landing lighting. Basically the first one dims the lights to a different levels before and after midnight. Midnight is represented by the variable "q2" for the simple reason if I go to bed early I can have all the house operating as if it's after midnight.
          Code:
          Sub main()
          if hs.isoff ("q2") then
          hs.execX10 "B8","dim",60,0
          hs.execX10 "C4","dim",20,0
          else
          hs.execX10 "B8","dim",100,0
          hs.execX10 "C4","off"
          end if
          end sub
          The next one controls what comes on before and after midnight. The checking of the light level is to prevent double triggers as they do not always go bright to 100%.
          Code:
          Sub main()
          dim level
          level = hs.devicevalue("B8")
          if hs.isoff ("q2") and level<>90 then
          hs.execX10 "B8","bright",60,0
          hs.execX10 "C4","bright",20,0
          end if
          if hs.ison ("q2") then
          hs.execX10 "B8","bright",100,0
          end if
          end sub
          I know this does not solve your problem, but hopefully points you in the right direction.
          Last edited by Gogs; November 30, 2004, 07:03 PM. Reason: Posted wrong scripts!
          sigpic
          A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

          Comment


            #6
            That definately does help. Looks like I will need to start scripting some of this now.

            As for one of my events, I was able to get around it by adding an extra condition of "If Light Value equals 100". That allowed the event to not fire every 10 minutes which is what I wanted.

            As for the other one to get the time to work between sunset and 11PM, I could not get that to work through the GUI.

            I appreciate the sample script you sent as that has opened some ideas on my side.

            Thanks!

            Mike

            Comment


              #7
              Oh, is scripting not fun! Especially when we don,t have a clue what we are doing and it works!

              Good luck, you will get there in the end.
              sigpic
              A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

              Comment

              Working...
              X