Do-it-yourself baby in a geek family or a baby monitor

I constantly read habr, but because of the January vacation, an article “A child in a geek’s family or we have our own approach” passed me by . And only now, quite by accident, I came across her in a search engine. Wonderful article, a huge plus for the author!
There was such an offer: “Many people buy a baby monitor - such a radio station, switched on by sound. So, see this baby monitor. Since you are sitting on a hub, you probably have a router, which means that the best option would be a web or IP camera. And if you add infrared light, you can watch the child in the dark. Again, you can connect from a tablet from time to time and monitor the situation. ”
But he is right! Conventional baby monitors in the firebox!
Intro, which you can skip
So, the essence of the problem. When a child is small, he usually sleeps more than adults. During such periods, most parents turn off the doorbell and the sound of mobile phones. Partly because they really care about the baby’s dream, and partly because a little egoists (who knows, he will understand) and think about the longer he sleeps, the calmer.
And the most important thing at such moments is always to be nearby. If the child’s dream is sensitive, then he can periodically half asleep begin to move and look for mom or dad. If he finds, then he sleeps further. And if not, then you can forget about the continuation of sleep.
It was for this that they came up with such wonderful devices as radio and video nurses. You leave the transmitting unit in the child’s room and take the receiving unit with you. You can calmly go about your business in another room, listening through the receiving unit that everything is in order with the child.
I immediately thought about the nannies, because I prefer to see that everything is in order. Does it matter if the microphone suddenly spoiled at the baby monitor? The simplest thing is to take and buy a ready-made kit. And everything would be fine, but all of these devices have a significant limitation - the radius of action. Indeed, within a small apartment, everything can more or less work. And if you needed to go to the neighbors (you were invited to a birthday, but the baby is sleeping)?
Eureka!
I began to look for another solution to remove the range limitation and use the existing equipment to the maximum. In the future, I planned to keep a record of what was happening if I needed to invite a nanny. I did not have a new Toshiba laptop with Debian installed and without a display. Yes, yes ... he turned away for only 5 seconds, and the child decided to pull the luminous thing called a mouse.
This laptop can only be accessed via SSH.
I also had an iPad, on which I wanted to display a picture (I confess. I would have bought Android myself, but my wife wanted an iPad. It
remains to choose a camera. First I wanted to use a Web camera. But then, I decided that pulling wires is not very convenient and it’s easier to take a Wi-Fi IP camera, and as a
result I found a Edimax camera on one of the sites.

Let there be software!
My provider does not provide an external IP. Therefore, I wanted to create a VPN tunnel to one of my virtual machines to access the monitoring server remotely via the Internet.
At first, in the old fashioned way, I planned to use Motion. I began to look for installation experience on the Habré and stumbled in the comments on Ivideon. Video surveillance service over the Internet. I began to read about them. Promoting like Team Viewer or Skype. All for free for non-commercial use. I watched the video instruction on how to start everything in 3 minutes:
I managed to repeat it on a second laptop with a webcam. I immediately saw myself on the iPad, though with a 4 second delay. Earned sound, earned viewing previously made recordings.
The basic principle. For viewing via the Internet, a simple registration by e-mail is required (as I understand it, there is also a local view without the Internet). After registration, you can “attach” any number of cameras via e-mail to your account. There are rights management and other things, but I did not use them. The most curious feature, IMHO, is the ability to display video on your site. Moreover, judging by the Ivideon blog , it supports not only browsing on devices that have Flash, but also on Apple via HTML5.
The trouble is that I have Linux, and Ivideon has software for Windows. Well, I think wine will help me. I began to search on google if anyone had installed Ivideon under wine in Linux and found that it turned out they had a Linux version .
And there is not one, but 2 whole installation options. The first is a ready-made image of a virtual machine, which you can download and get a working solution. Apparently, for the lazy. And the second one is installing packages from the APT repository.
A remark is obligatory here. Ivideon for Linux is not at all the same as for Windows. It is installed as a daemon and configured using the Web interface.
Reading instructions, copy-paste commands and after 15 minutes everything worked for me even without a tambourine! I went into the web interface and saw what they had shown on the site, only without a girl :)

Offtop. I wonder if this girl is an Ivideon programmer?
Most of all I liked the fact that in the web-interface there is a quick user guide!

Installation

And now in order. On the Ivideon website it is written that the packages are used on selling nettops running Linux. Therefore, packages during installation modify the Apache configuration and the default website is the Ivideon web interface. For me, this is not a hindrance. And those who put on Desktops should pay attention to this.
Connect the Ivideon repository:
$ echo deb http://packages.ivideon.com/public/full_install stable non-free >/etc/apt/sources.list.d/ivideon.list
$ wget -O - http://packages.ivideon.com/public/keys/ivideon.key | apt-key add -We update the list of packages and install:
$ apt-get update
$ apt-get install ivideon-serverAll. Done. Now you can go to the Ivideon Server web interface by typing http://127.0.0.1/ in the browser line . In my case, it was not localhost, but the address of the laptop. The default password is 123456.
Impressions
What can I say? I use no more than 3 weeks. And all this time the server itself has been spinning without crashes and freezes. The processor load allows you to connect at least 10 more of these cameras. Of course, uptime of 3 weeks is not an indicator, but still.
We watch a video from the nursery, being in a large room. We hear the sound. Already two times went to visit with the iPad.
Not completely accustomed to the fact that the video goes through the Ivideon servers. That is why I turn on the camera only when it is needed. On the other hand, I still have Skype, Windows, TeamViewer and tons of other software installed, which theoretically can access my camera and microphone. And mail on Google contains much more private information than video from the nursery. In an extreme case, you can configure direct access to bypass Ivideon servers, since they provide a direct connection function (seen in the settings).
I turn the camera on and off with power. Caught on the fly. A video archive is written only when there is movement in the frame. Although in the case of the baby monitor it is especially useless.
I am very sorry that I bought a camera without infrared illumination. Therefore, I had to spend money on a separate Chinese infrared “flashlight” to “see” in the dark.
Among the shortcomings:
- there is no application for Android. The site says that it is in development. So I would look at the phone.
- there is no way to remotely turn the camera on and off. Although, it would not hurt.
- if you watch the video in your account and minimize the browser, then it starts playing from the moment the browser is minimized.
Otherwise, the flight is normal.