Announcement

Collapse
No announcement yet.

Leak Sensor Heartbeat

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Leak Sensor Heartbeat

    Mark,

    How can I use the heartbeat (or lack thereof) to trigger an event to change the battery?

    BTW, let me know if you think I should report the "Dry" reporting issue to SmartHome.
    - Tom

    HSPro/Insteon
    Web Site
    YouTube Channel

    #2
    Originally posted by tpchristian View Post
    Mark,

    How can I use the heartbeat (or lack thereof) to trigger an event to change the battery?

    BTW, let me know if you think I should report the "Dry" reporting issue to SmartHome.
    Tom,
    currently i just use the heartbeat to update the status. if the status is correct hs will not changes the 'last updated' date time, correct.

    so I would have to add a heartbeat trigger that you could monitor. something like device x "Transmits a heartbeat"
    Mark

    HS3 Pro 4.2.19.5
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
    Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

    Comment


      #3
      I would like to have some way of getting notified. It is an important part of the functionality of this because it is battery operated. If it has failed and will not report the leak, it is no good.

      I don't know that a heartbeat event would be as helpful as a type of "check device" trigger. That is because one would have check if it has not been sent for over 24 hours. To do that you would have to have a device (or something else) to save the last time the heartbeat was heard.

      I think what may work well is to have a second device that was the battery status. On this device I could setup a trigger that says "device has been in state x for at least 24 hours". Now I would be able to trigger this event at whatever frequency I want to be nagged about the bad battery. This is how it is done on my z-wave locks -- separate device.
      - Tom

      HSPro/Insteon
      Web Site
      YouTube Channel

      Comment


        #4
        Tom,
        what about a second device that goes On when a heart beat is heard, and then goes Off automatically a few minutes later.

        then you could use the standard hs condition trigger, "has been Off for at least X hours" to fire an event

        i'm trying to avoid adding another custom trigger to the plugin

        what do you think?
        Mark

        HS3 Pro 4.2.19.5
        Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
        Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
        Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

        Comment


          #5
          I think that would be fine.
          - Tom

          HSPro/Insteon
          Web Site
          YouTube Channel

          Comment


            #6
            Originally posted by tpchristian View Post
            I think that would be fine.
            do you have time to test something this weekend? if so, I'll email directly tonight
            Mark

            HS3 Pro 4.2.19.5
            Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
            Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
            Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

            Comment


              #7
              Originally posted by mnsandler View Post
              Tom,
              what about a second device that goes On when a heart beat is heard, and then goes Off automatically a few minutes later.

              then you could use the standard hs condition trigger, "has been Off for at least X hours" to fire an event

              i'm trying to avoid adding another custom trigger to the plugin

              what do you think?
              Mark is this how the plugin currently works? If so, how long from heartbeat heard until the heartbeat device turns off?

              Comment


                #8
                Originally posted by heatvent View Post
                Mark is this how the plugin currently works? If so, how long from heartbeat heard until the heartbeat device turns off?
                I'll have to check the code, but i think its only a few seconds.

                have you tried it, or tracked the status of the device after the heartbeat (assuming you are seeing the heartbeat msgs)
                Mark

                HS3 Pro 4.2.19.5
                Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
                Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
                Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

                Comment


                  #9
                  Hi gents,

                  I created a watchdog script that I use in lots of applications to make sure that a particular device is updating according to a schedule. I am actually surprised this type of functionality is not native in HS (in the options for a device, for example), but I digress.

                  You call this script on a recurring schedule of your choice (e.g. once a day for the heartbeat as it updates I think once per day). You pass in two parameters separated by a comma: The device name with location and the time window to look backwards (in minutes). For example, "Laundry Room Leak Sensor,1445". Here, 1445 = 1440 + 5, which is one day plus 5 minutes. When run, the script will check that the HB status changed within the last 1445 minutes, and if so, write a log entry, and if not, email me a notice.

                  Of course you can modify how you see fit, just let me know how you make it better!

                  -BD

                  Code:
                  Sub Main(Parm as object)
                  
                  Dim LastUpdate as Date
                  Dim DeviceName
                  Dim Parms() as String
                  Dim Mins as Integer 
                  
                  Parms = Split(Parm.ToString,",")
                  DeviceName = Parms(0)
                  Mins = Parms(1)
                  
                  LastUpdate = hs.DeviceLastChangeRef(hs.GetDeviceRefByName(DeviceName))
                  
                  If DateDiff("n",LastUpdate,Now) > Mins then
                  hs.WriteLog("Status Watchdog", "The " & DeviceName & " status has not been updated since " & LastUpdate & ".")
                  hs.SendEmail("myemail@gmail.com","myemail@gmail.com","","","** HS Watchdog Notice **","The "  & DeviceName & " status has not been updated since "& LastUpdate & ".","")
                  else
                  hs.WriteLog("Status Watchdog", "The " & DeviceName & " status has been updating normally.")
                  End If
                  
                  End Sub

                  Comment

                  Working...
                  X