Announcement

Collapse
No announcement yet.

Motion and delays

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

  • Motion and delays

    I love the plugin but I'm confused how to make something work. I have zwave motion sensor and when it senses motion, then I want the light to stay on. Then when there is no motion turn off after 5 minutes.

    Currently I just set a delay in the event settings because I wasn't sure how to make this work otherwise. But it doesn't work good.


    Sent from my iPad using Tapatalk

  • #2



    Sent from my iPad using Tapatalk

    Comment


    • #3
      That looks like it should work. I do not use any events for BLRadar. I use the UDMC scripting code because I have a lot more control over it
      Maybe an event SME can comment on this
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


      • #4
        Can you tell me more about UDMC so I can read about it ?


        Sent from my iPhone using Tapatalk

        Comment


        • #5
          UDMC is user defined motion code
          You can enable it on the options page in the plugin

          Here is an example for ON code (going off of memory):

          Code:
          dim ntime as date = TimeValue(DateTime.Now)
          if (ntime >= TimeValue("10:30 pm") AndAlso ntime <= TimeValue("11:59 pm") then
              blradar.PluginFunction("ControlDevice", new Object(){"Office Light", "on", 100})
              blradar.PluginFunction("NewDelayedEventForNoEcho",New Object(){"Office Light Control","Office Light:off",5,""})
          end if
          When the sensor goes ON it will turn on the Office Light and then setup a delayed event in BLRadar to turn off the Office Light in 5 minutes
          Last edited by Blade; November 4th, 2015, 12:55 PM.
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


          • #6
            Thanks. Maybe I'll try this. Not sure how to only make it work during certain times like between sunset and sunrise.


            Sent from my iPhone using Tapatalk

            Comment


            • #7
              I updated the code example to only do it between 10:30 PM and 11:59 PM as an example
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


              • #8
                Thanks I'll try this later today.


                Sent from my iPhone using Tapatalk

                Comment


                • #9
                  I tried it but I'm not sure what values to change. I tried making the when the door sensor opens the outside garage light comes on.. Not even sure this will work for what I want..

                  dim ntime as date = TimeValue(DateTime.Now)
                  if (ntime >= TimeValue("12:25 pm") AndAlso ntime <= TimeValue("11:59 pm") then
                  blradar.PluginFunction("EnvisaLink Front Door and Utility Door", new Object(){"Garage Outside Light", "on", 100})
                  blradar.PluginFunction("NewDelayedEventForNoEcho",New Object(){"Garage Light Control","Garage Outside Lightff",5,""})
                  end if

                  Comment


                  • #10
                    Did you get any errors?

                    Tell me exactly what you want to happen
                    Cheers,
                    Bob
                    Web site | Help Desk | Feature Requests | Message Board

                    Comment


                    • #11
                      Nope nothing. Even when I clicked test.


                      Sent from my iPhone using Tapatalk

                      Comment


                      • #12
                        I just want the light to come on when the door sensor is tripped Echo and then turn off non echo 1 minutes later. Or a motion sensor when tripped to turn on some hue lights and then turn those lights off after 5 minutes.


                        Sent from my iPhone using Tapatalk

                        Comment


                        • #13
                          Does your current time fall into the range in the code?
                          Cheers,
                          Bob
                          Web site | Help Desk | Feature Requests | Message Board

                          Comment


                          • #14
                            Yes it's 12:50pm local time


                            Sent from my iPhone using Tapatalk

                            Comment


                            • #15
                              Is UDMC enabled on the options web page in the plugin?
                              Cheers,
                              Bob
                              Web site | Help Desk | Feature Requests | Message Board

                              Comment

                              Working...
                              X