Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Please help me improve my event logic.

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

  • Please help me improve my event logic.

    I'm starting to set up various automation events, and I'm struggling a bit with the logic for various things. I can get things working, but I'm pretty sure there are better ways to do things.
    Is there anywhere that has compiled a list of good ways to accomplish various automation events so I don't have to re-invent the wheel?


    This is the current logic that I have for my basement lighting, and it works ok, but how can I improve upon it?

    Code:
    EVENT "Door Opens"
    IF "basement door sensor" status changes to "Contact Open",
    THEN restart "Basement Timer".
    THEN Set Device "Basement lights" to "on"
    Code:
    EVENT "Lights out"
    IF "Basement door Status" has been "Contact Closed" for at least 5m
    AND IF "Basement Timer"s value is More than 10m
    THEN Stop "Basement Timer"
    THEN Set device "Basement lights" to "Off"
    OPTIONS "Cannot re-run for "9m"
    Code:
    EVENT "Motion detected"
    IF "Basement Motion sensor" changes and becomes "Motion Detected"
    THEN restart timer "Basement Timer"
    Thanks!


  • #2
    Welcome to to the HomeSeer Board. The logic you posted seems to me to be a reasonable way to accomplish what you want. There are other ways, of course, and some of the options are a matter of taste or style more than being "better" or "worse". One option to consider is a delayed event action in place of a timer, for example.

    A good place to start learning about the ins and outs of the HS event engine is the Event Clinic. This board is also an excellent place to seek help with problems. There are many active participants with a wealth of experience and anxious to share what they have learned. (The more specific the questions, the better the responses will be.)
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment


    • #3
      Here's another way that's not necessarily better.

      if door opens and light is < 99% and it is nighttime then set light to 99%
      If door is closed for at least five minutes and light is on for at least 10 minutes and light level is 99% then fade lights to off.

      I use the 99% dim level so that it won't turn off a light that someone turned on manually. Even with non-dimming devices you can often set a dim level just to use as a flag for your events.

      Comment


      • #4
        We use the timer approach as well.

        Click image for larger version

Name:	C703A11C-8D57-4980-B067-A3451B67E5C4.jpeg
Views:	67
Size:	84.6 KB
ID:	1324823


        Click image for larger version

Name:	AB7136EF-496E-4E1A-95F1-11B9F7D31EB7.jpeg
Views:	63
Size:	95.5 KB
ID:	1324824
        Michael

        HS3 Pro 3.0.0.470 | 849 devices | 349 events | OpenSprinkler | BLShutdown | EasyTrigger | NetCAM | Harmony Hub | Sonos | SDJ-Health | BLUPS | PHLocation | BLBackup | BLLock | Z-Wave 3.0.1.243 | weatherXML | Pushover 3P | Blue-Iris | AirPlaySpeak

        Comment


        • #5
          Originally posted by Uncle Michael View Post
          A good place to start learning about the ins and outs of the HS event engine is the Event Clinic.
          That's what I was looking for! Thank you!


          Comment

          Working...
          X