Introduction

An IP camera, also called network camera, is a digital camera that has a built-in web server capable of serving streams of images that appear as live video.
Once connected to a network, the images from the camera can be accessed by any computer on the same network using a common web browser, without the need for additional equipment. The live video is streamed from the camera to the web browser.

LinuxMCE can tap into an IP video stream and make the videos available throughout the system.

IP cameras can be easily incorporated in a LinuxMCE system. In this article, you will get all the instructions necessary for you to do add, configure, and troubleshoot IP cameras.

IP Cameras and Motion Wrapper

IP cameras can be used under the Motion Wrapper to enable it to detect motion and send alerts.

To add Motion Wrapper and IP Cameras

Add the Motion Wrapper interface to the system

LinuxMCE includes the device Motion Wrapper, which is a wrapper for the open source project Motion. The Motion Wrapper serves as the interface between LinuxMCE and Motion.

At the bottom of the page, click on Add device - Device Category: Surveillance Video Interfaces (NOT Surveillance Cameras, that is in the pripherals category) - Click the pull down box under Device Template and find and select the template labeled Motion Wrapper.

Click on Pick device template. This creates the Interface device and displays it on the configuration page.

Under "Action" on the right side, click on Advanced.

This installs the device Motion Wrapper in LinuxMCE. Once installed, the procedure does not need to be repeated and child devices can be added at will.

Note

You can also replace steps 1&2 with on the left pane at the bottom click on Show Device Tree

My Devices > CORE > Create Child Device > Pick device template

There is no step 5 when using this method. You can start creating the child device.

Add the IP camera

Add the IP camera as a Generic Analog Camera to the Motion Wrapper

Now on the right pane, click Create Child Device again.

Enter your IP Cameras IP address and MAC address here,

click Pick Device Template

Click the pull down box under Device Template and use Generic Analog Camera,

click Pick Device Template

Now on the right window pane, scroll down to the bottom and find the field named Configuration. This is where you put your cameras URL normally used by your web browser, to view your cameras video feed. My examples are based on Axis based IP Cameras.

netcam_url http://<you.cameras.ip.addreess>/mjpg/video.mjpg

netcam_userpass username:password

Now click save at the bottom

RESTART your router

Now on your LMCE interface, go to "Security" -> "Generic Analog Camera" and see if it's working.

Now scroll up to the top menu and, on the right, select Security > View cameras

Select the check box for the camera

Click Preview checked cameras

For the corresponding button to show, regenerate your orbiters.

Adding Axis IP cameras to Motion

To get all the features offered by Motion (motion detection,recording,etc...), you need to run your IP Camera under motion.
Your camera can be auto detected, and device generated for it, but it might NOT be under Motion as parent. This is the case for the Axis camera.

Here is a quick and not so clean workaround for adding an IP camera device under Motion:

Tips on finding your camera's URL

Try to use ftp to connect to your camera. The username and pass is usually whatever you set up on the web interface of the camera.

Traverse the folders to find your html documents folder. Typically, you're looking for a .jpg or .mjpg file to point the Motion Wrapper to.

For example, these are the possible links on an Axis 2100 IP Camera.

/jpg/image.jpg (Works fine using the wrapper)
/mjpg/video.mjpg (Works fine using the wrapper)
/cgi-bin/jpg/image.cgi (I could not get this one working under the wrapper)
/cgi-bin/mjpg/video.cgi (Again, could not get it to work)

Installing an "external" network camera

This section describes how to install an IP camera as a Motion device.

Note: These instructions are for when the camera is plugged into a router on the external network, as opposed to a switch on the internal network. Not ideal, but it is sometimes necessary due to this aforementioned problem.

Install motion wrapper (if it is not installed already). In web admin (type "192.168.80.1" in a browser of your choice), click Show devices tree (very bottom of left-hand pane)click on CORE and then Create Child Device. Then press the Pick device template button, which will open a new window. Under "Device Template", select Motion Wrapper and press the Pick device template button.

Plug your camera into the external router. In your router admin page (accessed via 192.168.1.1 in my case) find out what IP was assigned. Type this IP into your browser and have a look through the options. Set the username and password. I also set a static IP just in case it tries to change itself. I also specified the camera's IP on my router so that no other device could take it (belt and braces).

In LMCE web admin ("192.168.80.1" into a browser), go to Wizard -> Devices -> Surveillance Cameras. Click the Add Device button at the bottom of the page. This will open a new window.

In the window that just opened, pick Generic Motion IP Camera from the drop-down menu in the Device Template section. Press the Pick device template button.

Find the new camera in Wizard -> Devices -> Surveillance Cameras. Change the description to something more obvious if you so wish and select a room.

Press the Advanced button. Check the IP and MAC address in the "Device Info" section. If it's not the same as the MAC and IP you saw in the camera's utility, change it. Click Save.

Do a Reload & Regen, and that should be it.

This camera can now be used as a motion sensor and/or for recording movement (recordings are stored in "/home/cameras/XX" where XX is the device number of the camera, and last for 5 days I believe). A scenario will hopefully be automatically generated.

Very occasionally I have found that the scenarios sometimes require a little bit of tinkering. If there is no image displayed when you click on the scenario, look in Wizard -> Scenarios -> Security scenarios, select the scenario in question, select "Advanced Wizard" in the "Edit scenario using wizard" section, and just check that the number in the "#2 PK_Device (int)" field corresponds with the camera's Device #; if it does not, change it. Reload & Regen.

LinuxMCE compatible IP Cameras

For a list of IP security cameras that have been tested with LinuxMCE, see: