Just about the complicated. Part 2, the creation of a wireless "smart home". Based on Linux technology, Z-Wave and MajorDoMo software

  • Tutorial

Part 2. We continue to create smart home


In this part, we install the Z-Wave controller into the “Smart Home” system, define it and get acquainted with * Nix operating systems and work in the terminal (PuTTY program), I will explain my actions a little.

image

Let me remind my requirements for "smart home" (UD):


  1. The place is an apartment, where alteration (a significant alteration of something is not planned).
  2. The ability to integrate all solutions into a single open source data management system.
  3. The possibility of a gradual expansion (scaling) of the functional.
  4. If possible, the minimum cost.
  5. If possible, purchase elements of the system in the Republic of Belarus or in the Russian Federation, without any orders from foreign sites. Came, looked, bought.
  6. If possible, the Russian-language interface, documentation, support.

In the first part, we have already created a bootable memory card, configured and learned the IP address of the Raspberry board, learned a little about working with the PuTTY program and connecting via an SSH connection.

Now we are doing the following steps: let's expand the space on the memory card, install the RaZberry controller in the system, take a little look at the Z-Wave and MajorDoMo / control panel interface

First part ": Just about the complex. Start creating a wireless" smart home ". Based on Linux technology, Z-Wave and MajorDoMo software"

Install our Razzbery controller with power off. Turn on our small computer and connect to it using PuTTY. The power supply is recommended to use on 2A., But I used 1.5 A.

Small tips


If you are working in the Windows operating system, and you don’t often work with * nix, then perhaps the following tips will help you:

You can completely not type commands, copy the command to the clipboard and right-click in the PuTTY window, paste it into the line with the cursor.

The last commands can be searched using the ↑, ↓ keys.

Supplementing with the [Tab] key - if you enter the first few letters of the file name, command or path and then press the [Tab] key, bash will show the rest of the file name or path.

When working with PuTTY, if you accidentally forgot to set the correct settings, encoding, you have a problem with the display of characters, you can not close the window, just right-click on the top panel of the program and call the context menu of the program. Next, select the item: Change Settings ...

image

Also, if the connection is lost (restarting the remote PC), the Restart Session item appears in the context menu.

Expansion of free space on the memory card


First of all, I expanded my memory card. When you install it, the disk image is copied, and the memory, regardless of the capacity of your card, is 16 GB. If you have a memory card of 16 GB installed, you can skip this step.

In general, with such an operation, I recommend keeping the backup image, but since we only have a bare system there and we haven’t done anything yet, I don’t see the point.

Enter the command:

df –h 

image

Run Raspberry Configuration Utility

sudo raspi-config

Select item 7 “Advanced Options”, then point A1 “Expand Filesystem”:

image

After the execution, the command restart Raspberry, connecting to it in a new way, repeat the command:

df-h

image

As you can see, the space on the memory card has increased.

Installing a RaZberry controller:


With the RaZberry controller a small instruction was supplied in English and German.
You can read the Russian version here:

Russian version of the manual for RaZberry

Full English manual.

The Russian version of the manual is short (and in terms of installation, it corresponds to the full manual), so I will give it in full:

  1. Download the Raspbian wheezy image from the official site of the Raspberry Pi project (use the regular Raspbian wheezy, not the Soft-Float version).
  2. Write the image to the SD card (this procedure is described in detail on the Raspbian download site).
  3. Connect your RaZberry expansion card to your Raspberry Pi computer as shown in the image below. Attention! Never connect RaZberry to a running Raspberry Pi - always turn off the power before installing the expansion card!
  4. Insert SD card into Raspberry Pi
  5. Boot and connect to Raspberry Pi via SSH or via screen and keyboard
  6. Open a terminal and run the following command:
    wget -q -O - http://razberry.z-wave.me/install | sudo bash
  7. After successful installation, open the page in the browser http://IP_OF_YOUR_RASPBERRY:8083
  8. Z-Way for Razberry successfully installed!

We have already completed point 1-5 in the first part, but then I have problems:

I will give my procedure:

Run the command

wget -q -O - http://razberry.z-wave.me/install | sudo bash

We agree with the license agreement, we are installing and downloading files.

We see the launch of the mongoose service and there is a proposal to receive news from the Z-wave project.

We agree, we enter our e-mail in the end:

image

It seems that everything was installed and started.

Perform the penultimate item by typing in the browser page

http://IP_OF_YOUR_RASPBERRY:8083

image
It was here that I didn’t manage to open the page at all, as I didn’t try, without additional actions, z-wave does not start.

We can see the running processes by running the command:

pstree

image

Thanks to the MajorDoMo forum (I also saw a solution on some other, not Russian-speaking) I found a solution to the problem: You

need to remove everything from the folder: / opt "z-way-server". Then execute the commands:

wget -q -O - support.zwave.eu/libs | sudo bash
wget -q -O - http://razberry.z-wave.me/install | sudo bash
wget -q -O - support.zwave.eu/libs | sudo bash 

In order not to type the commands for deleting files by hand, I am used to using the Midnight Commander file manager or the abbreviated MC.

Description in the Wiki Midnight Commander

I already have an image installed in my image (but if something suddenly changes, then we execute the command to install):

sudo apt-get install mc

Run it from the administrator and find ourselves in the home folder of our mini PC

sudo mc

Go to the directory: / opt / z-way-server / Delete the contents by selecting insert and pressing F8.

I did not delete the folder itself. To exit, press F10 "exit from commander". Functional key assignment tips - at the bottom of the program window, highlighted in green.

image

Then we execute these three commands in turn:

wget -q -O - support.zwave.eu/libs | sudo bash
wget -q -O - http://razberry.z-wave.me/install | sudo bash
wget -q -O - support.zwave.eu/libs | sudo bash

Reboot Raspberry:

Sudo reboot

Restart the PuTTY session (as you remember, right click of the mouse, when the connection is broken, restart sesshion appears).

Having executed the pstree command again, we can see the Z-Way service started.

image

Having typed in the browser http://IP_OF_YOUR_RASPBERRY:8083we get on the page of initial settings. You must set your password, your username will be admin, Administrator privileges. We can also change the language, from English to Russian by default, this can be done on our settings page.

image

After typing IP_OF_YOUR_RASPBERRY : 8083 / expert, we switch to expert mode. Going to the tab Device - Interview we can see the status of our controller.

http://IP_OF_YOUR_RASPBERRY:8083/expert/#/configuration/interview/1

image

If you build “Smart Home” (apartment automation) only on Z-Wave technology, then perhaps this is enough, if you use several technologies and plan the expansion of the system, then in my opinion, this is not enough.

Therefore, install another module of Z-Wave in the Majordomo:

Go to the main page Majordomo: open the browser IP_OF_YOUR_RASPBERRY (already without the port), we see the familiar interface:

image

Go to the Control Panel , then: System Market Update - Equipment

image

At the end of addition the list for Z-Wave, add it.

Perhaps this will stop.

The only thing I wanted to add:

Small info: our Raspberry works under the Raspbian GNU / Linux operating system based on Debian9. You can find out the OS version using the commands:

cat /etc/*-release
lsb_release -a

In the installation instructions, described for the version of Raspbian wheezy (Debian 7), which has already ceased support and relevance since February 2016.

Read more about Debian from the Wiki

Sources:


So as not to search by text, I will repeat a short list of sources:

Z-wave.ru
Z-wave.by
Developer site MajorDoMo
Forum MajorDoMo
Russian version of the instruction for RaZberry
Full English manual.
First part ": Just about the complicated. Start creating a wireless" smart home ". Based on Linux technology, Z-Wave and MajorDoMo software"

Also popular now: