Author Topic: Cameras, Motion, and notifications  (Read 7810 times)

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Cameras, Motion, and notifications
« on: April 03, 2012, 05:19:30 am »
Good day folks!

Could someone familiar with the camera, motion wrapper, and e-mail (or other) notifications possibly point me in the right direction?

I have two DCS-930L IP cameras configured with motion wrapper, which are visible on RoamingOrb and the Admin site (I'm not running MD's yet other than for preliminary testing).  The cameras have on-board motion detection and e-mail alerting, which I'm presently using to e-mail me about motion events.  The onboard software is pretty limited, so I get spammed when light levels change, and when I'm home, and so on.  I'd like to move the alerting and e-mail notification to LMCE, so I can add some smarts to it using event logic, and I'm wondering if:

A) it's functionality that presently exists, or if it'll take something like kmotion,
B) if so, what kind of event is emitted by motion wrapper (tripped, motion, true/false, number of pixels...), and
C) if anyone else is doing the same thing, and how is it working out for them

I'm just hoping to avoid running down a few rabbit holes... I've tried putting together some events, but not sure if I'm on the right track.  If someone could point me in the right direction, I'll go looking for the light  ;)

Thanks!

/Mike

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Cameras, Motion, and notifications
« Reply #1 on: April 03, 2012, 06:30:18 pm »
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Cameras, Motion, and notifications
« Reply #2 on: April 03, 2012, 06:43:53 pm »
JaseP,

Thanks!  But, that has more to do with Motion itself, and not so much with Motion Wrapper and the events emitted by it.  I'm looking to see if someone's done this already, and that the capability exists in the Out-of-the-box LMCE product, or if Kmotion or other integration is required.

Thanks for responding!  Much appreciated!

/Mike

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Cameras, Motion, and notifications
« Reply #3 on: April 03, 2012, 07:09:17 pm »
Try contacting any of the contributors to that wiki page...
http://wiki.linuxmce.org/index.php?title=Motion&action=history

The guys, Joakiml, PW44 & Perspectoff, looks to be the guys with the most (or recent) activity ...
Try PMing them...
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: Cameras, Motion, and notifications
« Reply #4 on: May 04, 2012, 03:09:21 pm »
Mike

Did you get anywhere with this? I've been planning to head down the same route... experimenting with using my IP camera to generate events based on motion detection. Also still struggling a bit searching the wiki and forums to see if there is a "standard" way to do it.

James

Good day folks!

Could someone familiar with the camera, motion wrapper, and e-mail (or other) notifications possibly point me in the right direction?

I have two DCS-930L IP cameras configured with motion wrapper, which are visible on RoamingOrb and the Admin site (I'm not running MD's yet other than for preliminary testing).  The cameras have on-board motion detection and e-mail alerting, which I'm presently using to e-mail me about motion events.  The onboard software is pretty limited, so I get spammed when light levels change, and when I'm home, and so on.  I'd like to move the alerting and e-mail notification to LMCE, so I can add some smarts to it using event logic, and I'm wondering if:

A) it's functionality that presently exists, or if it'll take something like kmotion,
B) if so, what kind of event is emitted by motion wrapper (tripped, motion, true/false, number of pixels...), and
C) if anyone else is doing the same thing, and how is it working out for them

I'm just hoping to avoid running down a few rabbit holes... I've tried putting together some events, but not sure if I'm on the right track.  If someone could point me in the right direction, I'll go looking for the light  ;)

Thanks!

/Mike

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Cameras, Motion, and notifications
« Reply #5 on: May 04, 2012, 03:25:13 pm »
Jamo,

I've installed Kmotion2, but haven't got it all working yet.  I haven't had a lot of free time to investigate, as I'm doing a college zOS course on the side, and it's chewed up way more time than I'd anticipated.

I'm still trying to figure out how to integrate it cleanly, so that MotionWrapper and Kmotion2 don't fight over control of the cameras or events.  Kmotion2 expects to do the camera configuration and management, and it's not managed the same as the underlying motion on the system.  Plus I'll have to figure out how some of the LMCE infrastructure works, so it would all work "automagically"... so, I've got a bit of a learning curve ahead of me.  I might also look at ZoneMinder as an alternative front-end and for events, just to compare/contrast functionality, capabilities and possible integrations.  (I've rolled out ZoneMinder in the past).

The ironic thing is that I first started looking at LMCE as a means to reduce the level of effort required to maintain my own "home-rolled" infrastructure... ;)

Sorry I can't be of more help than that!

/Mike

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: Cameras, Motion, and notifications
« Reply #6 on: May 04, 2012, 03:43:36 pm »
No sweat, I'll tinker as well and we can share notes but I will probably limit mine to tinkering under the motion-wrapper and lmce umbrella if possible.

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Cameras, Motion, and notifications
« Reply #7 on: May 04, 2012, 05:01:36 pm »
Jamo,

Cool!  Thanks!  Being a SysAdmin type, my strengths are more in the system and infrastructure layers, so I'll look at getting Kmotion2 and motion playing nicely together.  We'll definitely trade notes...

Thanks for the assist!

/Mike

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Cameras, Motion, and notifications
« Reply #8 on: May 07, 2012, 03:22:02 am »
Question to anyone presently using the Cameras functionality.  How do you presently access or view the stored camera footage?  I don't see anywhere to view the stored events/alerts in the Roaming Orb Orbiter, I only see it in the LMCE Web Admin (Security -> Alerts Log).  Am I correct in assuming that this functionality is presently limited to the WebAdmin only (meaning not present in MD Orbiters)?

Thanks for your time!

/Mike
« Last Edit: May 07, 2012, 03:31:02 am by mkbrown69 »

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Cameras, Motion, and notifications
« Reply #9 on: May 07, 2012, 03:47:36 am »
Mike

Did you get anywhere with this? I've been planning to head down the same route... experimenting with using my IP camera to generate events based on motion detection. Also still struggling a bit searching the wiki and forums to see if there is a "standard" way to do it.

James


James,

You can generate e-mail alerts using the respond to events Wizard.  The basic gist of it is:

A sensor is tripped, what device equals your camera, when = Day, Night, or blank, What trigger state = tripped = 1.

You can then add commands using the advanced wizard.

Pick the General info Plugin on the core, and choose event Send Email.  Fill in the blanks as listed.  That will just send you an e-mail; no pictures attached.  Presuming you're on 10.04, you'll need the package 'heirloom-mailx' installed; that is the mailx that modern Ubuntu's are using now.  The Mailx template listed in the Wiki is no longer necessary, and probably should be removed from the wiki to prevent confusion.

It would be cool if the General Info plugin Send email function was extended to support directly adding attachments, and for allowing a script to be run which is then piped into the mailx command for e-mailing.  The security plugin might need to be extended to transfer/transmit security and sensor data to the Send E-mail function.  Just thoughts... I'm not volunteering you for anything  ;)

I'm looking at Kmotion2, but starting to think that integrating it might not be the best idea.  It may be better to figure out how the masks and other advanced functionality is done, and add that directly into LMCE Web-Admin pages.  Give me a couple of months to figure this out; I'll likely post interim measures along the way.  I've done some PHP scripting in the past and fairly recently, so I'm a less intimidated by that than by C++ code.

Hope that helps!

/Mike

P.S.  I found some folks who have configured their (non-LMCE) motion.conf  to send e-mails with picture attachements.

on_picture_save mailx -s “Test mail” -a %f email@gmail.com
« Last Edit: May 07, 2012, 04:35:56 am by mkbrown69 »

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: Cameras, Motion, and notifications
« Reply #10 on: May 08, 2012, 11:00:06 am »
Currently, I view it from another machine via the network drive ;-) Haven't had much time to fiddle but keen to look more into this. Keep at  it, Mike.

Question to anyone presently using the Cameras functionality.  How do you presently access or view the stored camera footage?  I don't see anywhere to view the stored events/alerts in the Roaming Orb Orbiter, I only see it in the LMCE Web Admin (Security -> Alerts Log).  Am I correct in assuming that this functionality is presently limited to the WebAdmin only (meaning not present in MD Orbiters)?

Thanks for your time!

/Mike