Setting up video cameras in a smart home

I use several different webcams at home, several cameras. Initially, I bought an esp32-based camera called ESP32Cam, it's the simplest camera. It was very cheap and allowed me to connect to a smart home normally, that is, it was possible to take video stream from it and take pictures from this camera, and save of course, the resolution of this camera is not good enough, in principle it allows you to shoot almost FullHD, there's just a 4 by 3 resolution, but basically I set it to the minimum resolution, of course, at first I tried to do 320 by 200, it's not enough at all, then I made 640 by 480, which is of course better, but also not large enough, in detail, so that it can be fully used for viewing, but visually, if you look with your eyes, then of course, in principle, everything is clearly visible.

Initially, I used a video stream, I used a special program on the smart home server that allows you to record a video stream, the movement is evaluated, you can record if there are movements, you can record all the time, you can make it so that several frames of movement are tracked in advance, if movement begins, then the video starts a few seconds in advance, but in the end I use the resolution The HD quality is higher, 1280 by 720, it is more familiar, it coincides with the resolution and proportions of other cameras, so it turned out to be much more convenient to use.

Well, in general, the camera warmed up very much, of course, if you take a continuous stream from it and use high resolution, then I had to make a restriction, slightly rewrote the code that was flooded on this camera, of course nothing was flooded there from the factory, you need to take the site, but in general it's not very difficult and after I I filled in this code there, I modified it a little bit, and made sure that the image from the cameras was sent and taken twice per second, which of course significantly reduced the heating of the microcontroller that is being used, and in general, the camera certainly started working more stably.

There is a problem that it lacks the voltage that is supplied, it is powered by 5 volts, which of course, in principle, is not always a non-standard voltage for the esp32, but in general there is a stabilizer that lowers to 3.3 volts, naturally powered by 5 Volts, but even in this case, a fairly high voltage drawdown occurs when the camera it works when it uses wi-fi, especially when it constantly transmits some data, then I put another capacitor in parallel, but it still doesn't help much and the image on the camera is of course periodically lost, it doesn't come clear enough, either in stripes and noises, or something else, but in general it is quite acceptable in order to do some kind of video surveillance.

Recently, I also purchased an additional shield for these cameras, which allows you to plug this camera in and, accordingly, can be powered by USB. There is a micro USB, but I did not like it, of course, it allows you to connect it, and as I understand it, and to flash it if necessary, I have not tried it yet, but I will take a look, but in general I didn't like the shield itself, it makes some sounds when working, apparently something is missing some components, in general, it arouses my suspicion and I decided not to use it yet, I will need to experiment with using this new equipment separately, and continuously monitor how it works.

In addition to these cameras, I also use several other cameras, I bought a camera from Xiaomi at the time, but I didn't like it, it has a very limited way of using it, it still works pretty well through the application, it records, you can watch, you can adjust the recording modes of constant or only when there is movement, you can put an SD card, but of course it will record cyclically, because if it runs out of space, it will overwrite, with constant recording it turns out about a day or more when recording by movement, it depends on movement, but the camera itself reacts not only to people, it reacts to the movement of objects, and therefore the recording itself can of course be quite frequent, if, for example, there are some curtains that can change from the wind, or the brightness in the room changes, for example, the sun is shining or clouds are covering the sun and the brightness changes dramatically, or it can be an air conditioner or a fan, which can also move and, accordingly, the camera can also notice, there may also be pets to which it can also react, you can set areas in which to detect movement, or in which it is not possible to determine, this helps in some cases, for example, when I initially took it, the camera was pointed at me and also saw the TV in my field of view, and when the TV was on, it was constantly recording, which of course is inconvenient and I absolutely did not need it.

Then I bought the camera more consciously, it was the Tapo TP-Link camera, I first used the C100 camera. It basically allows you to record FullHD, just like Xiaomi, its design is about the same, it is the simplest and allows you to write to a memory card, the modes are about the same as on Xiaomi, only the only thing that it uses its own application separately from tp-link, and accordingly there are some restrictions on watching and downloading videos, that is, for example, in order to save videos from the Tapo camera, you need to do almost like recording on your phone, With Xiaomi, you could just download it with a button, you can watch it through the app, of course, because in principle the storage format itself is about the same. The cameras also have the ability to record and view in lower quality, that is, the quality is not FullHD, but just HD, but in principle there is no big difference, and I always use only FullHD.

My camera itself is mainly not used for video recording, because firstly it is a heavy load on wi-fi traffic, this camera is connected via wi-fi, and if, for example, data is constantly transmitted to a smart home server and this video stream is processed and saved there, then of course you need to select which one- it's a separate Wi-Fi option, either to make a separate router, or a powerful router, but there will still be wi-fi leads that are large enough, and the quality will certainly not be very good, so I mostly use this in the save snapshots recording mode, the Tapo camera itself does not allow you to take pictures, it only allows you to give an rtsp stream, which in principle is very good, and this just allows it to be integrated into a smart home, the Onvif exchange format is also supported, which also allows you to control this camera without changing settings, and this is also very useful, for example, you can determine when the camera has received a signal about in motion, and this camera can also detect the movement of people, but it turns out that I have to capture this one frame from the video stream, which of course downloads the smart home server itself, but in general I save only once a minute, this allows me to send this frame to dashboards, I can periodically update this picture once a minute and see what is happening on some cameras, for example, turn off the light in another room or some other necessary actions.

I also have a script that allows me to request a picture from the smart home server from the desired camera via the Telegram channel, and it also sends me this picture in a fairly convenient way, as some kind of entertainment, I record a timelapse, saving this frame from the camera every minute, of course I use cameras that are aimed at the street. and it's even very interesting to look at it later, I had to make a small script, which from individual images that are saved in jpg format makes a continuous video with a frequency of 30 frames per second.

Automation in a smart home should be useful and create additional comfort, but sometimes everything goes wrong… The reasons for this, and how to configure everything, see on my channel.

You may also watch

Article By Alex

If you have any ideas on how to improve automation, make it more reliable, fast and useful, then you can leave a comment below. I will try to implement the proposals and tell you in the following videos.