Silicon Labs Z-Ware Web Server Installation Manual

Instruction
Z-Ware Web Server Installation Guide
INS12905
Version:
Description:
Z-Ware Web Server Installation, Configuration, Administration & Building Guide
Written By:
SAMBAT;YANYAN;FTEO;BBR
Date:
Reviewed By:
BYEO;KMEEL
Restrictions:
Partners Only
Approved by:
This document is the property of Silicon Labs. The data contained herein, in whole or in part, may not be duplicated, used or disclosed outside the recipient for any purpose. This restriction does not limit the recipient's right to use information contained in the data if it is obtained from another source without restriction.
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page ii of v
REVISION RECORD
Doc. Rev
Date
By
Pages affected
Brief description of changes
1
20131226
KSS
ALL
Initial revision
2
20140930
SNA
25
v1.00.01 – added SMTP Authentication option; updated Ref
3
20150226
SNA
22
Added build info
4
20151012
AYY
19
Added fullclean command
5
20151013
AMD
12,13
Added Scenes configuration
6
20160310
AYY
2, 14,16, 22
Updated run time dependencies, added auto-start option, added device database, updated Reference
7
20160922
AYY
SNA
2- 5, 7-8, 15, 17
1
Added log rotate function, added server certificate section. Merged CE version installation guide into this doc. Added parallel keyword for compilation. Added additional installation settings. Modified introduction, & previously modified areas
8
20170110
FT AYY
1,2,8 13-14
Update CE version for RPi3 support Added Operating System Common CA Certificate Configuration Added generation of ZIPGW certificate during portal registration
9
20170224
AYY
9-10
Added OAuth2 Database settings, IFTTT settings, Operation system CA certificate setting.
10
20170516
FT
AYY
3 8 9 14-15
Untar with sub-directory created. Update document with the missing Email sender name. Re-order OAuth2 Clients, IFTTT, OS Common CA setting in documents. Update ZIPGW certificate generation process during portal registration
11
20170717
AYY
2, 22
Added toolchain and OS image for BeagleBone Black and Raspberry Pi 3
12
20180305
BBR
All
Added Silicon Labs template
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page iii of v
Table of Contents
1 INTRODUCTION ................................................................................................................................... 1
1.1 Purpose .............................................................................................................................................. 1
1.2 Audience and prerequisites ................................................................................................................ 1
2 INSTALLATION .................................................................................................................................... 2
2.1 Deployment systems .......................................................................................................................... 2
2.2 Runtime package dependencies ........................................................................................................ 2
2.3 User privilege ...................................................................................................................................... 2
2.4 Selection of deployment directory ...................................................................................................... 2
2.5 Installation (Deployment) procedure .................................................................................................. 2
2.6 Install time only Configurations .......................................................................................................... 3
2.6.1 Upstart Settings ........................................................................................................................ 3
2.6.2 Autostart Setting ....................................................................................................................... 4
2.6.3 BBB Wi-Fi Cape Setting (BBB version Only) ........................................................................... 4
2.7 Software License ................................................................................................................................ 4
3 SYSTEM CONFIGURATION ................................................................................................................ 5
3.1 Configuration Description ................................................................................................................... 5
3.1.1 System Settings ....................................................................................................................... 5
3.1.2 Z-Ware Portal Daemon Settings .............................................................................................. 6
3.1.3 Z-Ware Web Settings ............................................................................................................... 7
3.1.4 HTTP Server Settings .............................................................................................................. 7
3.1.5 Email Settings (Portal Version Only) ........................................................................................ 8
3.1.6 LDAP Settings (Portal Version Only) ....................................................................................... 8
3.1.7 OAuth2 Clients Settings (Portal Version Only) ........................................................................ 9
3.1.8 IFTTT Settings (Portal Version Only) ....................................................................................... 9
3.1.9 Operating System Common CA Certificate Configuration ....................................................... 9
3.1.10 SSL Settings ..........................................................................................................................10
3.2 Sample SMTP Configuration (Portal Version Only) .........................................................................11
3.3 Secure HTTP ....................................................................................................................................11
3.4 Certificate and Key generation .........................................................................................................12
3.5 Scenes Configuration .......................................................................................................................12
3.5.1 Group: SECURITY SCENE NOTIFICATION EMAIL .............................................................13
3.5.2 Group: SECURITY SCENE NOTIFICATION SMS ................................................................13
3.5.3 Group: SMTP .........................................................................................................................13
3.6 Device specific configuration and information database ..................................................................14
3.7 Generation of ZIPGW certificate during Portal registration ..............................................................14
4 SERVICE MANAGEMENT .................................................................................................................16
4.1 Managing services directly using Upstart .........................................................................................16
4.2 Auto start Z-Ware service after system boot ....................................................................................17
4.3 LDAP entries (Portal Version Only) ..................................................................................................17
5 LOG FILES ..........................................................................................................................................18
5.1 Z-Ware Portal Daemon ....................................................................................................................18
5.2 Z-Ware Web (CGI) ...........................................................................................................................18
5.3 Apache HTTP Server .......................................................................................................................18
5.4 OpenLDAP (Portal Version Only) .....................................................................................................19
6 USER INTERFACE (WEB) .................................................................................................................20
6.1 Security .............................................................................................................................................20
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page iv of v
6.1.1 HTTPS Server certificate .......................................................................................................20
6.2 Firmware Update ..............................................................................................................................20
6.3 Admin Access (Portal Version Only) ................................................................................................21
7 BUILDING ...........................................................................................................................................22
7.1 Platforms ..........................................................................................................................................22
7.2 Dependencies...................................................................................................................................22
7.2.1 Toolchain for BBB and RPi 3 .................................................................................................22
7.3 User Privilege ...................................................................................................................................22
7.4 Location ............................................................................................................................................22
7.5 Procedure .........................................................................................................................................23
REFERENCES ...........................................................................................................................................25
Table of Tables
Table 2-1: Upstart Settings .......................................................................................................................... 3
Table 2-2: BBB Wi-Fi Cape Settings ........................................................................................................... 4
Table 3-1: System Settings ......................................................................................................................... 5
Table 3-2: Z-Ware Portal Daemon Settings ................................................................................................ 6
Table 3-3: Z-Ware Web Settings ................................................................................................................. 7
Table 3-4: HTTP Server Settings ................................................................................................................ 7
Table 3-5: Email Settings ............................................................................................................................ 8
Table 3-6: LDAP Settings ............................................................................................................................ 8
Table 3-7: OAuth2 Clients Settings ............................................................................................................. 9
Table 3-8: IFTTT Settings ............................................................................................................................ 9
Table 3-9: Operating System Common CA Certificate Settings ................................................................. 9
Table 3-10: SSL Settings ........................................................................................................................... 10
Table 3-11: SSL file locations .................................................................................................................... 11
Table 3-12: Security Scene Notification Email Settings ............................................................................ 13
Table 3-13: Security Scene Notification SMS Settings ............................................................................. 13
Table 3-14: Scene SMTP Settings ............................................................................................................ 13
Table 2-1: Upstart Settings .......................................................................................................................... 3
Table 2-2: BBB Wi-Fi Cape Settings ........................................................................................................... 4
Table 3-1: System Settings ......................................................................................................................... 5
Table 3-2: Z-Ware Portal Daemon Settings ................................................................................................ 6
Table 3-3: Z-Ware Web Settings ................................................................................................................. 7
Table 3-4: HTTP Server Settings ................................................................................................................ 7
Table 3-5: Email Settings ............................................................................................................................ 8
Table 3-6: LDAP Settings ............................................................................................................................ 8
Table 3-7: OAuth2 Clients Settings ............................................................................................................. 9
Table 3-8: IFTTT Settings ............................................................................................................................ 9
Table 3-9: Operating System Common CA Certificate Settings ................................................................. 9
Table 3-10: SSL Settings ........................................................................................................................... 10
Table 3-11: SSL file locations .................................................................................................................... 11
Table 3-12: Security Scene Notification Email Settings ............................................................................ 13
Table 3-13: Security Scene Notification SMS Settings ............................................................................. 13
Table 3-14: Scene SMTP Settings ............................................................................................................ 13
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page v of v
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page 1 of 25

1 INTRODUCTION

1.1 Purpose

Z-Ware Web Server (see [1]) can be built on a Linux PC for 3 targets:
Portal on Linux PC  CE (Consumer Electronics) on Linux PC  CE on BBB (Texas Instrument’s BeagleBone Black board, See https://beagleboard.org/black)  CE on RPi3 (Raspberry Pi 3 Model B board, See
https://www.raspberrypi.org/products/raspberry-pi-3-model-b/)
The document covers the Installation, Configuration, Administration and Building of Z-Ware Web Server for these targets.

1.2 Audience and prerequisites

Silicon Labs Z-Wave Partners who are
familiar with ZIPGW (Z-Wave over Internet Protocol Gateway)  have read the Z-Ware Web User Guide  familiar with Linux Administration
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page 2 of 25

2 INSTALLATION

2.1 Deployment systems

The software is tested for Ubuntu Desktop/Server 14.04 & 16.04 LTS 32 & 64-bit. The CE version is also tested on BBB and RPi3.
Z-Ware CE BBB version is tested with the following Platform image:
http://debian.beagleboard.org/images/bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb.img.xz
Z-Ware CE RPi 3 version is tested with the following Platform image:
http://vx2-downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-04-10/2017-04-10­raspbian-jessie-lite.zip
The CE version of the ARM binary installation package created for BBB can be installed directly to RPi3. During BBB or RPi3 installation, the installation configuration will automatically handle the differences between BeagleBone Debian and Raspbian OS. The below procedure targeting BBB would also applicable for RPi3.

2.2 Runtime package dependencies

The following is the list of required dependency packages in addition to the ones that get installed by default as part of the OS distribution.
gettext  ia32-libs (applicable only for 64-bit OS and needed only when 32-bit version of this software is
required to run in 64-bit OS)
sendmail-bin (needed only when SMTP Server is not used)  rsyslogd (needed only when logging via syslog is used)  sendmail-bin (needed only when SMTP Server is not used)  binutils (needed only for LTS Server version)

2.3 User privilege

The deployment user should not be ‘root’ but must have super user privileges via sudo.

2.4 Selection of deployment directory

The absolute path name of the deployment directory must not contain white spaces.

2.5 Installation (Deployment) procedure

1) If this software is already installed and one or more services running, stop those services. Refer Service Managementsection to find instructions on shutting down the services.
2) Change directory to the path where the installer is placed
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page 3 of 25
Z-Ware Service
Option
Default
zware-http
Y/N N zware-ldap (Portal version only)
Y/N
N
cd /home/<user>/installer/
3) Extract the contents of the installer. Use one of the following commands depending on the OS type – 64 bit or 32 bit.
tar -zxvf zwareportal-x86_64.tar.gz # (64-bit) tar -zxvf zwareportal-i386.tar.gz # (32-bit) tar -zxvf zwarelocal-x86_64.tar.gz # (64-bit) tar -zxvf zwarelocal-i386.tar.gz # (32-bit) tar -zxvf zwarelocal-beaglebone.tar.gz # (32-bit)
4) For PC portal or local installation, start installation by specifying the deployment path
cd zwareportal-x86_64 # OR cd zwareportal-i386 ./install.sh /home/<user>/zwareportal/
OR
cd zwarelocal-x86_64 # OR cd zwarelocal-i386 ./install.sh /home/<user>/zwarelocal/
On a fresh BBB OS, run the following command and Z-Ware will auto configure BBB OS network and the ZIPGW config file
cd zwarelocal-beaglebone/ ./install.sh --configure-beaglebone /home/<user>/zwarelocal/
For re-installation of Z-Ware on BBB, or if BBB OS network configuration and the ZIPGW config file modification are not desired, run the following command
cd zwarelocal-beaglebone/ ./install.sh /home/<user>/zwarelocal/
‘sudo’ password for the user shall be prompted. System configurations shall be prompted, if there were no previous configurations or if there
were additional set of configurations after an update of this software. Refer System Configurationsection for details of various configuration options.

2.6 Install time only Configurations

These settings are only available during installation.

2.6.1 Upstart Settings

This determines whether various Z-Ware services should be added to system ‘upstart’ service manager.
CONFIDENTIAL
Table 2-1: Upstart Settings
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page 4 of 25
zware-memcached (Portal version only)
Y/N N zware-portal
Y/N
N
Setting
Option
Default
Network Router Wi-Fi 2.4GHz SSID
<string>
none
Network Router Wi-Fi 2.4GHz Password
<string>
none
Network Wi-Fi ISO/IEC alpha2 Country Code
<string>
US
For more information, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

2.6.2 Autostart Setting

This determines if Z-Ware is auto-started on system boot. Setting: Enable this package to be auto started after system boot up?
Option: Y/N Default: Y for BBB, N for PC platform

2.6.3 BBB Wi-Fi Cape Setting (BBB version Only)

If BBB Wi-Fi Cape is installed, Z-Ware can auto configure the Wi-Fi connection.
Table 2-2: BBB Wi-Fi Cape Settings
Please note that Z-Ware will not store the Wi-Fi SSID and password information. These are for one-time setup purpose. If the Wi-Fi SSID and/or password changes, the installation needs to be re-run with the new SSID and/or password information to re-configure Wi-Fi setting.

2.7 Software License

The license applicable for the software is placed at the following location. Licenses applicable to external (third-party) software are pointed to from this file.
<install-path>/LICENSE Here, <install-path> is the deployment directory in deployment machine which is usually
/home/<user>/zwareportal/ or, /home/<user>/zwarelocal/ or /home/<user>/zwarebeaglebone/ .
CONFIDENTIAL
INS12905-11 Z-Ware Web Server Installation Guide 2018-03-05
silabs.com | Building a more connected world.
Page 5 of 25
Setting
Option
Default
Hostname
<string>
zware-portal.com
Services to restart: httpd
Hostname is the network label that identifies the deployment machine. Usually, this is set to the name with which the web service shall be hosted. If not already set, a FQDN hostname is suggested.

3 SYSTEM CONFIGURATION

System configuration is performed as part of installation (See 2). If a change in system configuration is required in an existing installation, perform the following steps.
1) Change to deployment directory in the deployment machine.
cd /home/<user>/zwareportal/
2) Get system configuration from user
./config/config-config.sh
The texts shown between square brackets [ ] indicate current configuration values. Pressing just the 'Enter/Return' key at the prompt retains the current configuration value.
The texts shown between less-than and greater-than symbols < > indicate comments. The texts separated by pipe symbol | indicate the valid set of values for a given configuration
item. If the options are given as (y|n), the character ‘y’ indicates ‘yes’ and the character ‘n’ indicates ‘no’.
3) Stop selected or all services depending on the set of configuration parameters being changed. Refer ‘Service Management’ section to find instructions on shutting down the services.
4) Apply the system configuration in various configuration files
./config/configure.sh
5) Start the stopped services. Refer ‘Service Management’ section to find instructions on starting the services.

3.1 Configuration Description

The following is the description of various configuration settings.
For each of these settings, a list of services is listed against ‘Services to restart’. For the changes in a
given set of configuration settings to take effect, the corresponding set of these services must be stopped before running “configure.sh” script and started again then after. Refer ‘Service Management’ section to find instructions on stopping and starting services.

3.1.1 System Settings

Table 3-1: System Settings
CONFIDENTIAL
Loading...
+ 21 hidden pages