Announcement

Collapse
No announcement yet.

Issue with NewDelayedEventForNoEcho

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

    Issue with NewDelayedEventForNoEcho

    I am trying to get NewDelayedEventForNoEcho working with occupancy and are running in to some issues. What I would like is if the bathroom occupancy has been off for 15 minutes and if the light is still on I would like to turn it off. I setup the below for the On and Off in the Bathroom Occupancy but it still triggers to turn the light off even if Occupancy turns back on. I tried to delete the delayed event in the On UDMC but that does not seem to work properly. I am testing below with just a minute value instead of 15 to ensure that everything works properly

    On:
    hs.RemoveDelayedEvent("","Turn Off Bathroom Light")

    Off:
    blradar.NewDelayedEventForNoEcho("Turn Off Bathroom Light", "Bathroom Lightff", 1)

    There is what the log looks like when NewDelayedEventForNoEcho has triggered when Occupancy goes off but when I walk back in and the Occupancy goes on it still triggers to turn off the light. Maybe I am not doing something correctly here and any hints/pointers would be greatly appreciated.

    3/22/2014 6:50:34 PM ACTIVE ZONE Bathroom Occupancy has changed to Bathroom Zone Off; Bathroom Zone On (3 mins, 38 secs)
    3/22/2014 6:50:38 PM ECHO On for Bathroom Motion Sensor; Off (1 mins, 4 secs)
    3/22/2014 6:50:38 PM ACTIVE ZONE Bathroom Occupancy has changed to Bathroom Zone On; Bathroom Zone Off (3 secs)
    3/22/2014 6:51:00 PM Event Event Trigger "Turn Off Bathroom Light"
    3/22/2014 6:51:00 PM Device Control Device: Bathroom Light (\10) OFF
    3/22/2014 6:51:00 PM Event Deleting event after run: "BLRadar Delayed Turn Off Bathroom Light"

    #2
    hs.RemoveDelayedEvent("","Turn Off Bathroom Light") will not remove the NewDelayedEventForNoEcho event. The NewDelayedEventForNoEcho events are internal to BLRadar.

    I will add a scripting call to remove the delayed events
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


      #3
      Try 2.0.62
      I have added a RemoveDelayedEvent scripting call. See help for details
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        Personal opinion, but what I like about NewDelayedEventForNoEcho is that you don't need to remove the event.

        I do a call to NewDelayedEventForNoEcho when there is motion, setting it to turn off the light that was just turned on due to motion. If there is more motion in the room, it results in a new call to NewDelayedEventForNoEcho which automatically removes the previous delayed event, effectively resetting the timer.

        When the timer runs out the light turns off, and the delayed event automatically deletes itself.

        I'm not sure if you are doing the same thing, but I think you are. In that case, you don't actually need to remove the event. Calling NewDelayedEventForNoEcho with the same name deletes and replaces the delayed event.

        Steve

        Comment


          #5
          Yes the NewDelayedEventForNoEcho will do all that but I added the extra call in case someone wanted to remove it as part of another sensor ON/OFF code or another script entirely
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


            #6
            Originally posted by Blade View Post
            Yes the NewDelayedEventForNoEcho will do all that but I added the extra call in case someone wanted to remove it as part of another sensor ON/OFF code or another script entirely
            Yes, I understand, but for what the OP is wanting to do, he just needs a single set of script lines tied to the ON of the sensor, and doesn't need the new method. He just needs to turn on the light, and do a NewDelayedEventForNoEcho. No OFF script lines are needed. In fact, I think the new method you've added doesn't help him past the flawed way he is trying to do it now.

            Still, another method is good to have, and will probably be handy for something.

            Steve

            Comment


              #7
              Originally posted by mlagase View Post
              What I would like is if the bathroom occupancy has been off for 15 minutes and if the light is still on I would like to turn it off.
              Make sure you are running BLRadar 2.0.62
              Try this:

              On:
              Code:
              blradar.RemoveDelayedEvent("Turn Off Bathroom Light")
              Off:
              Code:
              blradar.NewDelayedEventForNoEcho("Turn Off Bathroom Light", "Bathroom Light:off", 1)
              Let me know if this is what you are looking for
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #8
                I am unfortunately still on Homeseer version 2 so maybe the older version is having issues.

                Stevea - I am new to BLRadar Occupancy and UDMC coding so didn't know this was a flawed way of doing it as I am still in learning phase. I've never used this before so thanks for the vote of confidence here.

                Comment


                  #9
                  In HS2, the NewDelayedEventForNoEcho call creates a HS event so you could delete the event by using hs.DeleteEvent("Turn Off Bathroom Light")
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                    #10
                    Thanks,

                    Looks like I might need to upgrade to HS3 to get all of the latest additions you are adding to the software.

                    Maybe that was the issue I was trying to delete a delayed event instead of the actual event. Doh!!

                    Mike

                    Comment


                      #11
                      I'm still using HS2, and - like I said - I do what you are trying to do and have never needed to delete the event.

                      Steve

                      Comment


                        #12
                        Yes the event will get deleted on it own but if you want to remove it early for some reason you could use the hs.DeleteEvent call in HS2
                        Cheers,
                        Bob
                        Web site | Help Desk | Feature Requests | Message Board

                        Comment

                        Working...
                        X