Outils pour utilisateurs

Outils du site


issue97:labolinux_-_ip_camera

Ceci est une ancienne révision du document !


Table des matières

1

My father recently bought chickens and I thought it would be nice to have an Internet camera out there to keep an eye on them. Nice idea, but how can it be done when these Wi-Fi enabled cameras are out of Wi-Fi range? I can’t run a giant network cable through the garden. The answer is powerline adapters. I was highly sceptical of them at first, but I have to admit that they do work, and surprisingly well. DISCLAIMER: I’ll have to be a bit vague in this article as there are many different types of powerline adapters and they all work differently. Same with IP cameras and routers. POWERLINE The idea behind the powerline adapter is this: you buy a pair of power outlet plugs which have network sockets on them and several flashing indicator lights. You plug your first one into the wall and have its network socket wired to your internet router. Your second plug goes wherever you need a network point. In a chicken coop, in my case. TIP: when pairing the plugs together, do it in the same room as it will save you a lot of legwork.

Récemment, mon père a acheté des poulets et je pensais que ce serait sympa d'avoir une caméra Internet sur place pour les surveiller. Bonne idée, mais comment faire quand ces caméras Wi-Fi ne sont plus à portée d'un signal Wi-Fi ? Je ne peux pas installer un câble réseau géant dans tout le jardin.

La solution ? - des adaptateurs par courant porteur. Au départ, je n'y croyais pas trop, mais je dois avouer qu'ils fonctionnent bien, ce qui m'étonne.

DÉCLARATION DE NON-RESPONSABILITÉ : je vais devoir rester quelque peu vague dans cet article, car il y a beaucoup de types différents d'adaptateurs par courant porteur et ils fonctionnent tous de façon différente. La même chose est vrai des caméras IP et des routeurs.

INSTALLATION ÉLECTRIQUE

Voici l'idée derriére l'adaptateur par courant porteur : vous achetez un couple d'adaptateurs de courant porteur en ligne qui ont des ports réseau et plusieurs témoins clignotants. Vous branchez le premier sur l'électricité et installez un câble entre son port réseau et votre routeur. Le deuxième adaptateur se met là où vous avez besoin d'un point d'accès au réseau. Dans mon cas, dans le poulailler.

ASTUCE : faites l'association des deux blocs dans la même pièce, ce qui épargnera vos jambes.

2

Most come with encryption built in that you can enable. This is handy if your power source is shared with other residents. This is not something I’ve tested, but to enable it I think it requires the manufacturer’s software, which I found was Windows only and wouldn’t run in Wine. You can add more plugs to your powerline network, but try to keep them all the same type. Otherwise, you’re asking for incompatibility and nightmares. IP CAMERAS IP (Internet Protocol) cameras come in many shapes, sizes and prices. There are two major manufacturers: Wansview and Foscam. Yes, they’re cheap makes with only 640-pixel wide images, but I don’t want an expensive camera in a chicken coop.

La plupart ont un chiffrement intégré que vous pouvez activer. C'est utile si vous partager votre source d'électricité avec d'autres résidents. Je ne l'ai pas testé, mais je pense que, pour l'activer, vous avez besoin du logiciel du fabricant qui, dans mon cas, fonctionnait sous Windows et ne voulais pas entendre parler de Wine.

Vous pouvez ajouter plus d'adaptateurs à votre réseau courant porteur de ligne, mais, si possible, ne mélangez pas les genres. Sinon, des incompatibilités et des cauchemars sont presque garantis.

CAMÉRAS IP

Des caméras IP (Internet Protocol) sont disponibles dans beaucoup de formes, de tailles et de prix. Il y en a deux fabricants majeurs : Wansview et Foscam.

Oui, elles sont bon marché, et leurs images ne font que 640 pixels de largeur, mais je ne veut pas mettre une caméra haut de gamme dans un poulailler.

3

The good thing about these cameras is that they pan and tilt. In other words: you can move them by remote control. Most come with infrared LEDs on the front which will allow night vision, too. The back of the camera has an ethernet port, Wi-Fi antenna, power socket, and usually several connections for sound and alarms (if required). All we really need here are the power and ethernet ports. So, you’ve got your powerline adapter plugged in where you want it. Plug your network cable from the powerline to the camera, then power on the camera. This is important as I find that powering on the camera first, then plugging in the network cable, doesn’t always work for getting an IP address. Give the camera at least one or two minutes before writing it off, as mine takes at least a minute to boot up and go through its up/down, left/right test sequence. IP ADDRESS Most IP cameras come with a sticker on the underside of it. This gives you the default admin password (for initial setup), a dynamic DNS url, and (sometimes) a default IP address. My one didn’t come with an IP address on the sticker, so I’ve no idea what it’s IP address is so I’ll need to find it. You can, sometimes, get it using the dynamic DNS URL, but they’re quite often in China, incredibly slow, and not exactly trustworthy. So, I’d recommend not using it and setting up a faster dynamic URL, but we’ll come to that later.

L'avantage de ces caméras est qu'elles savent faire des panoramiques et s'incliner. Autrement dit, vous pouvez les faire bouger à distance. La plupart ont des LED infrarouge sur le devant, ce qui leur permet de voir la nuit. Au dos de l'appareil, il y a un port Ethernet, une antenne Wi-Fi, une port d'alimentation et, habituellement, plusieurs connexions pour le son et des alarmes (ni nécessaire). Tout ce dont nous avons besoin ici sont les ports alimentation et Ethernet.

Bon, vous avez branché votre adaptateur là où vous voulez. Maintenant branchez le câble réseau de l'adaptateur sur la caméra, puis allumez celle-ci. C'est important, car je trouve qu'allumer la caméra d'abord, puis brancher le câble réseau, ne fonctionne pas toujours pour l'obtention d'une adresse IP. Avant de vous dire qu'elle ne marche pas, donner à la caméra au moins une minute ou deux, car il faut à la mienne au moins une minute pour démarrer et terminer sa séquence de vérification, haut/bas, gauche/droite.

ADRESSE IP

La plupart des caméras IP sont livrées avec une étiquette sur sa face inférieure. Là-dessus, il y a le mot de passe de l'administrateur par défaut (pour le paramétrage initial), une URL DNS dynamique et (parfois) une adresse IP par défaut. Il n'y avait pas d'adresse IP sur l'étiquette de la mienne et je n'ai aucune idée de celle-ci et dois la retrouver. Il est parfois possible de l'obtenir en utilisant l'URL DNS dynamique, mais cela se trouve très souvent en Chine, est incroyablement lent et pas exactement digne de confiance. C'est pourquoi je recommande de ne pas l'utiliser et de configurer une URL dynamique plus rapide, mais on y viendra plus tard.

4

Again, I have to be a bit vague here as all routers are different. I’m using a BT HomeHub 4 (in the UK) so your router will no doubt be different. But, either way, you log in to your router and head to the DHCP table page (if there is one) or to a visual list of attached devices. In there you’ll see the device and its IP address. In my case, it was a device I didn’t recognise, and I knew that my main powerline was in LAN2 (on my router), so I knew right away that was the camera. It won’t always have an easily recognisable name! To test things I entered the IP address (192.168.0.2 in this case) into my browser. This should let you log into the camera with the default details which you can, of course, change. Success! So, I can access the IP camera over the network. First thing I did, which isn’t a necessity, is to head back into my router and tell the router that I want that device to have the same IP address every time. With that saved I know that my camera will always be 192.168.0.2.

À nouveau, je dois rester vague ici, car tous les routeurs sont différents. J'utilise un BT Homehub 4 (au Royaume Uni) et, donc, votre routeur sera sans doute différent. Quoi qu'il en soit, vous vous connectez à votre routeur et allez à la page de la table DHCP (si cela existe) ou à une liste visuelle des appareils connectés. C'est là que vous verrez l'appareil et son adresse IP.

Dans mon cas, c'était un appareil qui je n'ai pas reconnu, mais je savais que le câble principal se trouvait en LAN2 (sur mon routeur) ; ainsi, je savais tout de suite que c'était la caméra. Elle n'aura pas toujours un nom facilement reconnaissable !

Pour voir ce qu'il en était, j'ai rentré l'adresse IP (192.168.0.2 dans mon cas) dans mon navigateur. Cela devrait vous permettre de vous connecter à la caméra, avec ses paramétrages par défaut qui vous pourrez bien entendu changer.

Victoire !

Bon, je peux accéder à la caméra IP sur mon réseau. La première chose que j'ai faite, qui n'est pas nécessaire, était de retourner à mon routeur pour lui dire que je voulais que l'appareil ait une adresse IP fixe. Une fois enregistrée, je savais que l'adresse de ma caméra serait toujours 192.168.0.2.

5

By default the IP cameras use port 80 which is the default internet port – that needs to be changed. In the camera settings will be a place to edit the IP address and/or port number. I’ve changed mine to port 82. I also changed the password for the admin account, and added a guest operator account. This means I can give people the guest login to let them view, but not edit, the camera. If you plan on having more than one camera online, then each one needs to use a different port number. So, now that the port is changed, you need to tag that onto the URL. My login now is http://192.168.0.2:82. The colon 82 forces it to use port 82. Thus far we can log in to the camera on the network, but what about from outside of the network? We need a dynamic DNS for that. DYNAMIC DNS If you’re like me, then your IP address will change each time to reconnect to the internet. Most routers have a setting for dynamic DNS which will let your router ping its new IP address to a provider who will associate that IP address with an easy-to-remember URL.

Par défaut, les caméras IP utilisent le port 80, le port par défaut pour l'Internet - il faut changer cela. Dans les paramètres de la caméra vous trouverez un endroit où vous pouvez modifier l'adresse IP et/ou le port. J'ai changé le mien au port 82.

J'ai également changé le mot de passe pour le compte administrateur et j'ai rajouté un compte pour un opérateur invité. Cela veut dire que je peut donner la connexion « invité » à des gens qui pourront ainsi voir, mais pas modifier, la caméra.

Si vous pensez utiliser plus d'une caméra en ligne, alors chacune doit avoir un numéro de port différent.

Maintenant que vous avez modifié le port, il faut l'annexer à l'URL. La connexion se fait maintenant à http://192.168.0.2:82. Le « :82 » l'oblige à utiliser le port 82.

Jusqu'ici, nous pouvons nous connecter à la caméra sur le réseau, mais comment pourrait-on le faire de l'extérieur ? Il faut un DNS dynamique pour cela.

DNS DYNAMIQUE

Si vous êtes comme moi, alors votre adresse IP changera chaque fois que vous vous reconnectez au Net. La plupart de routeurs ont un réglage pour le DNS dynamique qui permettra au routeur d'envoyer son nouvelle adresse IP par ping au fournisseur qui associera cette adresse IP avec une URL qui soit simple à retenir.

6

There are many different free dynamic DNS providers out there, but I use DTDNS.com as this is what’s compatible with my router. You’ll need to log into your router and go to the dynamic DNS page to see what it will/won’t accept. Whichever service you want to use, create an account with them and sign in. Under hostnames you’ll choose a name and one of their URLs. I chose, funnily enough, chickens, then one of their URLs. Head back again to the router page for dynamic DNS and give it your username and password for your hostname. Now, when I reconnect to the internet my router will give DTDNS my new IP address and I can use my URL to log into my camera. But wait. Typing in the dynamic DNS URL doesn’t load the camera! PORT FORWARDING When you enter your dynamic DNS URL, you’d expect to log into your camera. But no. Why? Because the URL is using port 80 by default. We need to add a colon and your camera’s port number (eg: :82), but first we need to tell the router what to do when we enter that URL.

7

Somewhere in your router will be a page for port forwarding. It may come under firewall. What we’re going to do is first create a label, or name, for each camera. So I add a new application (as my router calls it). For protocol I keep it at ‘any,’ and I enter 82 for port range, 82 for translate to, and save it. Now I choose my application again (ie: the camera) which is associated with port 82 and link it to the device (the camera). Yes, it’s a bit confusing at first, but the router needs to know where to send things. When our DNS URL comes in, the router has no idea where to send that port 82 data. We’re telling it here to send that port 82 data to the camera. Now, when I enter my DTDNS URL with the :82 at the end I go straight to my camera. MOBILE APPS There are many different apps you can use for viewing IP cameras, but for Android I use tinyCAM Monitor (which is free). I add a new camera and give it the relevant settings such as make, model, DNS URL, port number, and my guest login. Not in the screenshot shown here, but at the top of that screen is a check to see if the camera is detected, found, and online. If it says it’s all OK, then you’re good to go. Go back and choose your camera from the list, sit back, and watch the show. They may be only chickens, but they’re far more interesting than most of the current TV shows.

8

CONCLUSION Obviously, you can take this further with several cameras throughout your house or property. You can, if you wish, add microphones to your cameras and listen to what your camera is hearing. Some cameras even allow speakers to be added to let you use it as an intercom device of sorts. Even alarms can be wired into some cameras. The main star of the show is the powerline adapters. Without them there’d be no camera in the chicken coop. A testament to their power is that the coop is quite a distance from the house (ie: long power cable) and the powerline adapter itself is plugged into a four-way extension cable. This is normally a no-no, but it’s a necessary evil as there’s only one socket in the coop area. I was a powerline sceptic, but now I’m a believer! Footnote from Mike Kennedy (FCM proofreader): I’ve used powerline adapters at various customer sites - usually very successfully. However, sometimes they didn’t work, or worked poorly. On investigation, the cause was usually a faulty PSU (power supply) in some other device, typically in a very cheap desktop PC, photocopier, printer, etc. So, if the powerline devices are problematic, try switching off most/all other devices, until the troublesome one(s) are identified. Then, perhaps the PSU is actually faulty (though, seemingly still “working”), or perhaps it’s of very poor quality - and it should be repaired/replaced].

issue97/labolinux_-_ip_camera.1434113919.txt.gz · Dernière modification : 2015/06/12 14:58 de auntiee