Author Topic: Security mode not working properly !  (Read 3443 times)

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Security mode not working properly !
« on: September 25, 2007, 01:51:44 pm »
as described in this thread:
http://forum.linuxmce.org/index.php?topic=2542.0

I setup my security camera (controled by the motion detector), that is working.
Then I setup the "active sensor" in admin website.
I set it up as bellow:
* monitor mode unchecked
* disarmed mode: N "unchecked", action "do nothing"
* armed-away: N "checked", action "Security"
* armed-at home: N "checked", action "Announcement"
* sleeping: N "checked", action "Snap picture"

rest as armed away


My problem is that I change the mode and:
1/ no info about the current mode in the top bar
2/ the mode is changed (see in statut of the admin website), but video still record on motion, picture as well, like if there is no difference between mode!! and before, I had the security breach that appears when motion detected, but now I don't have the alert any more, and if I reset the parameters (monitor mode  unchecked, all N checked and all in "security", it come back) !!

It's very painfull. If someone could help I'll be gratefull.
« Last Edit: March 20, 2008, 10:39:22 am by domotiqa.com »
http://www.domotiqa.com - home automation

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 891
  • Living with LMCE
    • View Profile
Re: Security mode not working properly !
« Reply #1 on: September 25, 2007, 02:46:33 pm »
Regarding

/2. Motion deosn't know what state is LMCE in. Currently this is not implemented. Feel free to contribute...

Regards.

Bulek.
Thanks in advance,

regards,

Bulek.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #2 on: September 25, 2007, 04:09:37 pm »
hy and thanks for the answer ::) there is 2 days I try to figure outwhy'not working !!

Do you have any key starting to work on it !!
I will need this fonctionnalities !!!!
You said it's not implemented, so why on the first linuxmce.com webpage you can read:
Quote
Security: Uses your existing home alarm, surveillance cameras, lights, phones and tv's to notify you on your mobile phone of any security alerts with the option of reseting the alarm or broadcasting your voice in the house over the tv's

Thanks for replying, and given any help. I can work on it!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #3 on: September 25, 2007, 04:45:19 pm »
o, I'm sorry, I re-read your post:

Quote
Integration with motion is not fully done. Actually only config files are auto generated from settings in admin page and then more or less motion works on its own. Communication happens only on few occasions :
- when LMCE needs snapshots it sends signal to motion and than motion_wrapper reads latest snapshots and send it back (view camera scenarios for instance)
- when motion is detected, then proper DCE messages are sent. In ThreadX.conf you have :


Code: [Select]
# sending pluto tripped on/off events on motion start/end
on_event_start /usr/pluto/bin/MessageSend 127.0.0.1 51 -1001 2 9 25 1
on_event_end /usr/pluto/bin/MessageSend 127.0.0.1 51 -1001 2 9 25 0

and that cause sensor tripped on and tripped off events that are sent to LMCE. Currently even motion http interface is not supported - I did all the work I could at that time, but now have no time to enhance it. But everone is welcome to rool sleeves up, I'll help as much as I can with internals and how to do it...

BTW, I think that you have current house status displayed on main page of Orbiter...

So I would like to have the work you did and some how to in order not to loose to much time !!! Then I would help coding !!

however, why on main linuxmce page, there is
Quote
Security: Uses your existing home alarm, surveillance cameras, lights, phones and tv's to notify you on your mobile phone of any security alerts with the option of reseting the alarm or broadcasting your voice in the house over the tv's
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #4 on: September 26, 2007, 04:15:47 pm »
So when using motion interface, this part don't work anymore ?

http://plutohome.com/wiki/index.php/Security_breach
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #5 on: September 26, 2007, 06:29:43 pm »
To view the motion video on each orrbiter, just make a symlink as bellow:

Code: [Select]
$ cd /home/public/data/videos
$ sudo mkdir security
$ sudo ln -s /home/cameras/camera_number/movies/ /home/public/data/videos/security/name_of_camera

Only one problem, all files are mixing each other, so you have to sort by filename
« Last Edit: September 26, 2007, 09:02:56 pm by gilles.cresci »
http://www.domotiqa.com - home automation

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 891
  • Living with LMCE
    • View Profile
Re: Security mode not working properly !
« Reply #6 on: September 26, 2007, 08:28:58 pm »
So when using motion interface, this part don't work anymore ?

http://plutohome.com/wiki/index.php/Security_breach
It probably will. You just have to distinct two possibilities to use IP camera under LMCE :
1. is to add it as GSD device, where LMCE will directly communicate with it. Take a look at template, LMCE gets snapshot directly from web page of camera....But no motion wrappper involved in this combo
2. to add it as ip camera as child device of motion wrapper (then it will be treated same as all other analog cameras - with motion detection, recording etc....). You actually add it as analog camera but then change Configuration field as written on Wiki somewhere, so motion will know it's ip camera.

Number 1. is plug'n'play so majority of users probably get confused with it.

Maybe you can try to change few Wiki entries about this matter. it obviously is confusing...

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #7 on: September 26, 2007, 09:09:33 pm »
I, i'm in the second option, as explained.
However, that http://plutohome.com/wiki/index.php/Security_breach
doesn't work any more for me !!
Alert are still there in the alert log/statut of admin website, but no security breach movie, and no alert on orbiter !!

You said the link between mode in lmce and motion is not implemented, what do you mean, actually, jpeg are stored on each motion. Movie also are recorded.
I'd like to know what is not implemented (with camera controlled by motion):
1/ security breach on motion then video (I guess it is implemented)
2/ alert on orbiter (i guess yes)
3/ alert on orbiter depending of the "active sensor"  setup in admin website (I guess not)
4/ alert with link of the video (filename of motion) ( I guess not)

thanks because I thing I broke my lmce install
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #8 on: September 28, 2007, 02:21:26 pm »
I decided to re-install every thing in order to restart clean !

here is the "virtual" statut of modules:
can't figure out where, will look for it !!!

but I'm not sure it's true (security part)!!

What about the idea of making a "motion software sensor" as gsd for each camera.
For example, I add new motion interface and new camera as analog camera controlled by motion.
Then I add a "motion software sensor" and I make a link between sensor and camera, in order to make mode easily working!
I will use the http://www.lavrsen.dk/twiki/bin/view/Motion/MotionHttpAPI to dialog with the fake sensor "motion software sensor"

I will digg it !
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #9 on: September 28, 2007, 02:25:08 pm »
I was just thinging that the state of the camera controlled by the motion wrapper is already known by lmce (just a look in the alert log show it). Maybe if we separate this part of the wrapper and associate it with a fake sensor, no developpment needed. Because lmce know how to deal with sensor associated with camera !!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #10 on: September 28, 2007, 02:52:07 pm »
it's interresting to read:
http://wiki.linuxmce.org/index.php/Arm_or_disarm_the_alarm_using_the_Orbiters

imagine the motion config file that send message not to the camera but to the virtual sensor !! Then the state for each mode would work, and we can link camera controlled by motion and the sensor. So when a sensor is triggered, then the camera appears too !!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #11 on: October 03, 2007, 11:11:41 am »
Ok, here is what I found out.

The camera settings in active sensor recognised are only change made to unarmed mode ! When the mode behaviour is security, we've got an alert. When it's on nothing, we've got nothing. The video is always recorded by the motion software.

So I tried to create a security device: motion detector. I had a look of its ID 39.
The ID of the camera (controled by motion) is 32. I add the 39 sensor to this security camera 32. In active sensor, I setup to nothing all action for the camera for every mode. For the sensor 39, I setup unarmed: nothing no alert, and all other mode are to security mode with alert.

When we have a look in the threadX.conf (/etc/motion), we can see that message are send to the ID 32 (camera).
Code: [Select]
# sending pluto tripped on/off events on motion start/end
on_event_start /usr/pluto/bin/MessageSend 127.0.0.1 32 -1001 2 9 25 1
on_event_end /usr/pluto/bin/MessageSend 127.0.0.1 32 -1001 2 9 25 0

SO I tried to change 32 to 39. The aim is to sendMessage to the sensor that it has to triggered to motion detection.

Yet it's not working. I don't know about message send to dce, so I guess I have to change parameters !!
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #12 on: October 03, 2007, 11:58:36 am »
command in deltail should be :
on_event_start /usr/pluto/bin/MessageSend 127.0.0.1 32 -1001 2 9 25 1

server 127.0.0.1
from 32 (camera)
to -1001 don't know, -1000 is dcerouter however -1001 ??
Event 2
9 the event id
set param 25 to value 1
« Last Edit: October 03, 2007, 12:39:14 pm by gilles.cresci »
http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: Security mode not working properly !
« Reply #13 on: October 03, 2007, 12:29:11 pm »
I tried to create an event on motion detector called Sensor Tripped, number 9

and modify the threadX.conf file
on_event_start /usr/pluto/bin/MessageSend 127.0.0.1 32 39 9 1
on_event_stop /usr/pluto/bin/MessageSend 127.0.0.1 32 39 9 0

no result yet
« Last Edit: October 03, 2007, 12:41:39 pm by gilles.cresci »
http://www.domotiqa.com - home automation

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Security mode not working properly !
« Reply #14 on: October 03, 2007, 12:35:49 pm »
You can find some info on MessageSend in the wiki: http://wiki.linuxmce.org/index.php/MessageSend
"Change is inevitable. Progress is optional."
-- Anonymous