Page 1 of 1

Trigger an event based upon an Event log entry

PostPosted: Tue Nov 14, 2017 5:41 am
by Busta999
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?

Re: Trigger an event based upon an Event log entry

PostPosted: Fri Nov 17, 2017 5:30 am
by Busta999
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.

Re: Trigger an event based upon an Event log entry

PostPosted: Fri Nov 17, 2017 7:22 am
by FlyingDiver
You might be able to do something if you enable the SQL Logger plugin and use one of it's triggers.

Re: Trigger an event based upon an Event log entry

PostPosted: Fri Nov 17, 2017 11:23 am
by matt (support)
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.

Re: Trigger an event based upon an Event log entry

PostPosted: Fri Nov 17, 2017 12:42 pm
by Different Computers
Isn't there some sort of log reading plugin? Not database reading, log reading.

Re: Trigger an event based upon an Event log entry

PostPosted: Fri Nov 17, 2017 12:44 pm
by Busta999
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.

Re: Trigger an event based upon an Event log entry

PostPosted: Wed Feb 14, 2018 8:31 am
by jheddings
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

Re: Trigger an event based upon an Event log entry

PostPosted: Wed Feb 14, 2018 12:00 pm
by jay (support)
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.

Re: Trigger an event based upon an Event log entry

PostPosted: Wed Feb 14, 2018 8:43 pm
by RogueProeliator
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

Re: Trigger an event based upon an Event log entry

PostPosted: Thu Feb 15, 2018 10:28 am
by jay (support)
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.

Re: Trigger an event based upon an Event log entry

PostPosted: Thu Feb 15, 2018 12:01 pm
by RogueProeliator
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

Re: Trigger an event based upon an Event log entry

PostPosted: Wed Jul 29, 2020 12:41 pm
by Ericbo
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 :)

Re: Trigger an event based upon an Event log entry

PostPosted: Wed Jul 29, 2020 2:51 pm
by jay (support)
https://wiki.indigodomo.com/doku.php?id ... ger#events

Which is the capability discussed above...

Re: Trigger an event based upon an Event log entry

PostPosted: Thu Jul 30, 2020 12:01 am
by howartp
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

Re: Trigger an event based upon an Event log entry

PostPosted: Thu Jul 30, 2020 2:50 pm
by Ericbo
Great Jay, Peter, will use that. Indigo gets better by the day !