Announcement

Collapse
No announcement yet.

Last Echo question

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

  • Last Echo

    I do not understand what you mean .
    Please clarify

    Comment


    • The trigger for the event should be a BLRadar ECHO trigger for your exit sensor
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


      • Last Echo

        Blade,
        I thought about your recommendation but it does not work.
        What I would like to do is:
        I have several motion sensors. If the Last Echo is the sensor X AND if there was no other Last Echo for Y minutes then trigger event Z.

        It is possible to have a BLRadar trigger for Last Echo BUT without duration so it is not an option

        Thanks

        Comment


        • That would be a new trigger in the plugin
          Add a feature request on my site
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


          • Last Echo

            Done
            Thanks

            Comment


            • Blade,
              I gave up on the event that you suggested since it is specific to a lamp while I want to use it for Occupancy. Yesterday I gave one more try to the scripts below. I had some success and I'm getting very close to working

              Two issues still remaining.
              1) The sensor does not seem to return the lastoff time, I'm getting 12:00:00 AM hs.WriteLog("LastEchoOn", "LastOff = " & Sensor.LastOff)
              2) I Have another post in Insteon but if you know how to fix it, please let me know. This if condition is not working for an Insteon device not sure the right statement should be
              If hs.IsOff(splitArray(3)) Then

              Sub Main(ByVal info As String)

              'Array 0 - A3 Global House Motion
              'Array 1 - 1 Minute time
              'Array 2 - Event Name - Example House Occupancy
              'Array 3 - Occupancy Device RefId 117 Insteon Keypadlink

              Dim splitArray As String() = info.Trim.Split("|")
              'hs.writelog("Info", "SplitArray is: " & splitArray.Length)

              If splitArray.Length = 4 Then

              Dim Sensor As Object
              Sensor = hs.PluginFunction("BLRadar","","GetSensorByRef", New Object() {hs.DeviceExistsCode(splitArray(0))})
              'hs.writelog("Info", "Sensor Device Code Is: " & Sensor.DeviceCode)

              If Not Sensor Is Nothing Then
              hs.writelog("Info", "Sensor Device Code Is: " & Sensor.DeviceCode)
              If hs.IsOn(hs.DeviceExistsCode(splitArray(0))) Then
              hs.WriteLog("LastEchoOn", "LastOff = " & Sensor.LastOff)
              Dim diffMinutes As Long = DateDiff(DateInterval.Minute, Sensor.LastOff, DateTime.Now)
              hs.WriteLog("LastEchoOn", "diffMinutes = " & diffMinutes)
              If diffMinutes >= Integer.Parse(splitArray(1)) Then
              If hs.IsOff(splitArray(3)) Then
              hs.TriggerEvent(splitArray(2))
              End If
              End If
              diffMinutes = Nothing
              End If
              End If
              Sensor = Nothing
              End If
              splitArray = Nothing
              End Sub

              Comment


              • Last Echo

                Originally posted by Blade View Post
                That would be a new trigger in the plugin
                Add a feature request on my site
                Hi Blade,

                Any news on this request ?
                2/3/2015 2:36:11 PM
                (Request #490) Last Echo Option johndoe2011 BLRadar Open

                Comment

                Working...
                X