Announcement

Collapse
No announcement yet.

Need syntax help....

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

    Need syntax help....

    I need more syntax help than anything

    Front door has motion, camera, door sensor and zwave lock.
    We also have a google hub that connects (grabs) our iPhones pretty fast when we get home. (Bob-is-home is the flag that ifttt and google use when I am within the houses network range)

    I am trying to build an if/and clause that will unlock the front door when we get home.
    What I have so far is:

    If (Bob-is-home) has been off for at least 5 min
    And if front door is closed
    And if front door is locked
    And (Bob-is-home) changes to ON
    And Activity at front door
    Unlock front door

    5 min should prevent any unnecessary lock/unlock if the network hiccups.
    Don't bother if the front door is open
    Don't bother if it is already unlocked
    The network sees me
    I am at the front door (presumably)
    Unlock....

    This shouldn't mess up the midnight "off & lock" routine

    What am I missing? How do I make it more robust since some things may not happen in the right order. I.e., in I sit in my car for a moment before coming in, the network may grab me before I get to the front door...

    #2
    No comments?

    No suggestions ?

    Comment


      #3
      Are you looking to write a script (since you posted this in the HS3 Scripting section), or need help with structuring an event?

      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
        More syntax help as the layout almost writes the conditional....

        My concern is how to deal with things that happen out of turn, or within a few minutes, but not how the conditionals planned it.

        Like I said, if the network "sees" me before I get to the front door, the script fails... or if I get to the front door before the network sees me or...

        How do I make the script (conditional list ) more tolerant of what happens when...

        Can I do this with the built-in conditionals or do I truely need a "Script"

        Comment


          #5
          A script will give you more flexibility in evaluating other devices and what to do with them. Looking at your event structure right now, I would trigger a script based on "(Bob-is-home) changes to ON" and then evaluate the other devices in the script.

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

          Comment


            #6
            Although I wanted to make the front door "Automatic" and button free, ie the purpose of the event, my wife just made the task mute, as she said...

            "Can I have a Button on my keyring that does the door?"



            My wife rarely asks for automated anything, so she gets what she asks for... She tolerates me automating things that might not need to be automated, but I do because I can...

            Comment

            Working...
            X