Get e-mail when EPG123 records an Error or Warning

An evolving, supported alternative to Rovi
Important Information
★ Download the latest EPG123 here: http://epg123.garyan2.net <> Setup guide here: http://epg123.garyan2.net/downloads/epg123_Guide.pdf

Get e-mail when EPG123 records an Error or Warning

Post#1 » Sun Jun 25, 2017 12:23 am

Some of you are probably already doing this on your own, but I thought I would post the instructions and the Script I use to e-mail me when EPG123
records an error and/or warning event in the Windows Media Center event log. This is possible since Gary )in response to my nagging :D ) started using a
unique error Id as of release 1.1.1 of EPG123. Warning events are available as of release 1.1.5. So If you are using 1.1.1 or newer you can use this method.
I notice there are some compulsive types who check their EPG123 run results every day. This will allow you to get part of your life back ;)
I have been using e-mail warnings for lots of possible problems with my HTPC's so I don't get nasty surprises like guide data running out or hardware failures, etc.

The method is pretty simple, it makes use of the feature in Win 7 whereby you can run a program (or script) when a specified event is written to the Event Log.
You will need three things.

1. The attached Batch file
2. A simple command line callable e-mail client which can be found Here: http://commandlinesendmail.blogspot.com/
3. Create some event triggers in Task Scheduler

Here are the setup instructions: (If I had more Windows application skills this could be set up with a nice GUI based app rather than the manual method I will describe here)

1. Unzip the attached batch script and place it in your EPG123 folder.
2. Download the senditquiet app and unzip it and place it in your EPG123 folder. (Download link is on the referenced page at the bottom)
3. Edit the batch script with an editor of your choice. (e.g. notepad) and fill in the
information that the script comments document. You will need to know how to setup SMTP
login parameters for your e-mail provider. I have the parameters except your logon/password
described in the script comments for two widely used e-mail providers (Comcast, gmail) If you are using
a different provider, usually the provider documents somewhere e.g. on their web site what parameters e-mail clients need to set up SMTP mail sending.
Set up for either Brief messages (Which are short enough that they could be Texted if you want to set that up) or Full messages which will e-mail you
a warning with the event log entry and most recent EPG123 run's log entries attached. If you want Text message when failures are detected, you can select Brief
and then set the destination to your wireless providers e-mail text message portal. (many/most providers have portals. The script comments give the example for Verizon).
You can test your e-mail setup to see if it is correct by configuring for brief messages and double-clicking the script and you should get the warning in your e-mail/text.
4. Create Event triggers in Task Scheduler to invoke the script when EPG123 writes events to the Event Log,
To run Task Manager Control Panel -> Administrative Tools -> Task Scheduler
To Create an Event Trigger:
Click on Task Scheduler Library
Then Select Create Basic Task under the Actions header
Give you event a name: e.g. EPG123 Error notifier
Give it a description: e. g. Send e-mail on EPG123 errors
Click Next
For when do you want task to start select "when a specific event is logged"
Click Next You'll get a further menu to fill in:
For the Log pull-down select "Media Center"
For the source pull-down Select "EPG123" for Client errors Select "EPG123Client"
For event ID fill in 57005 for Errors or 47825 for Warnings
Click Next
For what action you want to perform select "Start a program"
Click Next
To fill in the Program/Script selection Click the Browse button and navigate to your EPG123 folder where you placed the sendEPGerror script
select it and click open
If you are setting up to trigger on warnings then fill in the optional arguments space with "warning" (not in quotes)
Click Next
you will get a final summary screen, select "open the properties dialog for this task when I click Finish"
Click Finish
In the properties Dialog select "Run whether user is logged on or not"
also select "do not store password. ..."
Click OK

You have now set up such that you will get an e-mail or text when EPG123 fails.
You can also create triggers for EPG123 warnings and EPG123Client errors and warnings.
I actually have 4 triggers created, one each for EPG123 errors and warnings (this will tell you if you failed to create an mxf file when EPG123 tries to pull new guide data)
and one each for epg123Client errors and warnings.
Notes:
It's possible you may need to set the run with highest privileges setting in the event trigger properties but you can try it without first.
Warnings may get annoying if you tend to run downlevel versions of EPG123 as the there is an update available message generates a warning.
After creating your event triggers you may need to reboot your system before they take effect.

Hope some of you find this useful.
Attachments
sendEPGerror.zip
Batch Script to e-mail EPG123 errors
(1.51 KiB) Downloaded 9 times
stuartm
 
Posts: 329
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details

Post#2 » Thu Jun 29, 2017 8:20 pm

I noticed last night when I got a time discontinuity warning in my e-mail that The long version error message was pulling the trace log results while it
was still being written. I have added a delay in so the update has a chance to finish before grabbing the log data.
Here is an updated sendEPGerror batch file.
Attachments
sendEPGerror.zip
Updated send error script file
(1.59 KiB) Downloaded 13 times
stuartm
 
Posts: 329
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details

Post#3 » Thu Jun 29, 2017 10:50 pm

Which version are you running? For earlier version, I had duplicated the event logging that WMC does and it would be as you say. My recent rewrites shouldn't behave like this and will log everything at the same time when complete.
User avatar
garyan2
 
Posts: 2239
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#4 » Fri Jun 30, 2017 12:02 am

I'm running 1.1.8, but my excerpt from the trace log only shows up to the start of the mxf import, so it doesn't get the whole run in the e-mail message. Not a big deal.
Thinking about it, not sure if my delay I added is long enough for mxf import to always complete anyway.
One other thing i noticed was on one of my machines that got the warning it looked like the trace log had rolled over in mid run so the error part of the trace didn't get captured anyway (however the event entry had the information about what had happened).
stuartm
 
Posts: 329
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details

Post#5 » Fri Jun 30, 2017 12:40 am

There are actually 2 event sources now. EPG123 handles the creation of the mxf file. epg123Client handles the import. So you will have 2 sources that create their own warning or error statuses in the event log.

So in a timeline...
When EPG123 completes the mxf generation, or errors out, the Event Log will be updated with the complete log entry of that run. <= your trigger
epg123Client will then start and when complete will write to the Event Log with it's complete log entry of that run.

During the whole time, trace.log file is being opened, line(s) written, and closed until both actions are complete.

Question: Is there something you want to see in the Event Log that you can only find in the trace.log file? The Event Log will have all the same Warnings and Errors as the trace.log file.
User avatar
garyan2
 
Posts: 2239
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#6 » Fri Jun 30, 2017 7:07 am

Nothing specific. I have not seen all the Warnings/Errors possible obviously so I am just trying to gather all the information available when one happens and deliver it so that it's easy to see what the problem was without having to go and run event viewer and use an editor to scan through the trace log. Just trying to be thorough ;)
stuartm
 
Posts: 329
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details

Post#7 » Fri Jul 07, 2017 8:21 pm

Hi Gary, If you still watch this thread I have a suggestion. I notice you put Alerts in the trace log for MD5 errors and Time discontinuities but no event log Warnings. Would it be possible for either a warning to generate for those or possibly just an info event entry but with a unique ID so that a e-mail could be sent (if wanted) when they occur?
Thanks.
stuartm
 
Posts: 329
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details

Post#8 » Fri Jul 07, 2017 8:31 pm

Is this recent warnings? All warnings and errors should now be repeated in the eventlog as well since v1.1.5 I think.
User avatar
garyan2
 
Posts: 2239
Joined: 27 November 2015
HTPC Specs: Show details
- Gary
Stomping out the Rovi disease, one media center at a time. http://epg123.garyan2.net

Post#9 » Fri Jul 07, 2017 9:20 pm

Oops, sorry, my bad :oops: I had scrolled back in my log prior to my switch from 1.0.2 to 1.1.8 when I saw those Alerts. Haven't gotten any with the newer release.
Sorry for the noise.
stuartm
 
Posts: 329
Joined: 5 November 2012
Location: Longmont, CO
HTPC Specs: Show details


Return to EPG123



Who is online

Users browsing this forum: No registered users and 3 guests

cron