Motion detector and log

I have a Motion Sensor and I would like to see a log of whenever the motion sensor (ZIR010) has been triggered. So, no automation or whatever, just a log with the time when it was triggered.

Seems simple but I can’t figure out how to do that…

Any help much appreciated!

Depending on what you want exactly, it could be done in the tab “Notification” of the device.

Yes, that worked - I receive an e-mail for every notification. Also, I can get it to send me sms-es (from +61… eh, Australia??! wow mates…)

But this is not exactly what I want. I just want to be able to review a log file if required which shows me the notification information. For instance, can’t I add some virtual “log” device, which I can configure to log and/or e-mail, depending on a ruleset?

For example, a device with rules like this:

Action X: log to file P
Action Y: log to file Q, e-mail contact R
Action Z: log to file Q, e-mail R, sms contact R

MotionSensorA tripped Yes: Action X
MotionSensorA tripped No: Action X
DoorSensorA tripped Yes: Action X, Action Z
DoorSensorA tripped No: Action X, Action Z
MotionSensorB tripped Yes: Action X, Action Y, Action Z
MotionSensorB tripped No: Action X
DoorSensorB tripped Yes: Action X, Action Y, Action Z

I thought you were looking for something else… :wink:

I’m sure someone more experimented will jump in…

You can go to the Events tab in myMios. Then you can select a device and a calendar will be shown with the days that device has notifications. Click on a day and you can see all the notifications for that device on that day. You can click on the event for more detail on the particular event. Not exactly what you were looking for, but closer.

Note that you just need to create the notification. You do not have to send it to an email or SMS to have it display in the Events tab.

Add the following code to the Luup tab of your scene (event ‘Sensor tripped: Yes’):

local outf ='/etc/cmh/sensor_events.log', 'a')
outf:write('%Y-%m-%d %H:%M:%S '))
outf:write('SENSOR TRIPPED\n')

To access the logfile, [tt]ssh[/tt] to your Vera. Use [tt]ftpput[/tt] to transfer the logfile to a remote ftp server.

Thanks again wscannell, that’s indeed better. Shame on me that I missed that…

@Ap15e: I’ll try that as well, that’s getting really close. The next step is to have the logs written off-site with Amazon S3 / JungleDisk - does anyone have experience with that?

Great forum btw!!

I hope this is not seen as hijacking your thread, however I only wish to offer that a post I made last week asking about SNMP monitoring and push events from vera to another monitoring/management system may be beneficial and answer posts I’ve recently been reading:

My suggestion (if I could have a say in an enhancement to vera configuration) is allow vera to be configured to push/send to another logging/management system like ZABBIX (similar to the following

I am one for consistent monitoring and I use ZABBIX for all home systems/servers, networking and bandwidth flow, and soon power… I have triggers established when events occur, and it would be my opinion that there are systems out there that could be leveraged and one might say better suited to track the data/events, graph them, alert/warn based on the values and rules, thus allowing vera to stay more focused.

Again, I hope this isn’t seen as hijacking or getting off topic.