Visitor counter, Heat Map, Conversion tracking, Search Rank

Home Security system using Zoneminder

A home security system consists of three essential,namely the Camera, the Digital Video Recorder(DVR) and the Internet. The camera which we have choosen are IP based camera having 720p video resolution. The camera are IP based and also having the wireless functionality, thereby reducing the effort required in cabling and quick installation/ re-location is possible. Now as far as the DVR goes we have gone in for an Free and Open Source(FOSS) Linux/Windows based Zoneminder software. As far as the Internet access to the DVR is concerned we require a dynamic-dns based URL to identify ourselves on the Internet. For that my personal choice is noip. 

 1. Camera

 

I bought three different camera from ebay as under. First Xiaomi YI Wifi HD 720P IP Wireless NIGHT VISION Home Security Smart CCTV Camera for Rs 2600. Second 720P Wireless WIFI Network IP Camera Outdoor Onvif H.264 IR Night Vision for Rs 2759 and third Sricam SP007 720P HD IR Network Wireless Outdoor Security IP Camera for Rs 3476

 

Its took me a lot of effort in order to get these camera to stream the video and for it to be seen on Zoneminder.

 

I will touch upon these in subsequent paragraphs. First the Xiaomi.....

 

 

Second the Wireless WIFI Network IP Camera Outdoor Onvif H.264 IR Night Vision which did neither have a make or a model.

To start with , the camera which I bought from ebay didn't have a manual. The only clue to the puzzle was an IP address which was written on the camera, which was 192.168.1.10 and the user id was admin. However, later I realized, that the camera was a used camera and hence someone had already changed the default IP. However, the user id was still the same. So, in order to find the IP of the camera, I connected the camera using a cross-cable to my laptop and started Wireshark packet sniffer program in my laptop and I could find the IP address of the camera as it was the only other system connected in the network. The IP address of the camera was 192.168.1.116. 

Thereafter, I did Nmap on the camera IP to find open ports. I could see that the camera was listening on port 80 (http), 554 (rtsp), 21 (telnet),  and 8899. Therefore, I opened a web browser and pointed it to the camera IP address. Little did I realize that the horror was not over as the webpage that opened was in Mandarin. Further, using my basic instinct, when I clicked the icon to play it said  that the required plugin is not there. So, I searched on the net with the keywords  as under

192.168.1.10   User:admin IP camera and I got a list of websites. As luck would have it, I chanced upon a webpage which had a pdf IPCamera Quick Guide.pdf. As the web interface in the manual and as seen by me appeared to be the same, I took it that this manual which I chanced upon is for the camera that I had procured. In that manual, there was a weblink http://xmeye.net. I opened the webpage and went to the link Download Web from where an executable file Active.exe was downloaded in my PC. From this, I gathered that the camera web interface was designed for Windows OS and not Linux, which I work on. Therefore, I used Virtual Windows OS using VirtualBox and opened the IP address of the camera in Chrome browser. In this also, on clicking the play button, I was told that the required plugin was missing. Again, taking the cue from the downloaded exe file, I presumed it was an Active X plugin, so I opened the link in Internet Explorer after installing Active.exe file. 

Now, in the Internet Explorer, there was an option to change the language to English. Furthere, on logging in with user admin and password blank, I could see the camera stream when I clicked the play button. Thereafter, it wsa simple configuration, which is self-explanatory when you browse the web interface. 

The only challenge left was how to view the stream in vlc or zoneminder. I knew that the camera is streaming an rtsp stream but how to get to it? So, I searched the net again and found this wonderful string: rtsp://[IP address]:554/user=[user Id]&password=[your password]&channel=1&stream=0.sdp? 

And so when I put this url in zoneminder I could view the camera. 

 

Third Sricam SP007 720P HD IR Network Wireless Outdoor Security IP Camera, I would say as compared to the other two this was a cake walk.

 

 

 

 

2. Zoneminder : Digital Video Recorder 

To start with install zoneminder, ZoneMinder runs on a LAMP stack. The ZoneMinder Wiki has installation instructions for various Linux versions. Pay special attention to configuring ZoneMinder to work with Apache. By default Apache disables CGI, which ZoneMinder needs. 

To install zoneminder

sudo apt-get install zoneminder

Now Change short_open_tag = Off in /etc/php5/apache2/php.ini to short_open_tag = On, and in /etc/init.d/zoneminder add sleep 15 on the line above zmfix -a, like this:

 /etc

start() {

        echo -n "Starting $prog: "

    sleep 15

    zmfix -a

        $command start

Now create link between files as under

$ sudo ln -s /etc/zm/apache.conf /etc/apache2/conf-enabled/zoneminder.conf

 

Now restart Apache 

$ sudo service apache2 restart and go to http://localhost/zm

Now go to options and check OPT_USE_AUTH  in system tab, at this stage you may get locked out and you will have this window appearing. 

 

Dont worry, just reset the admin password by foloowing the steps below 

 

$ mysql -u root -p

Enter password: 

 

enter the password you entered during zoneminder installation. Reset password by following steps as under

 

mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| performance_schema |

| zm                 |

+--------------------+

4 rows in set (0.04 sec)

 

mysql> use zm

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

 

Database changed

mysql> update Users set Password="" where Username="admin";

Query OK, 1 row affected (0.04 sec)

Rows matched: 1  Changed: 1  Warnings: 0

 

mysql> 

 

Now go to http://localhost/zm and using user admin with password blank login into zoneminder. Now go to user tab and create users with viewing rights as under.

 

 

now add new monitors

To add camera which support onvif and stream using rtsp  add it under ffmpeg

in source path add rtsp://[user]:[password]@[IP]:554/onvif1

To add local camera use source type local and device path as /dev/video0

 

 

Now click Monitor-1 and if you get a blank screen as under, enable cgi module

 

sudo a2enmod cgi

sudo service apache2 restart

 

Ok this was all that is required to configure zoneminder, now to login your system from Internet you need to configure dyanmic dns.

 

 

3. Internet Access to the DVR

Now we need to create a noip dynamic dns mapping to your dynamic ip given by your ISP.

For this install noip linux client in your pc, by downloading noip updation client noip-duc-linux.tar.gz

 

 

wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz

 

tar -zxvf ./noip-duc-linux.tar.gz 

cd noip-2.1.9-1

 

 

$ sudo make install

if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin;fi

if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi

cp noip2 /usr/local/bin/noip2

/usr/local/bin/noip2 -C -c /tmp/no-ip2.conf

 

Auto configuration for Linux client of no-ip.com.

 

Please enter the login/email string for no-ip.com  This email address is being protected from spambots. You need JavaScript enabled to view it.

Please enter the password for user 'This email address is being protected from spambots. You need JavaScript enabled to view it.'  ****************

 

Only one host [msXXXXX.ddns.net] is registered to this account.

It will be used.

Please enter an update interval:[30]  30

Do you wish to run something at successful update?[N] (y/N)  y

Please enter the script/program name  

 

New configuration file '/tmp/no-ip2.conf' created.

 

mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf

 

#configure a client

sudo /usr/local/bin/noip2 -C

 

Auto configuration for Linux client of no-ip.com.

 

Please enter the login/email string for no-ip.com  This email address is being protected from spambots. You need JavaScript enabled to view it.

Please enter the password for user 'This email address is being protected from spambots. You need JavaScript enabled to view it.'  ********

 

Only one host [msXXXXX.ddns.net] is registered to this account.

It will be used.

Please enter an update interval:[30]  

Do you wish to run something at successful update?[N] (y/N)  y

Please enter the script/program name  

 

New configuration file '/usr/local/etc/no-ip2.conf' created.

 

 

 

 

#display info about running clients

sudo /usr/local/bin/noip2 -S

No noip2 processes active.

 

Configuration data from /usr/local/etc/no-ip2.conf.

Account This email address is being protected from spambots. You need JavaScript enabled to view it.

configured for:

host  msXXXXX.ddns.net

Executing username=manindersinghgill%40gmail.com&pass=XXXXXXXXXX&h[]=msXXXXX.ddns.net upon successful update.

Updating every 5 minutes via /dev/wlan0 with NAT enabled.

 

 

Now we need to start the noip deamon.

 

sudo /usr/local/bin/noip2 -d

> GET http://ip1.dynupdate.no-ip.com/ HTTP/1.0

> User-Agent: Linux-DUC/2.1.9

< HTTP/1.0 200 OK

< Server: xipha

< Date: Wed, 02 Feb 2016 16:21:47 GMT

< Content-Type: text/html

< Connection: close

< XXX.203.164.XXX

! Our NAT IP address is XXX.203.164.XXX

! Last_IP_Addr = 0.0.0.0, IP = XXX.203.164.XXX

> GET http://dynupdate.no-ip.com/ducupdate.php?requestL=dXNlcm5hbWU9bWFuaW5ky5kZG5zLm5ldCZpcD0xMTcuMjAzLjE2NC4yOQ== HTTP/1.0

> User-Agent: Linux-DUC/2.1.9

< HTTP/1.1 200 OK

< Date: Tue, 02 Feb 2016 16:21:48 GMT

< Server: Apache

< Vary: Accept-Encoding

< Content-Length: 19

< Connection: close

< Content-Type: text/plain

< msXXXXX.ddns.net:1

Running username=manindersinghgill%40gmail.com&pass=XXXXXXXXXX&h[]=msXXXXX.ddns.net username=manindersinghgill%40gmail.com&pass=XXXXXXXXXX&h[]=msXXXXX.ddns.net XXX.203.164.XXX msXXXXX.ddns.net

execl username=manindersinghgill%40gmail.com&pass=XXXXXXXXXX&h[]=msXXXXX.ddns.net failed (No such file or directory)

> GET http://ip1.dynupdate.no-ip.com/ HTTP/1.0

> User-Agent: Linux-DUC/2.1.9

< HTTP/1.0 200 OK

< Server: xipha

< Date: Wed, 02 Feb 2016 16:21:49 GMT

< Content-Type: text/html

< Connection: close

< XXX.203.164.XXX

! Our NAT IP address is XXX.203.164.XXX

! Last_IP_Addr = XXX.203.164.XXX, IP = XXX.203.164.XXX

 

Now to make this run every time the pc starts add this line to the file /etc/rc.local before exit 0

sudo /usr/local/bin/noip2  

so that noip runs as a deamon  in the background

 

At this point we will change the port apache2 server in your machine is listening from port 80 to some other port say port 12345.

For this edit ports.conf

sudo nano   /etc/apache2/ports.conf 

 

and make the following changes, that is comment out port 80 and add the line for desired port.

#Listen 80

Listen 12345

 

thereafter restart apache2 server

sudo service apache2 restart

 

Now we need to provide access to the web server past the adsl modem, create a virtual server, and allow access from the WAN to LAN IP:12345 of your zoneminder pc. 

 

 

Comments   

0 #299 918kiss online 2018-10-19 16:46
Include little extras such as being a tiny bandage,
a restricted food label or classroom stickers. Next most important is you will
get ranked higher because of this. Use Google to locate
a site in order to do that.
Quote
0 #298 lucky palace casino 2018-10-19 15:07
If someone catches your eye, you can even examine their profile to see if you can picture yourself working these people.
Math Drills Lite is a fully customizable math drill
game that contains a very calculator-like UI.
Quote
0 #297 sky casino download 2018-10-19 14:38
When you've got high search rank then there
are chances that the task will visit your website.

Myths: People say that SEO anyone might have to stuff a associated with keywords to your own meta keywords tags.
Quote
0 #296 game joker 123 2018-10-19 14:29
Have you notice these ads on the online market place before?

Don't neglect the guys starting out when your green bar starts
boost. Be sure that you do your research thoroughly before launching your new website.
Quote
0 #295 s777 2018-10-19 11:02
Everyone after that first submission is automatically disqualified.
Bananas have a good source of fiber and potassium and tend to be very very therapeutic for your waist.
Now that doesn't sound really bad does doing it?
Quote
0 #294 918Kiss apk 2018-10-19 09:14
With havin so much content and articles do you ever run into any problems of plagorism or copyright violation? My site has a lot of
unique content I've either authored myself or outsourced but it appears a lot of it is popping it up all over the web without my agreement.
Do you know any techniques to help prevent content from being ripped off?
I'd certainly appreciate it.
Quote
0 #293 m ntc33 2018-10-19 06:11
Right here is the perfect site for anybody who would like
to find out about this topic. You realize a whole lot
its almost tough to argue with you (not that I really will need to…HaHa).
You definitely put a fresh spin on a topic that's
been discussed for decades. Wonderful stuff, just excellent!
Quote
0 #292 lucky palace casino 2018-10-19 04:04
Anyone need flexibility in your part-time
job and are you need the right away? You will never just
create a website and find ranked on the web the fast.
Quote
0 #291 is mega casino safe 2018-10-19 03:09
Why visitors still make use of to read news papers when in this technological
globe the whole thing is accessible on net?
Quote
0 #290 is live casino fixed 2018-10-19 02:25
The other day, while I was at work, my cousin stole my iPad and tested to see
if it can survive a 40 foot drop, just so she can be a youtube
sensation. My apple ipad is now broken and she has 83 views.
I know this is totally off topic but I had to share it with someone!
Quote
0 #289 sky777 app 2018-10-18 20:13
Below are a few coping strategies that will let you to find strength and the support you need.
I love food, a little quantity of maybe. The question is: will they have a go to Hill-dog
or Barak the Rock?
Quote
0 #288 sky777 apk 2018-10-18 18:43
What's up, yeah this piece of writing is in fact pleasant and I have
learned lot of things from it concerning blogging.

thanks.
Quote
0 #287 3win8 apk 2018-10-18 14:27
How might you know any time a site you're to obtain a link from is good and functional?
You'll be happy comprehend that will be able to promote your offerings free of charge.
Quote
0 #286 918kiss 2018-10-18 07:38
This is actually a first rate quality page view.
The quality of content plays an integral role in getting high
page rank. It can also encourage the poster to earn an income either full-time or part-time.
Quote
0 #285 3win8 casino 2018-10-18 07:28
Hi everyone, it's my first visit at this site, and article is really fruitful in support of me, keep up posting
these articles or reviews.
Quote
0 #284 play8oy cheat 2018-10-18 05:43
I always spent my half an hour to read this weblog's content every day along with a mug of coffee.
Quote
0 #283 malaysia casino apk 2018-10-18 05:32
Once you do bring yoyr laptop, finding electrical outlets on the ship can be really hard.
Bad beats, bad luck, and players are just some of the
an individuall have to watch out for out due to.
Quote
0 #282 918kiss 2018-10-18 05:12
Everything is very open with a clear description of the issues.
It was really informative. Your website is extremely helpful.
Many thanks for sharing!
Quote
0 #281 m.2 slot asus 2018-10-18 04:30
We stumbled over here different web address and thought I may as well check things out.
I like what I see so now i am following you. Look forward to checking out your
web page yet again.
Quote
0 #280 918 kiss 2018-10-18 04:29
Now a person you acquire site noticed by these spiders
and placed in the top of this search car engine?
It's only after you reach this is in exercise that
your muscles gain sturdiness.
Quote

Add comment


Security code
Refresh