Create a shell to get you started. Linux Command Shell Evolution

It is difficult to ignore technological innovations that have long become a part of everyday life. Among such familiar things as the Internet or smartphones, the smart home stands out especially, helping to combine the used gadgets and household appliances into a single network for more comfortable and simple operation. It is easy to configure a smart home to meet your own needs, introducing new modules into the network and programming them to perform specified scenarios. Sensors used in the process of home control are triggered:

  • To the sound;
  • On the move;
  • On thermal energy.

Simple sensors are even presented in the mall, where they monitor the automatic opening of doors and perform other tasks. It can be hard to believe that a smart home can become an integral part of a person’s life, but it is true. To reduce their labor costs and train devices to perform simple functions on their own, you only need to implement a smart home project that contributes to all this.

The principle of the smart home

For automated technology, software is used that allows you to perform various tasks with its help. Programs are applied in a smart home, expanding the functionality of its capabilities. To program the operation of the device, you must have certain skills. Therefore, for novice owners, the best choice is to use applications that are already adapted to the requirements of ordinary users.

When developing a smart home, you can choose one of several options. In the first case, a turnkey solution will be used, which will remain to be installed on the site. This option requires a minimum of effort, but its cost is significant. Not everyone can implement such a project. Another solution is to understand the concept itself, which will allow us to create and assemble a smart home with our own hands in the future.

The work process depends on the correctness of the calculations made by the owner, which leads to lower costs. It is not difficult to assemble a smart home on your own, if you approach the matter with all caution and understanding. As a result, this will save money, and will allow you to get some skills in handling modules.

Smart Home Automation Process

It is easy to make devices used daily to work according to a given scenario if you use the appropriate control unit for this. Raspberry Pi has developed a minicomputer, which is suitable for solving the task. The device is compact and efficient, and also makes project automation simple and straightforward. Raspberry has a low cost, especially when compared with other manufacturers that have introduced their products on the market. But this did not stop the company from offering really high-quality equipment, which became popular. Initially, the company developed two variations of the minicomputer:

  • model A;
  • model B.

Visual design and equipment

These devices are controlled by the ARM11 chipset with a performance of 700 MHz. The differences between the variations are the amount of memory on board. So product B is equipped with a 512 MB RAM bar, which is twice the performance of Model A with 256 MB. As a result, the company decided to release both variations at the same time, especially since minicomputer A had additional advantages. It was equipped with an Ethernet port, allowing you to connect to the network. The company continued to upgrade its products by rethinking the second version of the computer. This led to the appearance of improved version B, which became even more compact, and also received a stylish design. Of the design developments, it is worth noting the presence of 4 USB connectors, which is 2 times the number of ports of this type for the previous version.

Read also: DIY water leakage sensor

The device has proven itself in the field of creating smart homes. The low price makes Raspberry an excellent choice for building the entire project, and the multifunctionality of the minicomputer copes with complex tasks. Automation of devices based on such an aggregate is becoming the best among the available solutions.

Raspberry is able to control Z-Wave devices that facilitate home appliance management. Installing the RaZberry board in the mini PC makes the control unit efficient and reliable. Z-Wave introduces the modern standard for smart home technology with a wireless workflow. As a result, the owner has the opportunity to refuse to use additional elements and consumables, reducing overall costs. Managing Z-Wave is easy. Therefore, a person who does not have practical experience in working on similar projects is capable of realizing a smart home.

An added benefit is the ability to upgrade an existing board. So if there is a decrease in performance, which is no longer enough for the modules to work, then Z-Wave can be upgraded using auxiliary elements, as is the case with the improvement of a standard PC. Performing an upgrade eliminates the need to completely change the device.

Z-Wave Controller

If the user does not have enough experience or free time to complete the installation, then Z-Wave can offer services for setting up or installing equipment in any region of the Russian Federation. Any questions can be resolved with the help of an extensive database, which is freely available, or using technical support. Raspberry has established itself on the best side in the field of video surveillance. Using the board and a standard webcam, the user receives a system that is able to broadcast the image to the network, regardless of the location of the tracking device. Keeping track of an object becomes even easier, since there is no need to constantly monitor the situation. It is enough to track the main events at the end of the work to find out about any incidents recorded by the camcorder.

A modern smart home is a multifaceted system that is responsible for performing predefined tasks, and also provides access to actions that are based on embedded algorithms. This makes the project more autonomous and independent of human teams. A smart home independently seeks solutions in difficult situations, building on previous experience.

To develop such a house is not difficult, especially with a careful approach. As a result, the owner becomes a recipient of great benefit thanks to his innovations. Having defined the features of automation, you can significantly reduce time consumption, as well as save energy and increase security for residents of the house. Convenience is determined by the selected components on which the project is based, so Raspberry will become a reliable assistant in creating a smart home.

Smart Home on Raspberry Pi

As you know, many functions performed by household appliances can be automated without much effort, and it becomes even easier to control the operation of equipment in a remote mode. Further, the reader can familiarize himself with how to develop your project, starting from the capabilities of the Raspberry minicomputer. The main issue will be the development of a controller that can efficiently monitor lighting in each individual room, as well as adjust the current temperature and other parameters of life support in the house. Raspberry Pi will also run multimedia equipment, as well as home security features.

The composition of the control unit

To assemble your smart home, first you need to purchase all the components included in the minimum configuration:

  • NodeMCU ESP-12E;
  • Volumetric sensor
  • Temperature sensors;
  • Humidity sensors
  • relay module;
  • memory card;
  • RaspberryPi 3.

The processor itself, and in this configuration it is the third model, is chosen arbitrarily, so the other version will be no less efficient and suitable for a smart home. The choice in favor of the Raspberry Pi 3 is due to the fact that the unit is equipped with wireless modules. You can replace NodeMCU with Arduino Nano, or use the auxiliary module for Wi-Fi.

Read also: Soon Siri will be able to adapt his answers to the person

The components that make up the control unit must be connected and adjusted. To reduce the time and effort, it will be profitable to purchase a turnkey solution, such as NodeMCU. Power elements are selected in the amount involved in the project. For the presented configuration, 3 elements are required. The configuration of the sensors is determined individually. If desired, you can abandon the volumetric sensor if its use does not have a logical need.

Install Raspbian

To cope with the installation of the OS, you will need to visit the official page of the company, where you can always find and download the latest version. Next, formatting the card in FAT is performed. According to the specified requirements, we build the image for the OS used. It remains to connect the card to the minicomputer, as well as attach the keyboard and screen, which may be the role of the TV. The boot process usually takes a little time, after which you can proceed to the settings.

So you can set your own password and other parameters. You should not change the current setting of the boot screen, since the graphic part will not be used during the operation of the smart home. We proceed to change the host located in Hostname, and also set SSH, which will allow us to manage the device with great comfort in the future. When all the settings have been applied, it remains only to reboot the device by clicking Finish.

WIFI adjustment

When the device is restarted, go to the interfaces, where the procedure is as follows:

  • We write the command sudo nano / etc / network / interfaces;
  • Find the part iface wlan0 inet manual  and replace this line with iface wlan0 inet static,
  • Do not forget to specify your own static IP address.

An example of the work done is as follows:

auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.1.150 netmask 255.255.255.0

gateway 192.168.1.1 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf address, netmask, gateway -

but in your case, the setting should go under your own router.

The next step will be the transition to the supplicant, where you should specify such a command

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

The window that opens allows you to enter all the necessary settings for the wireless network.

Settings example:

ctrl_interface \u003d DIR \u003d / var / run / wpa_supplicant GROUP \u003d netdev

update_config \u003d 1

network \u003d (ssid \u003d "your SSID" psk \u003d "your password")

sudo ifdown wlan0

The process will be completed, after which it remains to indicate

sudo ifup wlan0

waiting for the reboot to complete due to the command

sudo reboot

Provided that all operations are performed correctly, in the end we get a fully configured wireless network, to which the device is switched at startup.

Minicomputer update

Before starting further adjustments, you should deal with the system upgrade. The sequence is not complicated:

  • introduce sudo apt-get update sudo apt-get upgrade;
  • check the current version with the command g ++ - 4.9 –v  and check with the actual;
  • if the version used is out of date, then enter sudo apt-get install g ++.

We proceed to install NODE.JS. This program, starting with the fourth version, supports ARM. In order to install NODE.JS, you will need to specify a sequence of commands:

  • curl -sL https://deb.nodesource.com/setup_6.x;
  • sudo -E bash - sudo apt-get install -y nodejs;
  • to check the current version, enter nodejs –v.

Install HOMEBRIDGE

The first step is to install Avahi and the other components that are required for MDNS to work. Go to the command line and begin to enter such a sequence

  • sudo apt-get install avahi-daemon avahi-discover libnss-mdns libavahi-compat-libdnssd-dev;
  • sudo npm install -g —unsafe-perm homebridge hap-nodejs node-gyp;
  • cd / usr / lib / node_modules / homebridge /;
  • sudo npm install —unsafe-perm bignum;
  • cd / usr / lib / node_modules / hap-nodejs / node_modules / mdns;
  • sudo node-gyp BUILDENGINE \u003d Release rebuild.

For verification purposes, we perform a test run with the homebridge command, and in response we should expect approximately the following sequence:

   config.json (/home/pi/.homebridge/config.json) not found.

Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

│ 031-45-154 │

  Homebridge is running on port 44278

If something similar was obtained, the previous commands were executed and applied correctly. As you can see from the example, the program could not find config.json, which means that you will have to deal with it yourself:

  • sudo -i;
  • mkdir /root/.homebridge;
  • touch /root/.homebridge/config.json.

A smart house built on the basis of the Raspberry Pi 3 is a multifunctional complex that allows you to control and manage all the elements of your pest living, whether it is an apartment, a summer house or a private house. Under his "leadership", many elements work, from light bulbs in rooms, ending with a heating system and the launch of systems that recognize the presence of a person.

A feature of the system is the coordinated work of all components, reliability and comparative ease of configuration.

What is the principle of smart home? What features and capabilities are relevant? What to consider when setting up and preparing for work? How to build a smart home system based on the Raspberry Pi 3? We will consider these and other questions below.

Principle of operation

A smart home based on the Raspberry Pi 3 is popular due to its ease of assembly, including for people without special experience. The basis of the entire system is a small motherboard, in which the manufacturer has laid huge potential.

Initially, the company sold two complete sets of the device - models A and B. The first was different in the size of memory of 256 MB, and the second was twice its size.

Model A was on sale for some time, due to the availability of access to the global network, but after updating to version “B” the first option was no longer needed. The new version was compact and had four USB ports.

The construction of a smart home based on the Raspberry Pi 3 depends on the preferences of the owner. Regardless of this, the principle of operation remains unchanged:


If desired, the smart home system can be assembled on a platform of the "open" type, for example, Fhem, openHAB, SHC. An equally popular option is the use of the wiBulter platform.

Where does the Raspberry Pi 3 Model B apply

The scope of the smart home based on the Raspberry Pi is limited only by the knowledge of the installer and the wishes of the owner of the house. The following options are possible here:


The capabilities of the smart home on the Raspberry Pi allow you to use the design as a set-top box, home weather station, security system or tablet. Possibilities of application are almost unlimited.

Features and specifications of the Raspberry Pi 3 Model B

The device is a compact computer having the dimensions of a plastic card of the bank. The chip is equipped with the necessary equipment for work - CPU, RAM, HDMI-connector, USB and composite output. There is also an Ethernet connector, wireless and bluetooth.

The Raspberry Pi 3 Model B block has four dozen input and output contacts for the basic purpose. They are designed to connect peripheral devices that need to interact with other elements of the outside world. We are talking about switching with sensors and executive products, working from the network.

The base OS for the smart home on the Raspberry Pi 3 is Linux. The operating system is installed on a microSD memory card, which is installed in a special slot on the board.

Many previously worked only with Windows and fear Linux. There is nothing unusual in this OS. It is easy to use and has a high level of security. If during installation errors were made in the configuration, they can be easily corrected by restoring the image.

The Raspberry Pi 3 Model is a more advanced version of the second model. The new board is fully compatible with the previous version, but differs in higher performance and additional means for connecting:

  1. There is a wireless connection Wi-Fi 802.11n series and bluetooth 4.1.
  2. There is a processor with four cores (type - ARM Cortex-A53). The frequency of operation is 1.2 gigahertz. It is based on a single chip chip type Broadcom BCM

The CPU provides ARM v53 architecture. This allows you to use any operating system, for example, Ubuntu or Windows 10.

The use of a 4-core chip guarantees an increase in product power by 50-60 percent (when compared with the second model) and by 1000 percent compared to the first Raspberry Pi.

Thanks to this feature, the mini PC opens up even more possibilities for creating complex smart home projects, which, against the background of access to the Network, opens up almost limitless prospects.

The new Raspberry Pi 3 model is endowed with 1 GB of RAM. Part of this memory is used by the graphics subsystem. As for the graphic part, a 2-core VideoCore IV CPU is installed here.

The system supports various standards such as OpenGL ES 2.0, VC-1, OpenVG, MPEG-2. Additional features - the ability to encode, decode and display full-screen HD video on the screen. Video options - 1080p, 60 FPS, H.264.

Periphery

A permanent plus of the system is the ability to connect a TV or display using the HDMI output. Resolution can be changed in the range from 640 * 350 to 1920 * 1200. The composite type output has two operating modes - NTSC and PAL. For switching speakers and headphones, a 3.5 mm jack is provided.

Additional advantages of a smart home based on the Raspberry Pi 3 are USB ports connected by an internal hub. If necessary, you can connect a mouse and keyboard.

The device provides the ability to save CPU resources. To do this, the Raspberry Pi 3 models have 15-pin connectors. Among them - CSI-2, used to connect the camera, and DSI for switching the screen.

There are a number of low-level interfaces, namely power pins (3 and 5 Volts, as well as ground), 40 ports for general input and output, SPI with a choice, serial UART and I 2 C / TWI.

To connect to a smart home based on the Raspberry Pi 3 Model B, Bluetooth 4.1, Wi-Fi 802.1 n and Ethernet (10/100 Mbps) are provided. In the latter case, the output is equipped with a regular RJ-45 type connector.

Feeding part and dimensions

A voltage of 5 V is supplied to the product, coming from a special adapter through the power pins or microUSB connector. For reliability, it is better to use a source having I of 2 amperes or more. In this case, it becomes possible to connect more powerful products to the USB ports.

There is no hardware switch providing voltage supply on the board. The activation of the mini PC occurs by plugging the cord into a power outlet, and the basic functions of the OS are used to disconnect.

The dimensions of the board are only 8.5 * 5.4 cm. The necessary ports are placed in it, some of which slightly favor the overall dimensions (by a few millimeters).

BY

In a smart home based on the Raspberry Pi 3 Model B there is no familiar hard drive, so the "OS" is installed on a portable medium (memory card). It must be prepared and delivered in advance.

If you have multiple memory cards, you can use different images for the smart home system. It is worth considering that the memory card is not included in the package, so you have to buy it yourself. It is advisable to take microSD with a capacity of 4 GB or more.

Basic parameters:

  • CPU: 64 bits 4 cores. Type - ARM Cortex-A53. Frequency - 1.2 GHz. Chip single-crystal BCM2837;
  • RAM - one gigabyte of LPDDR2 SDRAM;
  • digital HDMI output to video;
  • 3.5 mm audio output (4 pin);
  • uSB ports type 2.0 × 4;
  • network support - Wi-Fi11n, 10/100 megabytes RJ45 Ethernet;
  • for display connection - Display Serial Interface (DSI);
  • bluetooth - Bluetooth 4.1, Low Energy;
  • for connecting a video camera - MIPI Camera Serial Interface (CSI-2);
  • microUSD slot;
  • 40 I / O ports
  • dimensions - 8.6 * 5.6 * 1.7 cm.

Advantages of the Raspberry Pi 3 Model B

A smart home based on the Raspberry Pi 3 Model B has a number of undeniable advantages:

  1. The presence of a large selection of interfaces to maximize the capabilities of the system. It provides bluetooth, Wi-Fi, HDMI and USB ports.
  2. Possibility to connect a GSM modem to get in touch with an operator providing global network services.
  3. The presence of a powerful processor with four cores at 1.2 GHz, capable of solving serious problems.
  4. Full compatibility of the new and previous versions.
  5. Compactness. The device is small in size and weighs only 45 grams.
  6. Overclocking availability. If desired, an increase in system performance is available.
  7. Ease of use. Programming the Raspberry Pi 3 Model B can be done in different languages.

It is also worth highlighting a number of advantages of a smart home built on the basis of the Raspberry Pi 3 Model B:

  1. The ability to secure the building by flood protection, installation of video surveillance, the creation of fire and security systems.
  2. Installation of systems that increase comfort. We are talking about electrical appliances, as well as special devices that control the blinds.
  3. The ability to install a system that provides additional savings. Sensor mixers, motion sensors, as well as sensors that record the movement of a person or animals are used.
  4. Availability of installation of entertainment special systems. For example, you can connect a multiroom or a home theater to a smart home on the Raspberry Pi 3 Model B.

For the sake of completeness, it is worth considering a number of minuses characteristic of a smart home on the Raspberry Pi 3 Model B:

  1. Installation of such devices is suitable for large mansions located outside the city limits and having a large area.
  2. To install, you need to know the features and rules for using each of the elements. In extreme cases, it is advisable to have a qualified specialist at hand who is ready at any time to help in the matter of interest.
  3. Over time, the smart home built on the Raspberry Pi 3 Model B will become obsolete. For this reason, it may be difficult to find the necessary components (in the event of a breakdown).

In general, the device has more positive qualities, so it deserves the attention of people who want to equip a comfortable and convenient house in operation.

Modules that can be used

To expand the functionality of a smart home on the Raspberry Pi 3 Model B, you can use additional modules. Their application expands the number of available options and allows you to create a unique system that provides maximum convenience:

  1. VIDEO CAMERA . Connecting this module allows you to complement your smart home with a video surveillance system. The camera is combined with the operating system of a small PC Raspberry Pi 3 Model B. After installing the device, you can capture video in Full HD resolution and take photos with a resolution of 5 MP.
  2. SMOKE AND WATER SENSORS. Installing these modules allows you to protect property from fire and leaks, respectively. For owners of large houses, this is a useful option to avoid troubles. In the event of smoke or flood, the system promptly informs the owner of the presence of problems.
  3. TEMPERATURE AND AIR HUMIDITY METER. Using these modules, you can turn a smart home based on the Raspberry Pi 3 Model B into a weather station with detailed information about the situation outside the window and indoors.
  4. MOTION SENSOR . Connecting the device allows you to automatically turn on and off the light in the rooms. The motion sensor is useful on the street, in the garage, in the corridor and other non-residential premises.
  5. WIRELESS COMMUNICATION MODULE. To combine external devices and the controller, you can use the receiver and transmitter, operating at a frequency of 433 Hz. If you have the money, you can buy a more advanced version of the device - Z-Wave Fibaro Home Center

The use of these sensors expands the capabilities of a smart home and increases its level of protection.

The first settings and preparation for work

To begin with, it is worth familiarizing yourself with the instructions and manufacturer's recommendations regarding the use of the device. It is worth making sure that you have the necessary sensors and plan their connection. The board is installed in a special box that protects the product from mechanical stress. The device does not play and looks very solid.

After removing the top cover, you can access the board. The only difficulty is connecting the side connector. For convenience, it is recommended to buy a corner cable.

In addition, two radiators are purchased for cooling the Ethernet controller and the main chip.

There are other solutions.

For the first launch, you need a memory card with the operating system installed on it. The minimum size of the flash drive should be from 4 GB or more. The OS image is available on the Internet (download link below). Win32 Disc Imager is also required.

After downloading the image to a laptop, you need to unpack it from the archive, and then insert the memory card into the card reader. Next, the already installed Win32 Disc Imager program starts.

As soon as the work is completed, with the help of the program, an image is selected and written to the flash drive.

Smart home system assembly

To avoid problems, we give detailed instructions for assembling the system and preparing it for work. The action algorithm is as follows:

  1. Log in to the official website of the Raspberry Pi 3 Model B device and download the required OS version.
  2. Purchase and format a Micro SD memory card. Boot on her OS image.
  3. Installing the card in the motherboard connector for installing the OS.

This completes the setup of the Raspberry Pi 3 Model B.

  1. Installing Node JS. Passing this stage will be required for the full operation of NodeMCU ESP-12E.
  2. Installing Homebridge and setting up automatic start with Root rights (the device should start after turning on the Raspberry Pi 3 Model B).
  3. Connection of external modules according to a special scheme.

After completing these works, you need to go to your mobile phone and open the Home application. After that, add the Raspberry Pi platform.

The owner controls the lighting, knows the exact information about humidity and temperature, receives information about the presence of leaks or smoke (if such problems occur).

This is only part of the smart home features on the Raspberry Pi 3 Model B that the owner gets.

By going to the package you can familiarize yourself with the full.

What can happen, look at the video.

Summary

A smart home based on the Raspberry Pi 3 Model B is a convenient alternative to existing and more expensive devices. The platform’s feature is compactness, expandability and low cost. You can connect various external modules to it without worrying about compatibility issues.

Despite the time costs, the result of labor is a powerful and convenient system that provides complete home automation. In the future, you can connect multimedia and other devices to it.

5 / 5 ( 1    voice)

Share with friends or save for yourself:

  Loading...