Author Topic: alert on unresponsive device?  (Read 390 times)

Offline Les F

  • Hero Member
  • *****
  • Posts: 562
  • Karma: +7/-0
alert on unresponsive device?
« on: February 18, 2018, 11:04:39 am »

Couldn't find a way to do this in the predefined scenes (even with advanced editor).   I have an Aeotec DSC06106.  Even though its a 'power strip', it sends back a report of power usage and on/off status.  Its got my goldfish pond heater plugged into it so I can see thru its power usage that its actually heating.  Problem is that a few times a year the GFCI trips when the weather gets real nasty. (When the GFCI pops of course it stops the pump and filter too)  I would like to know when this happens.   Obviously Vera reports the device is not responding when I am actually looking at the interface.

The reporting options on the Aeotec are power usage based (over / under a certain threshold).   I would just like to alarm if the device can't be reached (polled).  There has to be a way to poll it say every 30 minutes and alert if no reply, or to leverage what vera is already doing and alarm based on that.  It doesn't need to be near real time, just need to know  sooner rather than later.   Figure there has to be some easy way to do this.    I see variables for comm failure alarms and comm failure times but am not up to snuff on this.    Any help would be greatly appreciated.   
Google+ http://tinyurl.com/7hewkbn / Instagram: https://goo.gl/0Hr8K4 / Pinterest https://goo.gl/WjZCQp (Yes, Pinterest is for guys too! take a look)

Offline tomtcom

  • Hero Member
  • *****
  • Posts: 948
  • Karma: +21/-31
Re: alert on unresponsive device?
« Reply #1 on: February 18, 2018, 01:03:29 pm »
Hey Les, does this option not work for you? You mentioned you checked the advanced editor.


Offline Les F

  • Hero Member
  • *****
  • Posts: 562
  • Karma: +7/-0
Re: alert on unresponsive device?
« Reply #2 on: February 18, 2018, 03:19:51 pm »

The problem is I want to take some action on the poll failing.  That is what I couldnt find how to do in the editor.   The editor will poll the device but doesn't offer anything more advanced. Basically if I can't poll the device, odds are the ground fault breaker has tripped.  Not a perfect way of detecting but better than nothing. 
Google+ http://tinyurl.com/7hewkbn / Instagram: https://goo.gl/0Hr8K4 / Pinterest https://goo.gl/WjZCQp (Yes, Pinterest is for guys too! take a look)

Offline tomtcom

  • Hero Member
  • *****
  • Posts: 948
  • Karma: +21/-31
Re: alert on unresponsive device?
« Reply #3 on: February 19, 2018, 11:22:10 am »
Ok, plenty of examples for various URL's you can use using luup code in your scene.

In your case, you need to action the result. So either you write lua code to capture the response of the poll or perhaps try the SiteSensor plugin by Rigpapa as well: http://forum.micasaverde.com/index.php/topic,50440.0.html

http://wiki.micasaverde.com/index.php/Luup_Requests
http://forum.micasaverde.com/index.php/topic,4844.0.html
http://wiki.micasaverde.com/index.php/UI_Notes
http://wiki.micasaverde.com/index.php/Luup_Scenes_Events

Offline Les F

  • Hero Member
  • *****
  • Posts: 562
  • Karma: +7/-0
Re: alert on unresponsive device?
« Reply #4 on: February 19, 2018, 12:29:35 pm »

Thank you for the links!  This will get me going.  My biggest problem is I have not invested enough time learning the system to get a grasp on the internals.  Trying to even get an idea of what to search for within the forums (or plugins) sometime can be and adventure of its own.

Ok, plenty of examples for various URL's you can use using luup code in your scene.

In your case, you need to action the result. So either you write lua code to capture the response of the poll or perhaps try the SiteSensor plugin by Rigpapa as well: http://forum.micasaverde.com/index.php/topic,50440.0.html

Google+ http://tinyurl.com/7hewkbn / Instagram: https://goo.gl/0Hr8K4 / Pinterest https://goo.gl/WjZCQp (Yes, Pinterest is for guys too! take a look)

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1173
  • Karma: +23/-13
Re: alert on unresponsive device?
« Reply #5 on: February 19, 2018, 12:30:22 pm »
I would do this in PLEG and monitor device property LastPollSuccess.  That is a UNIX timestamp.  I wouldn't even bother converting it - use the timestamp the property changed and compare to another timestamp to see if it has been too long.  The only problem I see is that when I just checked my Aeon power strip, and that variable does not show it has polled in about three hours.  I attempted a manual poll and got a timeout - and the power strip is within 15 feet of Vera.  I have an early model of this strip, and I don't think it polls well.

So you may need to some trial-and-error to find a timestamp that is incrementing on a regular basis or accept a long tolerance before you raise an alert .   I have some Everspring outdoor z-wave motions, and even though I have low battery alerts set, every once in a while the battery just dies without a particularly low battery reading.  So for those I monitor BatteryDate, and it cleanly updates about every four hours.  At sunset each night I check if it has been more than 23 hours since BatteryDate has been updated, and if so I sent an alert.  (FrontYardMotionDoorBatteryDate; IsNight > 23:00:00)

Edit:  I am using an Aeon DSC11...
« Last Edit: February 19, 2018, 12:37:48 pm by wilme2 »
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

Offline Les F

  • Hero Member
  • *****
  • Posts: 562
  • Karma: +7/-0
Re: alert on unresponsive device?
« Reply #6 on: February 19, 2018, 12:38:12 pm »
I have an early model of this strip, and I don't think it polls well.
So you may need to some trial-and-error to find a timestamp that is incrementing on a regular basis or accept a long tolerance before you raise an alert . 

Yeah,  That thought crossed my mind when looking at the stats on how well it polls on a good day.   Will need to account for the less than perfect world of polling z-wave devices  ::)
Google+ http://tinyurl.com/7hewkbn / Instagram: https://goo.gl/0Hr8K4 / Pinterest https://goo.gl/WjZCQp (Yes, Pinterest is for guys too! take a look)

Offline HSD99

  • Full Member
  • ***
  • Posts: 226
  • Karma: +6/-0
Re: alert on unresponsive device?
« Reply #7 on: February 19, 2018, 01:00:04 pm »
Same here. My strip is always controllable, but its poll success rate is abysmal.