LinuxMCE Forums

General => Users => Topic started by: purps on November 07, 2010, 01:17:23 pm

Title: PnP/easy to set up security measures - please help me
Post by: purps on November 07, 2010, 01:17:23 pm
This weekend on bonfire night, my girlfriend and I were the victims of a burglary.

Obviously this is a very upsetting time for us. I would really appreciate it if anybody could give me a list of security hardware that they feel is effective, and preferably easy for me to set up, so I can get it all sorted out ASAP.

I have already bought x3 Panasonic BL-C10s (if only it had been a week earlier) and I was thinking of some door/windows sensors. Anything else worth getting?

Is it easy to set up notifications to my mobile when the alarm is tripped? Is there an audible alarm inside the house also?

Any pointers would be much appreciated.

Cheers,
Matt.
Title: Re: PnP/easy to set up security measures - please help me
Post by: bongowongo on November 07, 2010, 01:25:23 pm
Scenario
http://wiki.linuxmce.org/index.php/Security_Scenarios
User manual
http://wiki.linuxmce.org/index.php/User_Manual#Security
Tuturial notify
http://wiki.linuxmce.org/index.php/Have_LinuxMCE_notify_me_of_security_alerts
Tutorial Camera IP
http://wiki.linuxmce.org/index.php/IP_Cameras

Also keep in mind that automated lights could aways deter thieves. When away, leave light on, or switch it on when you are away.
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 08, 2010, 12:07:35 am
Matt,

Sorry to hear your news. Been there myself last year.

I got a standard alarm (non lmce) as a deterrent and put an IR camera outside (Foscam IP camera on ebay). Anything to make the criminals move on.
Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 08, 2010, 02:32:55 pm
Thanks for the replies guys. It's a shame that most people I speak to have been through this.

1. I like the look of this Foscam IP camera - are all IP cameras PnP on LMCE? Will the fact that it is wireless cause any problems? http://cgi.ebay.co.uk/2x-Foscam-WiFi-Wireless-IP-Net-CCTV-Outdoor-IR-Camera-/280525481665?cmd=ViewItem&pt=UK_CCTV&hash=item41509f26c1#ht_6672wt_1014

2. Regarding notification settings, my mobile phone is only running web orbiter, not touch orbiter, so I assume I cannot do this properly. However I saw in the admin page that you can list further numbers - will this be sufficient? Does it work well?
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 09, 2010, 10:17:15 pm
Not all IP cameras are plug and play but the Foscam range can be easily made plug and play by adding it's mac addresses to the 'Generic motion IP camera' template. See the wiki page I did:
http://wiki.linuxmce.com/index.php/Foscam_FI8908W

I had the camera you linked to but it was very dark at night. I'd go for the new FI8905W which has more LEDs, but try and get a wider angle lens. The 12mm is a zoom lens. See if any suppliers can get you a 6mm lens for example. See this link:
http://foscam.us/forum/wide-angle-lens-for-fi8905w-t36.html

Wireless is fine as long as you have a wireless access point on your inside network and not too many walls to go through. I inject power over ethernet so I only need one cable and one small hole in the wall. Try searching passive poe on ebay.
http://shop.ebay.co.uk/?_nkw=passive+poe

Be aware that the shutter speed is low on these cameras so unless your criminal moves slowly, you won't get a good picture. However, the criminal won't know that! The picture quality is OK although some colours are poor (greens are slightly purple ... weird).

Regarding notification, I think you can configure notifications to any mobile number using LinuxMCE. I haven't tried this though. Motion can be used as a trigger for security events and will trigger the notifications as well as recording any detected movement. By default these recordings are stored for 5 days (assuming your core isn't stolen too).

In addition the camera itself can send snapshots when motion is detected to either email or an ftp server.

One last thing if you're going for Foscam ... make sure you're getting a genuine foscam and not a clone. Foscam has excellent support and regular firmware upgrades but the clones don't.
Hope this helps.
Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 11, 2010, 10:40:16 pm
Thanks for your various links and advice there, interesting reading.

I had no idea that these passive POE things existed (I know of POE in general, but not in this affordable form!), what a neat idea. Are you using the FI8905W with one of these devices then? Saw a review on youtube, I see what you mean about the colours - purple trees! Still, not too bad for the price from what I have seen.
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 20, 2010, 04:57:03 pm
Barney,

Would you mind lending me a hand in setting up my Foscam FI8905W please? Been on it for 16 hours straight now, and I just can't think of what else to try. I'm not trying to get it working under motion wrapper or anything like that, I just want to be able to view it.

Firstly, I can view the camera through the browser, both through the Foscam admin page and via "hxxp://<CAMERA_IP_ADDRESS>/videostream.cgi?user=XXXXX&pwd=XXXXX", so I know the camera is working.

I tried doing it manually first. Have attempted it using "Generic IP Camera", "Generic Motion IP Camera" and the "Panasonic IP Camera" templates, and in each case I have changed the IP address, the MAC (wired), the path (hxxp://<CAMERA_IP_ADDRESS>/videostream.cgi?user=XXXXX&pwd=XXXXX) and the port (80) when it was missing. I've been rebooting the core between each attempt. My security scenarios for the camera are showing the correct device number.

I then tried the PnP method you described in your wiki page for the FI8908W, but again no luck. Not sure if I am doing it right to be fair. I tried editing the "Generic IP Camera" and "Generic Motion IP Camera" templates with the DHCP range you mention, but the camera was not detected. Are there any other steps apart from this?

Haven't tried this approach with the "Panasonic IP Camera" template yet as I don't want to mess up my pre-existing Panasonic cameras! How are they different than the other templates? Can I somehow backup or make a copy of the template before I attempt it?

Right, off to get a few hours of sleep methinks!

Cheers,
Matt.

EDIT: I've just realised that you can add more than 1 range to a template, so I have now added the range from your wiki page to the Panasonic IP camera template. I've returned the camera to factory settings, reboot the core, and it STILL isn't detected :(
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 20, 2010, 11:18:10 pm
Hi Matt,

Sorry I missed your previous post.

Happy to help you out. Try removing any previously created devices for this camera. I recommend using the 'generic motion ip camera' template with the correct pnp mac address added. Don't forget there is a wireless and wired range for the FI8908W. Check your mac address and convert to decimal to confirm it is in range. It is highly likely that this new camera has a different mac range so add your mac address to the pnp section.

Turn off the camera. Reboot the core fully. Turn on the camera. Cross your fingers.

Try checking the Advanced > Network > DHCP leases page if there is a problem.

Get back to me if you're still having problems.
Barney

PS Might be unrelated but .... I've had some problems getting DHCP working reliably with the LMCE DHCP and the wired Foscam camera. I thought it was just me. I have added my foscam to the external network and added the external ip address in web admin which has solved my problem. You could try this if it isn't given a DHCP address by LMCE.
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 21, 2010, 02:41:47 am
OK thanks, I will try this.

Am I right in saying I need to "Add device" under "Surveillance Cameras" first, in order to be able to edit the template? Should I then remove the device at this stage, once the MAC ranges are in place?

To find the IP, I plugged the camera in, and ran...
Code: [Select]
nmap -sP 192.168.80.0/24...on another machine, because LMCE admin wasn't showing the camera in DHCP leases. However, once I had added the camera manually (during one of my previous attempts, using the IP nmap gave me), it appeared.

Was it necessary for you to carry out any initial steps before giving it the LMCE treatement? For example with my Panasonic BL-C10s, I had to set the username and password by running a Panasonic utility through wine.

Cheers,
Matt.
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 21, 2010, 12:03:42 pm
You should already know the default user and password for the camera. You can change this using the foscam web interface. This information is all you need. You can also set a fixed ip address using this interface if necessary.

No need to add any devices if you are editing an existing template. Advanced > configuration > device templates. Find template 1916 or filter Pluto > IP Cameras and select 'Generic Motion IP Camera'. Just add your converted decimal mac address to the 'generic motion ip camera' template pnp section.

The camera should be detected automatically and LinuxMCE will ask what room it is in. I had already created a room called 'Drive'. Once detected add your 'path' to your new device (will be under Core > motion wrapper) in the LinuxMCE web admin and a descriptive name (Drive Cam etc). That's it.

Hope this helps.
Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 21, 2010, 05:08:32 pm
Bearing in mind I don't want to use motion wrapper, is the approach the same (referring to your last paragraph)?

Do I need to add the motion wrapper template regardless, or will it be automatically added when the camera is detected?

Cheers,
Matt.
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 21, 2010, 07:28:52 pm
OK, I gave it a go without worrying about the motion wrapper stuff, so motion wrapper as a device was not present.

I added the MAC range to the template as per your suggestion, rebooted the core, and hoorah, the camera was detected, so I gave it a room, etc.

However, it still doesn't work. The IP address and MAC address that were assigned to it were the IP and MAC of the Panasonic BL-C10 already present in the system. Everything was where it should be in DHCP leases (and I can view the camera through its own admin page), so I manually changed the MAC and IP to what it should be. I also added the path (hxxp://<CAMERA_IP_ADDRESS>/videostream.cgi?user=XXXXX&pwd=XXXXX). I tested this path in a web browser so I'm happy it's correct. Port is 80 as it should be.

In case it is relevant, I noticed that it was not added as a child of anything; it's at the same level as "CORE" in the devices tree. I tried to edit "Controlled by" (which I assume gives it a parent effectively) but the drop down list was blank.
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 21, 2010, 10:33:45 pm
My suggestions have been based on using the 'generic motion ip camera' template which is created as a child of motion wrapper.

I have limited experience outside of this. The path in this template is used by motion to record movement etc.

Which template did you edit?
Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: rchamp on November 22, 2010, 12:53:58 am
Hey all, if anyone needs help with IP cameras, that is what I do for a living. I work for a security distributor in the US and work as a trainer/consultant etc.

I have access to lots of different brands of cameras. I would love to get involved with trying to test the different brands that I'm privy to.
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 22, 2010, 01:48:41 am
Yep, adding motion first was what was needed. I edited the template you suggested of course :) Thank you very much for your patience with me. It's still a bit, erm, sketchy, but it's definitely progress (referring to the restarts that are required).

Does motion record continuously then? I was hoping I'd be able to turn recording on/off automatically when the alarm was armed/disarmed. I'm not interested in using it as a security sensor, and I can see how to disable that particular aspect through web admin, but couldn't see anything for the recordings.

Cheers,
Matt.
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 22, 2010, 01:22:27 pm
Glad you got it working!
 ;D

Regarding restarts you can always do:
Code: [Select]
sudo /etc/init.d/motion restart
Motion buffers recordings so if motion is detected it has the ability to store the recordings from the moments before the movement was detected. It doesn't store recordings 24/7, just when movement happens. I don't think you can selectively turn motion off the way you want to.

How are you intending to monitor/record the foscam without motion?

If you don't want motion you should look at the alternative I wrote into the wiki. This basically means to create a new template (based on the panasonic scripts) which grabs the snapshot images. You won't need the movement scripts as the camera isn't pan and tilt. So just use the command 84 Get Video Frame.

This script will use the user/password data entered into the device data screen and create the querystring required to grab the snapshot.

I don't usually recommend this method simply because there is no monitoring or recording.
Regards
Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 22, 2010, 04:24:10 pm
It would not have been possible without your help, thank you.

I wonder, could we add "sleep 30 && /etc/init.d/motion restart" or something similar to any part of the system so that this is automatically executed when a quick reload is performed? Where would be the best place to put it?

It's not a bad thing that motion is active 24/7. I'd like to think that it wouldn't be needed whilst the house is occupied, but you never know. Do you happen to know how to increase the 5 day limit on motion recordings? I'm looking at the motion parameters, but it's not obvious.

So yes, I definitely do want motion or something similar, but only for recordings, not interested in using cameras as a motion sensors (there are animals running around my house so that just wouldn't work :)). The reason I said I didn't want to use motion initially was because I didn't realise the motion sensor aspect could be disabled.

I've been experimenting with ZoneMinder as well (in lieu of motion), but had been going off that idea because I didn't want to be enabling/disabling it all the time when I leave/return to the house... but now that I know that motion doesn't switch on/off when you arm/disarm the alarm either (and as I said I don't think 24/7 recordings are a bad thing), ZoneMinder is very much back on the table again.
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on November 22, 2010, 04:58:48 pm
Hi Matt,

I've never changed the default 5 day storage. If it isn't possible I guess you could run a script to copy files every 4 or 5 days to an alternate directory or NAS. I recently discovered that using...
Code: [Select]
cp -u... will only copy over newer files (update) to the destination folder.

I don't use motion as a trigger/sensor either (two cats and a dog) but I do just let it do its thing and record all motion events. I've had 3 foscam cameras monitored under motion for ages with few problems. I bought a z-wave motion detector for use as a lmce trigger (not yet implemented).

For the amount of work that zoneminder integration requires I'd be tempted to try motion first and see if it serves your purpose. Either that or run zoneminder from a different PC (in case your lmce box dies).
Regards,
Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on November 23, 2010, 03:07:00 pm
What a clever idea. I probably would have done it with rsync, but cp -u makes more sense.

I have got zoneminder installed on the core, and I like that I can access the web interface at work or wherever I happen to be, but using motion inside LMCE would be my preference (at this moment in time!).

What do you think about adding...
Code: [Select]
sleep 30 && /etc/init.d/motion restart...in somewhere? A few people have mentioned the need to restart cameras.
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on December 04, 2010, 04:17:25 pm
PS Might be unrelated but .... I've had some problems getting DHCP working reliably with the LMCE DHCP and the wired Foscam camera. I thought it was just me. I have added my foscam to the external network and added the external ip address in web admin which has solved my problem. You could try this if it isn't given a DHCP address by LMCE.

Think I might be getting stung by this. After a while, my Foscams stop working. Looking in DHCP leases doesn't really give me any clues - all seems fine, I can see the device, IP address is assigned, status = static. Typing the IP of the camera into a browser doesn't show the camera's admin page. The cameras require a hard restart before they work again. My Panasonics don't seem to be suffering from these problems.

How do you assign an external IP to the camera? Are there any security/privacy issues with this approach?

Cheers,
Matt.

EDIT: I see the discussion has already started here! http://forum.linuxmce.org/index.php?topic=11093.0
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on December 04, 2010, 05:32:01 pm
Hi Matt,

The external network is simply my wireless home router which is fire-walled anyway.

I can either attach the camera wirelessly in the foscam web utility or using a cable into the adsl router. Then change the path and ip address in the web admin for the camera in lmce.

Barney
Title: Re: PnP/easy to set up security measures - please help me
Post by: purps on December 04, 2010, 06:04:51 pm
Ah I see. I currently have my cable modem going straight into the core, with my wireless router connected to the internal network.

Is your wireless router your only wireless access point? Do your mobile orbiters etc connect to it?

I wonder, I have a spare switch, could I use that to connect up the modem, external NIC of the core and the Foscams? Or do switches not work like that...
Title: Re: PnP/easy to set up security measures - please help me
Post by: b4rney on December 04, 2010, 06:20:29 pm
I have the adsl router mentioned above. This serves the external network.

I have attached an old adsl router to my internal network via its 5 port switch. It is acting as an access point for the internal network.

You could add the static arp record discussed in the other thread to see if that fixes your problem.
http://forum.linuxmce.org/index.php?topic=10134.msg76465#msg76465

Barney