Automation of a real smart cottage (part 3) hardware
With one friend, we decided to automate his smart dacha in general, to make it a little smarter, more comfortable, so that you can remotely turn on the heater at the dacha, for example, track various activities there, at this dacha, somehow manage remotely and monitor what is happening there at all, what is the temperature in the rooms, do not forget something turn it off, or turn it on before leaving, well, in general, make some such basic smart settings, and also come up with some automation.
We've made some of the simplest automations, but mostly this is more of an infrastructure part, so we're still looking to make sure that the signal is good and which devices and sensors to choose, so that they work best, and survive winter, cold weather, and various other bad weather normally, and then we'll see what happens in the summer., in order to protect devices from overheating there, it may be quite hot and they will also fail, for example, the server there may overheat, smart home, and somehow start working not very well.
From iron, we mainly used this server Orange Pi 3 version LTS in such a plastic case as usual, but the only thing that I had to remove the cover there and not put it, because in general I don't know why the cover was made there.
It overheats very quickly in such a case and works quite poorly, without the cover it is also well protected and works without without any problems, several aluminum radiators are additionally installed on the microcircuits, but this by and large does not help from anything, because there is still a local overheating of these circuits when the load is large, for example, there is some installation process being started or there is some other conversion, say video, or some other such complex processes, they quickly overheat the microprocessor, but this is not so terrible for it, it automatically maintains the maximum temperature of 85°, and then the throttling mode turns on, that is, it just skips some cycles and starts working slower, the frequency immediately drops, there are some difficulties on such a microcomputer, so if there is any the script is highly dependent on the speed of work, well, for example, where some actions are measured in milliseconds, then there may be a big delay and they, the scripts, may start working incorrectly, I have this happening in some scripts, well, in general, you just need to consider that this situation can be and optimize the script itself so that it works faster, even I have scripts that are written in C they can still be in this case the moment to start working inadequately and where it is expected, for example, some delay of no more than 1 millisecond, it can give out 5 milliseconds there and of course this will greatly affect the script in general, it will stop functioning correctly.
The server itself is connected not by wire to the router, but by wi-fi, and in some cases it may not be very convenient and not very correct, well, in general, it so happened that the LAN port on it does not work correctly and this turned out to be the most reliable solution, the router uses Keenetic Runner 4G, this is basically quite not a bad solution it has only 100 megabit ports and wi-fi at a frequency of 2.4 GHz, but for a dacha this is quite a good solution, because there is not very much interference in wi-fi in the network, that is, there are practically no other routers in the area, if you just scan it, then not a single one you will not be able to find a network, and therefore there is no point in using 5 GHz there, that is, overpaying for some cooler router, and the speed of 100 Mbit is also quite sufficient, because mobile Internet is used, but it is not very fast there, and because of this, of course,there is nothing faster and nowhere to transfer, well, maybe if you use some wired cameras and use a DVR, then you may need to record the stream faster, but in reality these video cameras also do not give such a large stream, it is much smaller, and we use ordinary webcams there, there is one simple, not very expensive TP-Link camera, it is simply installed indoors and essentially shoots a plot through the window, this is the simplest option.
The other camera is also from TP-Link, more sophisticated, it has a 360° rotation mode, works quite well, it worked all winter and even there it spun at -30 with some difficulties, but in general everything was fine and there is also an infrared backlight on this camera and at night you can see the entire screen without any problems.
the site, everything works well, well, the only thing that this camera is not wide-angle and there at a time, it almost covers the entire site, but not completely captures it, if you buy a wide-angle camera, it will certainly be a little more expensive, then it will be more comfortable without any problems, you can install it in one place and in general then the rotary mechanism that is, it is often better to choose a camera where nothing is spinning at all, this is a more reliable solution, but a wide angle allows you to provide a much better view there.
But the only thing is that on such wide-angle cameras, if the resolution there is not very high, then when approaching, you will not be able to see there in detail, for example, a car number or a person's face, that is, these are also restrictions, on narrow-angle cameras, the picture quality is higher and there are more details.
The cameras communicate via wi-fi and they are also installed in the main application, branded from TP-Link, and there you can view, view the history they have built-in SD cards installed and they save information there, that is, you don't have to use some kind of cloud video storage, well, first of all, it can it would be nice if it was saved there, but then the traffic will be much larger, you may have to pay more than now, well, the network will basically work slower, and local storage is certainly not particularly limited there, well, it seems like the SD card also works without any problems.
It can be viewed there for any period, there are different modes on these webcams, that is, it can be recorded all the time in a circle on this SD card, it can also be recorded only at the time of motion detection, this is of course a more reasonable option, but if there is small movement or an object is far away, then the camera simply may not to notice such movement, but there is also such a difficulty that street cameras, they are especially at night when the infrared light is turned on, by default it is always lit there, then various insects fly around the camera and almost constantly it starts recording, this well, first of all, reduces the resource of the SD card quite a lot, well, a lot any unnecessary video turns out, when viewing it also then complicates the identification of the necessary areas there, that is, after all, this mode would be nice to somehow limit, well, for example, many cameras now allow you to record simply in color without using night mode, it's even more comfortable if, for example, there is some external light source, a flashlight for example, on a pole or you can specifically install just some additional searchlight that will illuminate the site, and do not use infrared illumination on the camera itself, well, in color, the picture quality is quite good there, now it is so good, a lot of details are visible and if you want, of course, you can switch to night mode at any time, but by default, it should record only in this, in color, without using infrared illumination, then different insects will not be distracted by this On the contrary, they will be distracted by the spotlight, and this, of course, will save the resources of the camera and the SD card itself, in general.
To ensure good coverage of the zigbee network, a stick from Sonoff is used, which is quite good, in a metal case, with an external antenna, the signal in it is much higher and in fact even no additional routers are needed in order to provide a good connection on such a site, well, the only thing that the server needs to be placed so that it is not it is shielded by a wall, or some other metal objects, but by and large this stick can directly process a lot of devices through itself, and the signal itself is quite good.
Well, in order for the signal to be better, and in principle, different devices will still be used in different buildings, we bought a lot of sockets from the Tuya ecosystem that work on zigbee, and simply installed an outlet in each building, in each room, in general everywhere, in the house on each floor, in the apartment building, etc.
each room and thus created such a contour is quite good, if you look at the zigbee network map, the signal is very high and all the sensors, wireless temperature sensors, opening sensors, they directly contacted through these routers and work there without any problems, that is, it also turned out quite well.
Also, these outlets worked all winter without any problems, of course they are probably not designed for -20 or -30, but this did not affect them in any way, because they work in a permanent network, there are no problems with batteries or any elements, well, they themselves are slightly heated from the fact that that consume electricity, if you want, you can generally turn them on in active mode there, if there is no load and there is such a dangerous one, then in principle they will also heat up the inside of this outlet a little, but even without this, everything worked and in general they provided the network there almost all winter.
To control the light, these same sockets are used mainly, and there is also a relay from Sonoff, which is used in the toilet, well, for now more for experiments, closer to the summer there may be experimenting with what other lighting options can be made, well, for heating there, in general, these sockets are also used and there are more one smart convector that works over wi-fi, well, it is generally the main one for heating and was used earlier when the Internet was just made, but there was no smart home server yet, and it is still the main one in this smart dacha.
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.