Hello, friends
Finally, I got around to deploying the second Domoticz smart home control server - and in this review I will try to talk in detail about how I did it.
As a second platform, I decided to go with Orange Pi PC 2.
I bought the kit from the Banggood store, in addition to the single-board card itself - also
Inside is a computer board sealed in an antistatic bag.
There is nothing else included in the kit, so when purchasing you need to immediately order a power supply and a set of radiators - at a minimum.
Description of all elements and ports:
If anyone else hasn’t noticed, let me clarify - there is no Wi-Fi here (and no bluetooth either).
I immediately installed a set of radiators - the CPU radiator exactly matched in size, for the memory chips they were slightly smaller. But looking ahead, I will say that having repeatedly measured the temperature during the installation of the software, it was never above 40 degrees, on average 37.
Dimensions -
Matchbox scale
OS distributions for oranges are located, find our model and download - I took Debian Desktop - I might want to play with it in the future, but with the same success you can take the more compact Debian Server
We unpack the img of the system (maybe an archive in an archive - .xz in .rar) - we need exactly the .img file, Debian desktop - 2 GB with a cap. We write to microSD using Win32 Diskimage -
After the flash drive is written, insert it into the orange card reader and turn on the power. After a minute, let the system boot, go to the list of DHCP clients on the home router and look for the address issued for the OrangePi
Now you can access it via SSH using any SSH client - I use good old Putty.
By default, for orange debian, we use the following credentials -
User- root, pass - orangepi? but root access via SSH is closed, log in as the user orangepi, the password is the same. User orangepi- is a member of the sudo group.
Immediately change the password to yours with the command
Passwd
Su
and similarly change the password for root. After this, we log out of the root account - we do everything under the user account.
If you want to add another user, use the command
Sudo adduser [username]
And add it to the group with sudo command
Sudo adduser [username] sudo
Sudo nano -wuc /etc/network/interfaces
And write the address in the file
#The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.0.98 - our IP netmask 255.255.255.0 - gateway mask 192.168.0.1 - gateway
Reboot to apply the settings
Change the time zone using the command
Sudo dpkg-reconfigure tzdata
And set ntp
Sudo apt-get install ntp ntpdate
After installation, we register our ntp servers in the settings file instead of the default ones
Sudo nano /etc/ntp.conf
in my case - for Ukraine, you can find out more about the pool of ntp servers
Let's synchronize and enjoy the exact time.
Sudo apt-get update
And after successful loading -
Sudo apt-get uprgade
We are waiting for complete completion
Now we install Domoticz - this is done with one command
Sudo curl -L install.domoticz.com | bash
The stable version of Domoticz is assembled and installed
Basic settings - set in the installer window, but you can leave everything by default
In a few minutes, the system is installed and accessible via the web interface via http and https
At the moment, the stable version supports work with the Xiaomi gateway
But I installed beta - for version compatibility with Raspberry Pi. This is done by running a script from the home folder domoticz
Cd ~/domoticz sudo ./updatebeta
The Domoticz system is fully installed.
I won’t describe the little things that I later added - such as localization, ftp installation and other things, there are a lot of Debian manuals - in this review I focus on the minimum required for installing Domoticz. As for the system interface and issues of adding devices, I will send you back to my review
At this stage, I strongly recommend making a backup of a clean, brand new Domotics system, which will give you the opportunity to torture it as you like, and then get the original, clean image in a couple of minutes. To create a backup, I take a disk image with the R-Drive program, I found it on torrents, even the portable version is enough - I can’t tell you how many times it has helped me out.
But to tell you something else interesting, I’ll tell you about the add-on that I use to control a smart home from a smartphone -
First you need to install the server part, first we delete the current one and install a new node
Sudo apt-get remove node curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
After that install npm
Sudo npm install -g [email protected]
And check the versions
Node -v // must be at least 4.4.x npm -v // must be at least 2.2.x
Wget -qO - http://www.e-nef.com/domoticz/mdah/gpg.key | sudo apt-key add -
open the source file
Sudo nano /etc/apt/sources.list
and add the line -
Deb http://www.e-nef.com/domoticz/mdah/ /
Sudo apt-get update
And start installing the MyDomoAtHome server part
Sudo apt-get install MyDomoAtHome
After installation, add data for your Domoticz server to the settings file - specify the address (instead of 127.0.0.1)
Sudo nano /etc/mydomoathome/config.json
Now go to the address: 3002 - the system start page should load, and check whether data is coming from the devices - by following the link to the devices tab
If the picture is something like this, then everything is ok
All devices displayed in the Domoticz switch panel will be shown in Imperihome, here you can rename them (this does not affect Domoticz), add them to favorites, etc.
The client can work with Domotikz only on a home network (unless, of course, you are smart enough to expose the IP of the Domotikz server to a public IP address), to work remotely, you will need a VPN server.
I currently have a temporary solution working in the form of Open VPN on Raspberry - I want to organize this as a permanent solution using the router. Since my current router does not allow this, I had to update it, actually solving a number of other problems. But this will be the topic of the next review.
Anyone who wants to view everything described in the review in more detail can do so by watching my video review
That's all, I hope the review was useful, thanks for your attention
I'm planning to buy +97 Add to favorites I liked the review +72 +167Hello, friends
In today's review, I will return to the topic of single-board PCs and installation of the Domoticz server.
I'll tell you about a budget device - Orange Pi One, which cost me $19, with a case and two sets of radiators - $25.
Everything was purchased from the Bangood store
The heart of the single-board is a quad-core H3 Cortex-A7 processor with a frequency of 1.2 GHz in normal mode and 1.6 GHz in turbo mode. RAM - 512 MB, two 256 MB chips, the mini computer is equipped with one USB 2.0 port, micro USB - OTG, 100 MB Ethernet, HDMI, and a slot for micro SD.
That's what I said, my kit includes, in addition to the computer itself, a transparent acrylic case, a set of aluminum radiators and a previously purchased power cable with a USB connector.
The single board itself comes in a cardboard box, similar in design to the boxes from Orange Pi PC2 - which I talked about earlier (see links at the end of the review)
Inside it is a minicomputer hermetically sealed in an antistatic bag.
The mounting of the board measuring 69mm × 48mm is very tight. Every millimeter is used. All interface slots are located at the ends.
The minicomputer is equipped with one network interface - Ethernet 100 Mbit. There is no Wi-Fi, and I will say from my own experience - and I currently have a Raspberry Pi 3 and two Orange Pi PC2 running - it is better to use a cable connection. On Raspberry, I forcibly turned off Wi-Fi. For my purposes, one USB is sufficient.
On the other side of them is the power button.
On the conventionally upper side of the board there is a processor and one of the memory modules, as well as all interface connectors with the exception of the display port.
The display port and the second memory module are located at the bottom.
The passive cooling kit includes three aluminum radiators with adhesive backing. Square for the processor and rectangular for memory chips.
Labeling radiators takes literally a minute.
True, to install it in the case, I had to remove the heatsink from the bottom memory module - otherwise it simply wouldn’t fit there.
The transparent acrylic body consists of three parts. On top, with the Orange logo, there is a removable cover with latches, the main part of the case with holes for interfaces and the bottom cover with self-tapping screws.
As I already said, you can install the computer in the case only by removing the heatsink from the bottom memory module. So far no overheating has been noticed - the non-contact thermometer shows about 40 degrees after more than a day of continuous operation.
All holes perfectly match the interface connectors, there are no connection problems. The case will serve as excellent protection from dust, splashes - you never know. If you need access to the internal 40-pin connector, you don’t need to disassemble anything, just remove the top cover of the case.
As an operating system, I chose - and the choice is quite large - Debian Server from the Armbian project website. Download the system image to disk and unzip it - we need one file with the img extension.
Don’t forget to look at the default account settings - in our case, this is the root login and password 1234. We write the downloaded image to the microSD using win32imager and insert it into the minicomputer.
This shot was taken from a TV screen - the first launch of a minicomp with an external screen and keyboard (in principle, you can do it directly via SSH, but I did the first launch this way). At this stage, you need to log in using your default username and password, after which the system prompts you to change it. Next, you are asked to create a new user - you only need to enter a name and password, all other data can be skipped. The user is immediately added to the sudo group.
We update local package indexes to the latest changes in the repositories with the command
apt-get update
(in sudo mode). After that, update them with the command
apt-get upgrade.
We make it a rule to carry out this operation from time to time.
dpkg-reconfigure tzdata
What will lead to setting up the tzdata package - first select a geographic area, then your city.
After this, the time zone will be changed to your local one. Next, we use the same command to configure the locale package.
dpkg-reconfigure localesIn the menu that opens, uncheck the English line
look for and select Russian in UTF-8 encoding
In the next window, select Russian UTF-8 again.
As a file manager I use the imperishable Midnight Commander - which needs to be installed with the command apt-get install mc
Its first launch will show that the encoding is not yet ok, we’ll fix it now.
Find the locales file in the folder /etc/default
When you first enter edit mode, Midnight Commander will ask you to select a default text editor, I use nano
We delete all uncommented lines from the file, in nano it is convenient to do this with the Ctrl-K combination, enter Russian and exit with the Ctrl-X combination, saving the changes.
After that, we reboot the single-board with the command
After the reboot, we make sure that everything was done correctly, Russian localization was successful.
Let's finish setting the time by installing the ntp service. As it turned out, it was already installed on my distribution.
In addition, I changed the ntp.conf configuration file
time server addresses to local ones.
Time synchronization was successful, the time and date are completely correct. At this point, the initial combing of the system can be considered complete.
The next step is to install Domoticz using the command
sudo curl -L install.domoticz.com | bash
Web server ports can be left at default. We wait until all the necessary packages are downloaded and installed.
The installation was successful, however, the domoticz server did not start. We check it in the list of running processes and see that there is no such process.
We check whether all the necessary packages that Domoticz needs are in the system with the command ldd domoticz and we see that one is missing - libusb
The problem is not complicated - we just install what is missing
in a minute, everything a domotik needs to be happy is in the system.
For the purity of the experiment, we overload the single-board platform to make sure that the Domoticz server has started successfully.
Everything is fine, we have a new, freshly assembled smart home control system.
Information on setting up the system and many other useful things can be found in my past reviews, links to which are below -
The power of this mini computer is quite enough to run the Domoticz server - the performance is no worse than that of its more productive counterparts. True, it has fewer opportunities for additional services - if you require them.
That's all, thanks for your attention.
We continue designing a smart home - we are deploying the Domoticz control server on Orange Pi. Actually, it’s easier and faster to deploy on Raspberry, but the orange one is much cheaper, and taking into account the fact that only 1 Xiaomi gateway can be connected to one Domotics server, there should be savings.
Of course, you can live with one gateway, but in the case of large areas or number of floors or number of devices, one gateway may not be enough.
Orange Pi PC 2. Specifications
CPU - Allwinner H5, ARM Cortex-A53 Quad Core GPU - Mali450MP, Hexa-core RAM - 1 GB Storage - microSD, NOR Flash 2Mb Network capabilities - Ethernet 10/100/1000 Video output - HDMI USB ports - 3 Wireless capabilities - Infrared Audio output port - 3.5 Jack, HDMI GPIO - 40 pins Power supply - 5V 2A with small jack. - there is no Wi-Fi here (and no bluetooth either).
To install the OS, we need an SD card, preferably at least 8 GB, and it is advisable to have at least two identical cards - for backups. I didn’t buy any additional ones, since I have a decent supply of cards; for the orange, I saved two MICROSD 16GB SAMSUNG CLASS 10 cards
OS distributives for oranges are located, find our model and download - I took Debian Desktop - I might want to play with it in the future, but with the same success you can take the more compact Debian Server /
We unpack the img of the system (maybe an archive in an archive - .xz in .rar) - we need exactly the .img file, Debian desktop - 2 GB with a cap. Writing to microSD using Win32 Diskimage - LINK
After the flash drive is written, insert it into the orange card reader and turn on the power. After a minute, let the system boot, go to the list of DHCP clients on the home router and look for the address issued for the OrangePi
Now you can access it via SSH using any SSH client - I use good old Putty.
By default, for orange debian, we use the following credentials -
user - root, pass - orangepi? but root access via SSH is closed, log in as the user orangepi, the password is the same. User orangepi- is a member of the sudo group.
Immediately change the password to yours with the command
passwdand similarly change the password for root. After this, we log out of the root account - we do everything under the user account.
If you want to add another user, use the command
sudo adduser [username]And add it to the group with sudo command
sudo adduser [username] sudoAnd write the address in the file
#The primary network interface allow - hotplug eth0 iface eth0 inet static address 192.168.0.98 - our IP netmask 255.255.255.0 - gateway mask 192.168.0.1 - gatewayReboot to apply the settings - sudo reboot
Change the time zone using the command
sudo dpkg - reconfigure tzdataAnd set ntp
sudo apt - get install ntp ntpdateafter installation, we register our ntp servers in the settings file instead of the default ones
sudo nano /etc/ntp. confLet's synchronize and enjoy the exact time.
Before installation, you need to update the system, to do this, first run the command
sudo apt - get updateAnd after successful loading -
sudo apt - get uprgadeWe are waiting for complete completion
Now we install Domoticz - this is done with one command
sudo curl - L install . domoticz. com | bashThe stable version of Domoticz is assembled and installed
Basic settings - set in the installer window, but you can leave everything by default
At the moment, the stable version supports work with the Xiaomi gateway
An ideal solution for building smart home systems!
Are available
Buy in bulkThe kit is designed to create an automation system, dispatch and remote control of devices in order to increase comfort and safety in a residential building or any other facility. Thanks to the flexible and intuitive interface, using the module you can easily build a heating control system for a country house or a full-fledged Smart Home system.
The device is designed for installation in a housing on a D6MG DIN rail, manufactured by Gainta.
Mini-computer | Orange PI One |
Supply voltage, V | 5 |
Current consumption, A | 3 |
Number of discrete analog inputs (-12V) | 10 |
Input type | (negative) 0V |
Number of digital inputs (1-wire) | 2 |
Digital input power line, V | 5 |
Number of digital outputs | 15 |
Maximum current of discrete outputs, mA | 500 |
Output type | open collector |
Inductive load reverse voltage protection | built-in |
Output type (negative) | weight |
Output potential | (negative) - |
Recommended Temperature Sensors | DS18B20, MP18B20 |
dimensions | 86x102x65 |
Weight | 100 |
The device is an expansion board with elements and a minicomputer connected to each other by a PBDR-20x2 connector. The minicomputer board is equipped with a USB 2.0 connector, to which a modem is connected for connecting to the Internet. The expansion board is equipped with screw terminals for convenient connection of peripherals and power, as well as signal LEDs at the output for easy checking and configuring the system. A web interface is used for setup; you do not need any special equipment.
Smart Home connection example
Example of connecting floor heating control 6 zones
Shield assembly example
The Smart Home system is increasingly found in homes. And indeed, the comfort and safety that it provides can hardly be overestimated by anyone who has lived in such a house for at least 2-3 weeks.
I'll tell you about our implementation of a home automation system:
The “heart” of the system is the already proven and reliable Orange Pi One.
I prepared the board for a housing on a D6MG din rail:
Connection diagram for the unit in the electrical panel:
It should be taken into account that the 3 input phases go to the bottom of the machine.
This is what the shield looks like before it is decorated with ties, boxes, etc.:
A Huawei USB modem is used to communicate with the server. We tried different ones, we liked the characteristics of the e3131 model. Remember to "unlock" the modem if you need it. Then we top up the SIM card account and select the desired tariff in advance.
Next, change the firmware extension braindomProsh22noya.hex to “img” and upload it to the microSD card using the rufus program as a DD image and turn on the power. (for some reason the site does not accept the file with the original extension). When the modem indicator shows that it is online, a unique login, password and control link in the web interface will be generated for you.
Next, write to us on watsapp at 89273438967 with a message like “brain-dom 02/18/2017 21:30”, where the date and time indicate the moment when the modem went online. In response to the message, we will send you your credentials.
You can download the Android application from the attached files, and within a month it will appear on Google Play (I will update the article).
What management looks like now in the application and in the web version:
Application:
Web interface:
From the images you can understand that we controlled lighting, controlled sockets, and also connected smoke detectors, a motion sensor, a door opening sensor, temperature sensors in the room, on the battery, and on the street.