Announcement

Collapse
No announcement yet.

New condition to compare time of last change of two devices

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

    New condition to compare time of last change of two devices

    I'm trying come up with a way to monitor the battery status of MS16A motion sensors based on how responsive they.

    Say a motion sensor is used to turn the light on in a room. When the battery is good, the motion sensor does its job and turns the light on. When the battery gets low it starts to arrive late to the party, and the human things will turn on the light instead. I would like to catch this early and change a virtual device to low battery setting. I have something like 15 MS16A motion sensors. If each one requires a timer and 4 events (my current solution) it is a large ball of wax just for battery levels.

    So far my current solution is to restart a timer when the light goes on (event 1). In the event that uses motion as a trigger, the timer is stopped a minute after the light goes on. I have another event that stops the timer when the motion sensor device changes status (event 2). I then have an event that sets the virtual battery device to 100% if the timer is less than 15 min when the motion sensor device changes (event 3). I have another event that triggers when the timer gets to 4 hours to set the battery to 0% (event 4).

    Not including the event to turn the light on with motion (which I would have even without this endeavor), I have 1 virtual device (battery level), 1 timer, and 4 events.

    If there was a condition to compare the difference in time between two devices changing status, then I think I could get down to 1 virtual device and two events, with no timer. Is it possible to implement something like this? Knowing what I am trying to do, is there a more efficient way to do this with current triggers and conditions?
    _______________________________________________

    HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
    Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
    Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links
Working...
X