A typical smart home server (part1)

I recently bought another Orange Pi 3 microcomputer and I plan to use it to create a universal smart home server, of course, you can install some kind of supervisor on it and then all the problems will be solved, that is, everything will be automatically done, configured, integrated, but of course I won't do that, basically I have I have my own developed solutions and I plan to use them to set up this server.

This microcomputer itself is inexpensive, it's actually the microcomputer itself-the board and the case go with it, it was also immediately plastic, and I also have an already purchased stick, also not very expensive, the simplest Zigbee, which, in principle, all together it will cost $40, and in principle, based on this, it will be possible to make a normal server.

According to the hardware on this server, there is one gigabyte of memory in total, there is a gigabit Ethernet port, there is an EMMC built-in memory of 8 gigabytes, in principle this is not very much, but in general everything usually fits if you do not make some kind of multimedia server out of it, it also has Wi-Fi, but of course since the server if it is connected via Ethernet, then most likely it will not be used, there is a built-in Bluetooth module, since the case is plastic, it is not shielded by anything and it is quite normal to use the built-in one, it also has an IR receiver, of course it is quite difficult to configure, but for some small scenarios, you can also use it so that you can give commands with an infrared remote control, it passes the infrared signal through the case itself and, in principle, everything works, even from all very cheap remotes, it can also receive a signal from a decent distance.

Of course, this microcomputer does not have a transmitter at a frequency of 433 megahertz, over the radio channel, and therefore there will be no receiver by default, but if necessary, then you will need to come up with a separate solution, of course it has a gpio comb, and in principle you can connect it, by and large it is very similar and even compatible with Raspberry. but I haven't used it for a long time for various reasons, so of course, if desired, you can connect it, and there is even a hole in the case for this, that is, if it is in the case, you can output this sensor with separate wires, for example, make it outside, not inside this building.

Specifically, in this version, they have already made it so that AUX does not output sound, although there is such a connector and it is generally inconvenient, of course, I would like to have this function, for example, Raspberry has it and it works, but that's how it can be dispensed with, because, for example, I use a Bluetooth amplifier to output music, which can be connected normally via Bluetooth, and you can also automatically control it using commands and connect and disconnect, and change the volume, so the AUX itself is certainly not particularly in demand, of course it can be reconfigured there at the operating system and firmware level, but it's actually breaking the system, which I don't plan on doing.

Well, since it has a built-in memory of 8 gigabytes, I'm not going to use the SD card, it's only needed to put the operating system inside this microcomputer once, and then this SD card will essentially not be needed, I plan to use Debian Linux software, in principle, a special version has been released there, it it is for this microcomputer, and of course it will need to be adjusted a little, but by and large it is understandable, I use the same one on Raspberry and if you use it, then everything is the same and there are no big problems. The only thing that will need to be installed is various additional modules for remote connection to the desktop if necessary, for example, it is often necessary to connect Bluetooth for the first time, because it does not allow you to connect correctly through commands.

Of the smart home systems, in fact, I plan to install only the Home Assistant and the version that is not Supervisor, that is, it does not have various additional features, such as making a full Backup or managing microcomputer resources, but by and large it is not necessary, a broker will also be installed to manage the Zigbee service, this is Zigbee2MQTT, in principle in the Home Assistant, you can use the additional ZHA module built in there, but I watched a lot of different videos and didn't even try it, because of course in this version, in this service, there is much less support for the device, it is less developed and it is not so flexible to use on this microcomputer, it will be very difficult if you connect to Zigbee through other systems, it will not be easy, well, the Home Assistant will have different modules installed, almost typical, HACS will be installed, because it allows you to do more integration capabilities, and various modules are installed through it, which are needed for integration with Yandex, and with Yandex smart home, so in principle it will also be, I do not plan to install the module from Tuya for integration with the Tuya ecosystem separately, because in principle it is quite difficult to integrate, you will need to connect it via a developer server and get a special key through it, which of course is not very convenient and there is no big point in this, it is only necessary to connect, for example, a gateway here Tuya Zigbee, for example, or a device that works via Wi-Fi, but if Zigbee devices are connected directly, and Wi-Fi devices are not used specifically to control the house, then of course this is not necessary.

I also do not plan to install or do any integration with MiHome, by and large, all Zigbee devices are also connected and supported normally in Zigbee2MQTT and appear normally in the Home Assistant, and therefore there is no point in integrating them there in any other way.

The integration with Yandex is done normally, the module is installed and you will only need to log in there once in order for the speakers to appear and the integration with the Yandex smart home to be set up too, and then you can, of course, configure all this and forward the device to Yandex, if necessary, for example, for voice control.

The MPD player and server will also be installed on the server itself, and in principle it will be possible to turn on different music, but since there is little space on the server itself, and you can't use the SD card and internal memory at the same time, you can either plug this external disk or USB flash drive into the USB port on this microcomputer, or just like me I'm doing this Internet radio, I'm streaming it, I'm connecting it to this microcomputer, and then I'm broadcasting from it via Bluetooth to amplifiers and speakers, in principle it's quite normal, even if you want to listen to your music, it's much easier to do it on the basis of some other, well, or one of the microcomputers is also a server that will simply give this stream and then it can be sent through this MPD player to where it needs to be directed.

To view and control the cameras, a special Onvif module will also be installed in the Home Assistant, which allows you to control, watch, and output images to the Home Assistant, and even through integration with Yandex Smart Home, you can watch videos from these cameras already in the Yandex ecosystem, which is also convenient, and even no separate applications are needed. I can install it, but if these are any cameras that can normally send over RTSP or show the stream via Onvif and at the same time they can, that is, they are not flashed, they can still work in the native application, for example, I have Xiaomi or Tp-link cameras there that can stream both ways, via Onvif and RTSP, and, accordingly, I can also go in and watch videos through the application, so in principle it will be possible to use this way too.

Of course, in order for the memory not to be occupied, all logs will be disabled, all logging is by and large not particularly necessary, and of course I always turn them off, this is useful for the SD card because it will not fail, and for the internal one it simply will not overflow.

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.