Video Surveillance and Basic Home Automation.

posted in: TECHNO | 11

NEW !! : I have put all this information in a easy readable PDF How to Series_ Video Surveillance and Basic Home Automation – Google Drive. Please donate if you like my work. 

Type: Home / Residential / Small Office Costs: $125 Goal: Install and configure cameras at home, control the garage door and have basic DVR recording. Time Required: 2-3 hours.

 

System

First of all, even before I begin describing how an average computer user can set up a complete video surveillance system in the matter of minutes with few hundred bucks in the pocket, Let me make one thing very clear – Open Source Software, Tested Techniques and Applications and websites discussed in this site are made or developed by those wonderful people who like to keep the web open and creativity going, so please do the same.

I have tried to give credit to those who deserve it through out my descriptions with links to their website or products.

Below is a brief tutorial which will guide you through installation of an IP camera, Port Forward it to the Internet and access it on a smart phone. Additionally I have briefly explained  how to use a DVR (cloud based) to record and monitor your video feed. The camera used also has a pair of dry contacts which I have used to drive the garage door so this is what I call the Home Automation!

This blog post is being updated constantly, so please bear with me as I am working on getting some pictures, videos shot and uploaded. Here are some to get started:

Videos Coming Soon! **:

image

Picture shows the connection between the garage door controller and the IP camera. Please check the video above for details.

Here is what I have done.
I have connected the wall button leads at the garage controller in parallel with the pin 1 and pin 2 of the IP camera.

Pin Diagram:

Some important points to keep in mind:

A possible Bug: Relay Pulsing

Be careful when triggering the dry contacts on the cam. Because when you close it, you have to open it the same instance. The wall button does this in on the click, so does the remote supplied by the garage door opener. On the ipcamviwer android app there is a setting under advanced for pulsing the relay which will take care of this problem.

A major Issue: Motion Sensor Behavior.

If you have a motion sensor which prevents the door from closing when an objective in the way , can get disabled till the pulsing is complete. So this could be a concern if the pulsing fails or if you are manually triggering the relay and forget to open the contact.

Remember:
TEST EVERY SCENARIO BEFORE PUTTING THIS INTO DAILY USE.

Possible solution for the bug and the issue:

A time delay relay in between the cam and the door will solve the problem

Let me know if you think of something. I am also working on getting my Raspberry pi working on my phone so I can drive the IOs on that. If I succeed then I am planning to Connect my garage door, sprinkler system to Raspberry pi and write my own program  and interface to control them

NEW !! : I have put all this information in a easy readable PDF How to Series_ Video Surveillance and Basic Home Automation – Google Drive. Please donate if you like my work. 

Project in detail:
Scope:

Like any project, a scope is a good thing to start working on. In this example, the scope of this project is to install a video camera system at my door step facing the street to monitor, record at least a days worth of video feed. Also install another camera in my garage to view the garage door open and close. Also drive the garage door to open and close using a smart phone app.

System:

I like my android phone and I am all about connectivity so I took the IP Camera route. IP cameras, which work on the Internet Protocol, are very convenient devices to connect and configure. I have port forwarded cameras to the Internet. The cameras are viewed and controlled using an Android or Apple App. The camera used in this example has dry contacts which can be driven from the Internet (using the 3rd party camera app) which I have connected to my garage door controller. So now I can control my garage door and see it open and close! Yeah!

Camera:

After doing some research on the Internet, I chose the WANSVIEW NC541/W IP. There are about 10’s of different cameras in the price range of $50-$150 and out of these a feature packed is the NC541/W IP.

Features:

  • Wifi
  • Ethernet
  • Microphone Built In
  • Audio Out
  • Dry Contacts
  • PTZ

Source: http://wansview.net/products/wansview-nc541w-wireless-ip-camera.html

Material / Equipment List you most likely already have:

  1. Home Router (Wireless/Wired)
  2. A computer (Windows Preferred)
  3. Ethernet cables (For wired IP Cameras)
  4. A garage and a standard Garage Door Controller
  5. 1.5 Mbps or more internet speed.
  6. Screw drivers, mounting tools.

Material / Equipment List you will have to purchase or get:

  1. Wireless /Wired IP Camera (WANSVIEW NC541/W IP) – $55 -$65


Software Tools / Apps:

  1. www.no-ip.com (DNS) forwarding. FREE for one host
  2. www.mangocam.com (Cloud DVR). FREE for one camera.
  3. IP Camera Viewer App FREE for basic version

  4. www.ispyconnect.com ISPY Connect. FREE- Open Source

Installation and Testing:

I assume you have some knowledge of managing your home router and are able to log into the admin page. Below are 8 Steps which will take you from Configuration, Testing and Installing very briefly. If you have a particular question on any of the steps pertaining to your home router or equipment, you can email me at support@xdbworks.com

NEW !! : I have put all this information in a easy readable PDF How to Series_ Video Surveillance and Basic Home Automation – Google Drive. Please donate if you like my work. 

Step 1:
Add the camera to your network

Assign a IP address (If your Router does not have its DHCP server enabled) to the camera.

For example: 192.168.1.109

Connect the camera to the network (Wired) directly to the router. (If it is wireless then follow the procedure on the Admin page of the camera to set up wireless connectivity. Wired is preferred for testing and setting up)
Make sure you can access the Camera’s Admin Page. (Most IP Cameras and devices will open its Admin page when you time the full IP Address in the form : http://192.168.1.109)

Other Resources : Here is a good video on youtube which walks you through the setup created by Downie250

Step 2:
Fixed IP Address Assignment
Log into your home router and reserve the IP address of the camera so that the IP address is always fixed. (If you have a DHCP, you will have a section called as DHCP reservations)

Step 3:
Configure your IP camera
Configure your IP camera, change passwords, enable features, Set up Wifi Connectivity etc.  A very important setting to look for is the Port Number. You will have to set a port number (Example, Default is 80) on the camera. So you can access it.

Test your camera from a computer using a web browser or the software client that came with the camera by using the URL of your camera:

http://192.168.1.109:80

Step 5:
Port Forwarding:
Go to the Application/Gaming/Port Forwarding section (different routers call it differently). Here you will be able to set yo port forwarding. Every router is different but port forwarding is very standard. You first select the internal IP address and port number and assign it to an external IP (provided by ISP) and the port number. See your router manufactures website for user manuals for port forwarding procedure.

Step 6:
DNS Forwarding:

All residential Internet Connections provided by ISPs do not have fixed public IPs and this makes it impossible to connect to your home network in the event the IP address changes.  Go to www.no-ip.com or your preferred DNS forwarding service and make sure your DNS forwarding is setup and working successfully.

Step 7:
Home Automation — Garage Door Opener:

(Go to Step 9 if you need to skip the home automation part – Garage Door Opener)

My Buddies and I were experimenting with this camera and we found out that these cameras have a pair dry contacts for low power applications such as Garage Door Openers and any other low power DC applications. We tested it by connecting it to the garage door controller and we found out that it works!

The built in relay is able to control the switch of a alarm whose voltage is no more than 36V, and current is lower than 2A

Picture: Connecting the WANSVIEW Alarm Inputs (Pin 1 and Pin 2) to the Garage Door Controller.

Step 8:
Final Implementation.

You are set now to implement the Video Surveillance with Home Automation project. First install the cameras at the desired location.

1. For this you will need some basic mounting skills and you may need to install a 110V power receptacle so you can connect the 5V adapter that came with the camera.

2. Make sure you have decent Wifi Signal. If not, then install Wifi Extender. (See Picture: Wifi Extender to Extend your wifi signal)

3. Connect the Alarm inputs to from the camera to the Garage Door Controller

4. Install the IP Cam Viewer App on your smart phone or tablet and configure it using the DNS Forwarding Information (Host name you created at the DNS Forwarding Service and the port number you assigned). This camera is a PTZ, you can use the IP Cam Viewer App to control your camera. Under menu for the camera, you will find the Relay Control and you can use this to control your

5. If you need to record the video (DVR) then you can use a physical DVR connected to your network or a software program installed on your computer. However, if you need hassle free, equipment free and feature packed DVR then I recommend you take a look at www.mangocam.com . This is a Cloud DVR for Video Cameras, how cool is that mate! (I say Mate because this is an Australian Based company. They have a free account for one camera but you can get different features for a very low monthly fee and save more if you prepay for a year.

If you have any questions or concerns, please email me at support@xdbworks.com or go to www.xdbworks.com for more information.

NEW !! : I have put all this information in a easy readable PDF How to Series_ Video Surveillance and Basic Home Automation – Google Drive. Please donate if you like my work. 

11 Responses

  1. How did you hook up the PTZ controls off the camera to the Garage door opener? Can you provide detailed instructions?

    • Sure. The PTZ functionally is built into the camera and the app – IP can viewer, has soft controls to operate the PTZ and the relay ON OFF functions. The dry contacts on the camera are directly connected to the garage door opener controller. It is in parallel with my wall button. I can send you a detail picture this evening. Let me know.

      D

  2. Garage Door Control
    I have a Loftek CS2200
    I cant get the garage door control to work
    I have the IP Cam Viewer app and I can hear a click when I try to use the relay but it wont open or close the door
    any suggesstions ?
    Thanks

    • Most garage door openers need a 12 volt power applied on the contacts. The IP camera has dry contacts which means it does not apply any voltage. I am using the voltage coming from the wall button and have the camera dry contacts in parallel. One caution: make sure you are not disabling any safety feature on the garage door when you connect it to the camera.

      D

  3. I found a good way to wrap the http traffic in an ssl layer using my raspberry pi as a reverse proxy. A blog on how to do that can be found here: http://youresuchageek.blogspot.com/2012/06/apache-2-reverse-proxy-howoto-protect.html

  4. I didn’t see from the video or diagram are Pins 1 &2 on the IP Camera connecting to the cable in parallel only. Or is one cable also going to a ground or common on the garage door opener?
    I have a DVR that has Alarm inputs and outputs this should work the same as your IPC right?

    • It is in parallel to the door opener. It should work on the DVR provided they can connect to dry contacts. Get a low spec multi meter and test it first using the connectivity mode. When you hit that soft key or the hard button on the DVR for changing the output, you should see your multimeter beep . Also check the voltage the DVR is putting out. If it is less than 24 volts then you should be good. However refer to the camera spec sheet for max voltage on those dry contacts.

      D

      • Thank you for the reply and your write up. I have been wanting to set this up on my home DVR with the app support alarm output trigger on/off from my iPhone.
        I ran a single cat5 from my NVR I/O alarm out relay in parallel with the button in my garage and now I can remotely open and close my garage.

        Thank you again

  5. can you use the cameras other two pin outs to control a second opener?

  6. Hi! Thanks for the video! Do you have any issues with the cam switching the relay on after power loss?

Leave a Reply