Trigger an event based upon an Event log entry

Posted on
Tue Nov 14, 2017 5:41 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Trigger an event based upon an Event log entry

Hi

Is it possible, and if so, how, to create a Trigger upon an entry in the Event log.

Specifically

Code: Select all
   WebServer                       http://192.168.1.176:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=xxxxx&pwd=xxxxxx& load error: <urlopen error timed out>


When a camera becomes unresponsive and the Control Page cannot retrieve the image.

The camera may still be responding to ping so I can't detect an outage there.

Ideally I would like to trap the error message and force a power cycle on the camera, all cameras are on ZWave power switches.

Another one would be if I took the Plex computer down, detect the error message in the Event Log and turn off the Plugin and - auto retry in 5 minutes.

That way the logs will not get burned in Plex error messages.

Is this possible?

Posted on
Fri Nov 17, 2017 5:30 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Trigger an event based upon an Event log entry

Really?

I was pretty sure there was a way to detect an error in the event log and perform an action based up it by a Trigger and that I was just missing it in the documentation.

But it seems that, it is not common knowledge if at all possible.

Hopefully someone will know.

Posted on
Fri Nov 17, 2017 7:22 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Trigger an event based upon an Event log entry

You might be able to do something if you enable the SQL Logger plugin and use one of it's triggers.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Nov 17, 2017 11:23 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Trigger an event based upon an Event log entry

The SQL Logger plugin provides the ability to trigger on errors, but I'm not so sure it will help in this case as Indigo isn't logging that particular line as an actual error.

Image

Posted on
Fri Nov 17, 2017 12:42 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Trigger an event based upon an Event log entry

Isn't there some sort of log reading plugin? Not database reading, log reading.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Fri Nov 17, 2017 12:44 pm
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Trigger an event based upon an Event log entry

I've put this on hold for a couple of days while add in Unifi Cloud Key and USG.

When that is all in and stable I'll return to this issue.

Posted on
Wed Feb 14, 2018 8:31 am
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Re: Trigger an event based upon an Event log entry

Just wanted to add a plug for this ability... I understand the SQL Logger is a way to get there, but a simple trigger that could act on various log levels would be very useful. Being able to take the text of the event source and message and pass it to an action would be a perfect companion to my Prowl plugin :D

Posted on
Wed Feb 14, 2018 12:00 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Trigger an event based upon an Event log entry

jheddings wrote:
Just wanted to add a plug for this ability... I understand the SQL Logger is a way to get there, but a simple trigger that could act on various log levels would be very useful. Being able to take the text of the event source and message and pass it to an action would be a perfect companion to my Prowl plugin :D


Unfortunately, passing information from a trigger (or schedule) to an event is a non-trivial task. The server currently has no way to pass that information, and there's no concept of passing parameter data to an action. So, it's a fundamental change to how things currently flow. Not to say it won't happen some day, but it is a big change from a development and more importantly QA perspective.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Feb 14, 2018 8:43 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Trigger an event based upon an Event log entry

I think something workable could be done via the broadcast & subscribe mechanism, though the functionality would be pretty specific to a plugin/needs. You could have a plugin broadcast on specific messages / types and include a payload with the broadcast. Only thing is the plugin(s) would probably be pretty specific to your own install lest it get really complex really quickly to be completely generic.

Adam

Posted on
Thu Feb 15, 2018 10:28 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Trigger an event based upon an Event log entry

RogueProeliator wrote:
I think something workable could be done via the broadcast & subscribe mechanism, though the functionality would be pretty specific to a plugin/needs. You could have a plugin broadcast on specific messages / types and include a payload with the broadcast. Only thing is the plugin(s) would probably be pretty specific to your own install lest it get really complex really quickly to be completely generic.


I think we'd want to make darn sure we do it the right way the first time so we wouldn't have to go back and change it materially (while maintaining backwards compatibility, etc). Many things lend themselves to an iterative approach but some not so much. I think this is in the latter category. We'll want to put more thought into this before starting to do anything because it has a lot of ramifications all across the product.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Feb 15, 2018 12:01 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Trigger an event based upon an Event log entry

I think we'd want to make darn sure we do it the right way the first time so we wouldn't have to go back and change it materially (while maintaining backwards compatibility, etc). Many things lend themselves to an iterative approach but some not so much. I think this is in the latter category. We'll want to put more thought into this before starting to do anything because it has a lot of ramifications all across the product.

I was meaning for the specific question / request, not as a general solution for the product... my suggestion is more of a point-specific workaround, I recognize that.

Adam

Posted on
Wed Jul 29, 2020 12:41 pm
Ericbo offline
Posts: 133
Joined: Sep 18, 2012

Re: Trigger an event based upon an Event log entry

I was wondering if anything is now available regarding a trigger based on an event log entry. In my case, I would like to stop watering if the sprinkler has been on for too long (either because a manual order or a logic failure). Thank you :)

Posted on
Wed Jul 29, 2020 2:51 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Trigger an event based upon an Event log entry

https://wiki.indigodomo.com/doku.php?id ... ger#events

Which is the capability discussed above...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jul 30, 2020 12:01 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Trigger an event based upon an Event log entry

Eric, I’d be using a Timed Devices plugin for that.

There’s 5 types of timer which behave differently but one will start/count down from eg 15 minutes whenever the sprinkler starts and stop/reset itself when the sprinkler stops.

If it reaches zero, there’s a trigger to do something, ie Stop the sprinkler.

Peter


Sent from my iPhone using Tapatalk Pro

Posted on
Thu Jul 30, 2020 2:50 pm
Ericbo offline
Posts: 133
Joined: Sep 18, 2012

Re: Trigger an event based upon an Event log entry

Great Jay, Peter, will use that. Indigo gets better by the day !

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron