Respond To Events By Email

From LinuxMCE
Jump to: navigation, search

This tutorial will show you how to setup LinuxMCE to respond to events by Email. Example would be emailing a notification when a security sensor is tripped.

Step 1. Configure your mail settings.

Wizard > basic info > Email setup

The questions asked here are fairly straight forward if you know the correct answers. if you are unsure i would suggest trying to configure pop/smtp account on a computer at home first with the same settings. remember your smtp server must be able to authenticate with a username and password.

use the test button to confirm your mail settings are correct.

Step 2.

Home > My Devices > Core > DCERouter > General Info Plug-in > send command to device > Send Mail

test directly in command line:

Shell>mail -v youremailhere
Subject: asdf
just add a period and enter after this line
Mail Delivery Status Report will be mailed to <root>.

see if postfix is running

Shell>pstree | grep master

logs go watch.

tail -f /var/log/pluto/DCERouter.log
tail -f /var/log/mail.log
tail -f/var/log/syslog

Step 3. Event Setup

Event handler > Respond to events
Description: Front Door Tripped
New Event*: A Sensor is tripped
(click add)

From here you can select your devices and events.

2. Send Mail.

Add command using: Advanced
Device: pull down menu. select "General Info Plugin" it shows up under DCErouter.
Command: Send Mail
Fill out the subject / body / email.

i used the advanced menu to edit the event handler. it seems to be a little easier. here are some screen shots.

Event1.png Event2.png Event3.png Event4.png

More info on event types: Event criteria