My Smart Home Server (part2)

To create a typical smart home server based on the Orange Pi 3, I plan to install, in addition to various standard software such as Home Assistant, and also some of my additional interesting things that I often use.

I have several utilities that allow you to work with a Telegram bot and, in principle, you can control a smart home through Telegram, that is, some typical commands are output and you can send different commands to Telegram in text and the system, the server, will process them not through the smart home system, but through this utility, it runs in the north, and periodically accesses the Telegram server, but at the same time there is a mode such that it does not make many requests, but there is such a long-polling mode, when he's just waiting for a response and when some command arrives, he executes it very quickly without any delays, and of course various service messages are also sent in Telegram, that is, if you need to send some information, there's some kind of log, or some kind of alert, then you can also do it in In principle, you can send video files, pictures, and even, if desired, you can create several different users for this bot and send each user their own information or some kind of messages, it's convenient and I use it all the time, so I'll install these utilities on this server too.

Of course, telegram can be implemented in a different way, you can configure a special module in the Home Assistant, but it will no longer be so flexible and integration with it will be more difficult, that is, you will need to use the Home Assistant in the interface, and for example, you will not be able to do this with Python or Bash scripts, you will need to use for example, the Home Assistant API and use it to execute these commands.

Of course, everything on this server will work locally, that is, if you do not take into account Yandex and smart speakers, then all the rest of the interaction with all devices will be done on the local network, and this is of course much more reliable, so I do not plan to integrate with other ecosystems and their applications, but still just use sensors from these ecosystems as devices.

I also use a local web server, it runs on Python and, in principle, it is convenient to save different values in it, a special API has been made for this server and of course they can be read much faster and still need to be saved, that is, either it can be saved in the Home Assistant and in all these systems. let's say there's an MQTT broker that will be installed, you can save parameters there, and Zigbee2 MQTT also saves parameters, so you can request them too, but by and large I use my server, which is more convenient for me, because, firstly, I can send different images through it, that is, in fact, I request and I can also receive all the necessary files using this server from this microcomputer, and I also use this web server to generate files for dashboards in the smart home system, that is, in fact, I am on I connect to this server on my tablet using the IP address and configure certain parameters there, and it turns out that the dashboard displays a web page from this web server.

But of course I still plan to install OpenHAB, in principle the system is interesting, it is already developing well and there are already additional different features, but probably one of the main features of this is that you can connect to it remotely via the OpenHAB cloud, and in principle the entire interface will be the same as the local one, there is a separate application more to do this, and for the Home Assistant, there is also an application that can be installed on a tablet and on a phone, but to connect you will have to pay for a paid subscription to the Home Assistant, and you can connect to OpenHAB for free now.

But of course there are fewer possibilities in OpenHAB, and everything is more complicated to configure there, and this is essentially just an additional solution that can be suitable for certain tasks, in principle, it is easy to output all the values of all sensors, too, and the switches are different, the light bulbs can be output, in principle it will be possible to control quite well too. a smart home, especially remotely without any additional payments for services.

To develop various automation scenarios on this server, I will also install NodeRed, in principle, it is convenient for those who are not very familiar with programming, because NodeRed allows you to visually prescribe everything, scripts, in fact, some low code, it integrates well with OpenHAB and with Home Assistant, you can normally query all properties, all values Sending sensors, sending commands, and controlling these sensors is by and large a very convenient tool, but if there are any complex scenarios that need to be done, then you can either install additional modules, or you can just take it and there is a built-in language, essentially Java, some kind of analog, and you can use small scripts to do some functions, do some calculations, or change some commands there, in principle, it will also be quite convenient.

Also, SSH access will be set up to manage and configure this server, in principle, a file manager will be installed there, essentially Midnight Commander, it is very similar to FAR, and in principle it will be much more convenient to do various operations through it, copy, in principle, there will also be a connection to network drives, which under Windows, it will also be possible to configure, and for visual connection, a VNC server will be installed there, it will need to be installed additionally, that is, there is no such thing in the most basic image, and I have been selecting and configuring it for a long time. Sometimes it is buggy, there is a special option to reboot it with a small script, and it restarts periodically, too, but by and large it is convenient when it is not possible, for example, to connect to a monitor or TV, and in order to visually adjust somesome parameters, for example, if you need to connect a Bluetooth speaker, you first need to do it manually through the interface, and sometimes it even happens when transferring from a card, from SD to internal memory, then you also have to reconfigure it again, otherwise it simply won't start.

Of course, in order to install it, you can download an image from the official website, it takes a long time to install and configure it all, I have detailed instructions on how to do it all, but of course the easiest way is to take a ready-made image, because I've already done it, everything is already set up there and basically nothing is needed. to change, well, the maximum that may not correspond to the Linux version may have already changed, a more recent one will be released, but I updated it not so long ago and it basically also works fine, there are no special complaints about it, well, it will be necessary to run the update and install the latest versions of all the modules, but it's not that difficult, it's done by one team, and therefore I'll probably do it, and I won't spend a lot of time setting it up again, because it's not easy at all and a lot of things are not very well done and understandable there.

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.