Author Topic: External Network Resources (IP Camera Example)  (Read 451 times)

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
External Network Resources (IP Camera Example)
« on: August 08, 2012, 11:25:11 am »
A web search for "linux IP camera" is going to generate some hits.  A search for "IP Camera", "Axis", "Foscam", "Panasonic", etc on the LMCE forums is also going to give you plenty of reading.

When I added my first few cameras to LMCE I had very mixed results.  There is simply a ton of guides and recommendations here and on the wiki which although generally the same offer different methods and is enough to confuse fairly easily.  My first true problem camera was a D-Link 930L (that I still need to submit a template for... sorry) that had random bouts of dropping out.  Motion settings could have been an issue as there was a fairly well known issue of having to restart Motion after a reload router command.  My device data settings conflicting with the camera's own browser accessed settings could have contributed as well.  No matter what troubleshooting guide I followed, or no matter how many times I removed the device to re-add it using different methods all resulted in random problems.

I came across this very good thread which lead to more searching and research.  The work around I used has survived despite many many reloads and many times deleting the camera and re-adding it with different settings.  The work around I used was to simply move the camera off of the LMCE network.

This breaks the general rule that LMCE resources need to be on the internal network and given IP addresses by the CORE, and I want to address that rule.  Nobody wants the frustration of configuring each device, in fact the premise behind smart home systems is that you shouldn't have to.  Users should be able to buy a device, power it up and have LMCE detect and configure it, automagicly.  To get to that point however a lot of work has to go on to create proper templates, update detection radars, etc.  Time and energy spent getting something working is then shared so that the next user to come along has the out-of-the box experience.  I broke the general rule as a troubleshooting experiment, not as a setup method.

To move my camera off the LMCE internal network I used the basic networking Venn Diagram rule that says the machine that creates a network of it's own is still a part of the parent network.  Rarely is the external (eth0) network many of us have in our homes considered other than methods to avoid it.  Although it very well can be a network, capable of file sharing, static addressing and other functions.  The core (when a DHCP device controls the external network) is a member of the external network. Devices attached to the internal network (eth1) are NOT members of that external network and thereby can not "see" devices living on the external network.

Example:

{External Router} (192.168.0.1)
 I       
 L___ [iPad] (192.168.0.2)
 L___ [Work Laptop] (192.168.0.3)     
 L___ [Windows PC] (192.168.0.4)
 L___ {LMCE CORE} (192.168.0.5 / 192.168.80.1)
          I
          L____[Media Director1] (192.168.80.2)
          L____[Media Director2] (192.168.80.3)
          L____[NAS] (192.168.80.4)
          L____[HD HomeRun] (192.168.80.5)
          L____[Cisco 7970] (192.168.80.6)

As you can see by my super fancy editing, the core is a member of 2 networks.  Devices in solid black or red are a member of one network only.  The CORE tells MediaDirector1 to use that IP address.  This is a static configuration.  Now typically when the term static is brought up its typically because a user decided to play DHCP themselves and mucked up the CORE by adding their own static settings.  What I am referring to is when LMCE adds an IP for a device on its own, it gives it a non-changing (static) IP so that it knows where to find it at all times.

Using the above example network I connected an IP camera to {External Router}, which gave it an IP.  From the CORE i opened the browser interface for my {External Router} and learned that the camera was given an IP of 192.168.0.6.  Because I am going to be telling LMCE that a camera is at that address I wanted to make sure the address doesn't change.  I instructed {External Router} to make the camera's IP static.
Now back in the comfortable web-admin page I add a camera normally, when asked for the IP address of this new device I provide the 192.168.0.6 location.  LMCE accepts this setting and goes ahead to statically add the IP to its list of DHCP leases.

What the CORE doesn't realize (or maybe it does?) is that in this case it did not have DHCP authority to assign a static IP on that network.  Despite its' network the camera operates happily and the CORE has no problem going through the {External Router} to grab a peek at its video every now and then.

The camera through its' web browser interface also can be set to use a static IP.  I did this just because I am a clean nut and like the camera to know its' IP allocation without having to ask.  With these settings in place I have been able to move, unplug and stick in a drawer, disconnect the wired connection and know that it will always be available at that location ready to be accessed.

I put this to a thread not to provide my methods for off-network static addressing or to suggest that this will fix anyone's issue but to offer another tool to users against a wall on network issues.  Even with really crafty code this setup can never be plug and play and does nothing to promote the LMCE smart home ideal.  It should be used long enough until issues preventing operation on the internal network can be resolved and the methods needed to get it working under LMCE are shared with other users.   
I made a wiki!  Click here to check out my system.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: External Network Resources (IP Camera Example)
« Reply #1 on: August 08, 2012, 02:37:34 pm »
Armor Gnome,

Have you added this to the LinuxMCE wiki,... and if not, would you consider doing so?
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: External Network Resources (IP Camera Example)
« Reply #2 on: August 08, 2012, 02:57:18 pm »
I was pretty much born yesterday.  I stumbled onto LMCE without a clue.  I now have 37 clues, but only because I have had 37 problems.

I would love to post to the wiki if I knew how.  I actually wanted to post some of my system information but can not figure out how to do that either.  I will move 'learn how to navigate a wiki' to the list of things I need to devote study time to.  By the time I get around to researching that and am ready to put something on there there will have hopefully been some feedback and responses to the threads I have put up as guides.

I made a wiki!  Click here to check out my system.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: External Network Resources (IP Camera Example)
« Reply #3 on: August 08, 2012, 03:07:23 pm »
I just started playing around with the wiki editing stuff myself,... so don't feel self-conscious. It's kinda like html editing though,.. not too hard once you get your feet wet.

I suggest looking at a page you like/want to emulate, copying it from it's edit page (make sure not to save any edits on someone else's, stuff, of course!!!),... pasting it to your page in the edit screen, and editing out the stuff you don't need, while changing the content stuff you need to change. Preview mode is your friend... Oh,... and start with your own user page... it's good practice.

Good luck, and keep it coming ...
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).