User Login      + Register  

How To Home Assistant  SecureOffice  xoops  29-Nov-2020 17:20  0  5096 reads


1      Introduction

1.1                What is Home Assistant?

1.2                Is Home Assistant For You?

1.3                Home Assistant Features

1.4                Hassio Versus Standalone Home Assistant

1.5                Further Reading

2      Home Assistant With SecureOffice

2.1                Scope Of Documentation

3      HA Installation Options

3.1                Use Home Assistant Docker Image

3.1.1      Docker-Hassio Pre-Requisites

3.1.2      Install Docker-Hassio

3.1.3      Docker-Hassio Configuration

3.2                Use Home Assistant Virtual Machine

3.2.1      Install SecureOffice VmWare Workstation

3.3                Use Home Assistant Server On LAN

List of Figures

Figure 1:       HA Initial Registration Page

List of Tables

Table 1:       Hassio Versus Standalone

1      Introduction

1.1                What is Home Assistant?

Home Assistant (HA) is the most popular home automation platform by a very wide margin. It supports integration with a vast array of third party IOT (Internet of Things), security, sensor and control devices. HA supports various device control protocols such as MQTT (TCP, WiFi, Ethernet) , Zigbee (WiFi - 2.4GHz, interface required), Z-Wave (ISM band - 800Mhz, interface required) and X10 (powerline, ISM band, interface required).

HA also supports various voice control frontends such as Amazon Alexa, Apple Siri and Google Home Assistant which allow voice commands such as "dim lights", "lock doors", "call mom", etc. These cloud services have serious privacy issues, as reported for Amazon Alexa here and here. All third-party voice control cloud services must, for operation and AI (Artificial Intelligence) learning collect and store such information. It comes down to trust of your cloud provider.

Imagine that your spouse, during a nasty divorce legally demands history and recordings from the cloud provider and misrepresents recorded heated arguments as proof of your "abusive nature". The provider, by law, despite their alleged "privacy policies" is obligated to comply. You will be toast, since the "law" thrives on the illusion of compensating manufactured victims of "abuse" while ignoring real abuse by entrenched powers. Can it really be "free speech" to be sanctioned for stating an opinion, no matter how emotionally loaded? You have been warned. Proceed with cloud based voice control (or services in general) at your own risk. It is best to keep your affairs private.

The surveillance state is at war with all of us and, the first rule of war is "know your enemy". They know this and you should know: "don't let them". It is left as an exercise for the reader to use online HowTo's to integrate HA with cloud services should this risk be considered acceptable.

Alternative local (no cloud) voice control options do exist, but they require technical skills and are far more basic than cloud services. Options are Almond, Rhasspy and conversation integration. The home assistant community is working very hard to perfect local voice control which is not yet ready for general usage. Online HowTo's exist for these voice control options.

HA is locally hosted and does not depend on or share information with external cloud services (unless you choose). This avoids issues such as cloud service providers knowing far too much about you, eavesdropping on you, latency (takes time to interact with cloud services) and reliability issues when the internet or service is down.

1.2                Is Home Assistant For You?

HA is a frontend, a central point to control all your home automation devices. It is useless without something to control.

Home Assistant is for "tinkerers", users willing and able to dig into the details of devices to control and define simple configuration files. Luckily, odds are, whatever the feature, device or function, somebody in the Home Assistant community has already done it and published HowTo's on the internet.

It is suggested, prior to installing HA that internet searches be performed: "Home Assistant review", "Home Assistant <what you want to do / control>".

If you are seeking simple solutions with zero effort / learning, Home Assistant and perhaps home automation in general is not for you. Either choose a simple commercial home automation gateway / hub or hire a home automation consultant to do it for you. Search "home automation gateway" on the internet, read reviews and choose what is right for you. The selection criteria in subsequent sections may assist in the selection process.

Here's a useful introduction to home automation video using SamSung SmartThings and Google Home Assistant. This combination is a very popular choice. Note the explanation of "how it works" and how much information is shared to the cloud, such as everything you say. If you have no issues with the reliability, security, privacy and latency issues of cloud-based services, perhaps choose this approach. If you have "issues" with the dystopian, Orwellian "big sister" future that the (in)security state and technology trends is taking us to, read on.

1.3                Home Assistant Features

  • It is recommended to use the docker (Hassio) version of Home-Assistant (SecureOffice premium package - docker-hassio) for ease of maintenance, adding HA addons and updates. This is Home Assistant Supervised.
  • HA is also available as an Ubuntu virtual machine, running on SecureOffice, or an external server on your LAN such as Raspberry PI.
  • Custom features / integrations (addons, to support extra functions, protocols) can be easily added.
  • HA can turn on / off / dim, receive status (binary or value such as temperature, power consumption) / alarm from any device with corresponding functions.
  • Chains of actions (turn on lights, play song, record IP camera, etc - scenes) can be created in response to events (remote button push, door opened, camera motion detect, etc).
  • Addons exist for popular devices with custom protocols such as Sonoff (inexpensive, market leader). A user-maintained list of Home Assistant compatible devices providing requirements, protocol, interface and special notes for each device is available.
  • Able to control / monitor any home automation device using many protocols. Caveat: obscure devices may require searching for user submitted integrations.
  • Alarms (sensor, motion, etc) can be sent via email, SMS (via SMS gateway) using various notification addons.
  • Supports GPS tracking of phones, devices.
  • Private local / public remote access using domain, strong passwords and 2 factor authentications. General instructions here and within this document. Access from any browser on any device (PC, tablet, phone).
  • Private remote access using VPN. Access from any browser on any device (PC, tablet, phone). Instructions within this document.
  • Private remote access using Home Assistant Cloud (paid, subscription service, also has privacy concerns). Access from any browser on any device (PC, tablet, phone).
  • Integrates with Amazon Alexa, Apple Siri and Google Assistant which allow voice commands such as "dim lights", "lock doors", "call mom", etc. Caveat: leaks information to cloud. HA is also able to do limited voice control (geeks only), without cloud access.
  • Integrates with ZoneMinder (IP camera security monitoring system). SecureOffice also provides ZoneMinder.
  • Very large development / user community making contributions.
  • Extensive documentation and user support options.

1.4                Hassio Versus Standalone Home Assistant

Home Assistant comes in two basic flavors, Hassio and standalone, compared in the table below.

Standalone is Home Assistant (not supervised) running on an external system or virtual machine.

Hassio is available for SecureOffice as a docker container (docker-hassio). This is a premium package.

Other Hassio options that can integrate with SecureOffice are dedicated LAN server using an external system such as Raspberry PI3+, a virtual machine on the LAN or hosted by SecureOffice. Be aware that Raspberry PI has serious SD card reliability issues resulting in instability. If intending to use a single board computer as a HA server, reliable storage such as eMMC or external hard disk / SSD is a must.

The main differences between standalone and Hassio are how they are implemented, ease of adding extra functionality (integrations) and. integrations available.





Runs under SecureOffice

Yes, package docker-hassio



Easy, suitable for novices.



Standalone, geeks only

Ease of adding functionality (integrations)

Very, limited to what Hassio provides which is suitable for most users.

Not. Requires manually installing extra packages on external server hosting.

More complex to create extra integrations for Hassio, much richer set of HowTo's for Standalone.

Number of Integrations available.

Limited to what Hassio provides which is suitable for most users.

Huge. Many user contributed HowTo's.



Group of supervised docker containers each providing some functionality, like musicians in an orchestra.

Native program and addons, runs directly on external host system.


Ease of upgrade

Very. Select upgrade in UI

Backup config, install new version, restore config.



User forums, HowTo's

User forums, HowTo's

Both are standard implementations, once deployed, all corresponding HowTo's apply.

Table 1: Hassio Versus Standalone

Hassio is a HA distribution intended for installation on Raspberry PI or other Linux systems (virtual machines included) using supervised docker containers. When searching for HA HowTo's, be aware that standalone HA is not Hassio.

Hassio and integration installation / configuration instructions are not identical to standalone HA which may require installing extra packages. An overview of Hassio is located here.

The differences between Hassio and standalone HA installation are outlined here.

For SecureOffice, package docker-hassio (supervised docker containers) is recommended and is the only Home Assistant version that subsequent documentation refers to. Users wishing to use other Home Assistant distributions are on their own using online HowTo's.

1.5                Further Reading

There is a huge amount of reference material on the internet regarding Home Assistant. Rather than repeat, a few pertinent links are provided below.

Since internet links go stale with time, use these search terms: "Home Assistant <what you want to do>", "Home Assistant overview", "Home Assistant <device you are interested in>".

Overview of Home Automation Protocols

Another Protocol Overview

Home Assistant compatible devices

WiFi, ZigBee, Z-Wave Differences

IEEE - Zigbee Versus Z-Wave

Video - Z-Wave versus Zigbee

Zigbee (Wikipedia)

Z-Wave (Wikipedia)

Zigbee And WiFi Co-existence / Interference

2      Home Assistant With SecureOffice

2.1                Scope Of Documentation

Various methods of installing Home Assistant, including links to various HowTo's are provided. This documentation goes as far as getting basic HA running and configuring Sonoff, Zigbee and / or Z-Wave interface device support, setting up a few Zigbee and Z-Wave devices, plus remote access methods. Once basic device control / status support is in place, it is up to users to determine how to use Home-Assistant to create simple automations to link device events (example: hass custom burglar alarm) to actions (send text message intruder alarm or chain of actions - scenes).

Integration of devices using other protocols such as X10 is possible (research HowTo's), just not covered by this document.

There is a vast array of HowTo's and information regarding Home Assistant, home automation, Zigbee and Z-Wave on the internet and so much flexibility that covering it all here is pointless and redundant.

Since this is a standard Home Assistant Supervised (hassio) installation, there is no reason that it cannot be configured any way you choose (ignoring these instructions / recommendations) using online HowTo's. This documentation recommends what is, IMHO, best practice.

3      HA Installation Options

For all Home Assistant installation methods, if intending to use Zigbee and / or Z-Wave devices, an interface device or hub is required. See Home Assistant Interfaces for options.

After installing Home Assistant by any of the following methods, navigate to <Home Assistant LAN Address>:8123 to see the Home Assistant initial registration page as shown below:

Note: For all HA installation methods except docker-hassio, the registration page will not include the OpenWrt menu system or the HomeAssistant tab. Only Home Assistant content will be displayed.

Figure 1: HA Initial Registration Page

3.1                Use Home Assistant Docker Image

SecureOffice provides the "docker-hassio" (premium content) package for Home Assistant Supervised. This is the recommended method since it is tightly integrated with SecureOffice and OpenWrt GUI, with minimal manual setup required.

It is recommended to review the SecureOffice docker documentation to understand how docker containers are integrated with SecureOffice.

3.1.1      Docker-Hassio Pre-Requisites

Hassio (Home Assistant) and its docker dependencies are premium packages, requiring a subscription to the SecureOffice premium package repository for installation.

During installation, docker-hassio automatically adapts to your network configuration. This includes hassio and Nginx (for GUI) configuration. The following network configuration must be complete prior to installing docker-hassio, otherwise, docker-hassio and Nginx configuration must be altered (expert skills) to accommodate:

The hassio docker image requires database support. The image, by default (no configuration) internally uses SQLite, which has very poor performance. The default SecureOffice configuration of hassio uses the postgresql database, which is automatically installed and configured as a dependency of docker-hassio.

3.1.2      Install Docker-Hassio

If other docker containers are running, stop them by entering "/etc/init.d/docker stop" at a command prompt.

To install Hassio, at a command prompt, enter:"opkg update; opkg install docker-hassio".

After installation is complete, edit the docker-hassio configuration file: "/etc/config/docker/hassio", change the following values:

  • Set "option enable '1'" to enable container startup
  • Set "option log_stderr '0'" to '1' to see hassio error messages in the system log. Set it back to '0' once hassio is up and running.
  • Set "option log_stdout '0'" to '1' to see hassio error messages in the system log. Set it back to '0' once hassio is up and running.
  • Save the file.

Start hassio by entering commands:"/etc/init.d/dockerd enable; /etc/init.d/dockerd restart; /etc/init.d/docker enable; /etc/init.d/docker/start"

It can take up to 20 minutes for docker to download and configure Home Assistant / hassio.

Assuming the log_std* configuration values were set to '1', progress can be monitored by entering "logread -f | grep docker" at a command prompt.

If you see "Wait until Home Assistant is ready" with no "Error" messages following and output stops, Home Assistant is up and running. Enter CTRL+c (together) to exit logread.

Any errors preventing Home Assistant startup must be fixed prior to proceeding. Google is your friend.

At this point, Home Assistant can be accessed from your local LAN at addresses: "http://<SecureOffice LAN address>:8123" or "http(s)://hassio.<your domain>" or from the OpenWrt menu at "Services->HomeAssistant". Using a browser from a PC on your LAN, enter one of the previous addresses. Until Home Assistant is up and running, "Page not found" errors will occur. Keep trying (reload page). After a long wait (for initial Home Assistant download / install) you should see the Home Assistant login page (Figure 1).

3.1.3      Docker-Hassio Configuration

Once installed, docker-hassio is configured like any other Home Assistant installation. Proceed to Home Assistant Configuration.

3.2                Use Home Assistant Virtual Machine

The virtual machine can be hosted by SecureOffice in which case, the premium Vmware Workstation package is required. Alternatively, the virtual machine can be hosted by another PC on your LAN.

Create a Home Assistant (hassio) virtual machine on a PC by following Create_Hassio_Virtual_Machine instructions.

This VM is must be assigned a fixed IP address (conforming to IP address numbering plan) and LAN DNS name for port forwarding (if necessary) and / or proxying by the SecureOffice Nginx webserver.

Follow instructions in Share Host PC Folders With VM sections.

Do not proceed until you can access the Home Assistant initial registration page (like contents of Figure 1, without OpenWrt GUI) at "<Virtual Machine LAN Address>: 8123".

Shutdown the Home Assistant VM. If the Home Assistant VM is to he hosted by another PC (not SecureOffice), copy the VM to the final target PC, if different than the PC the VM was created on. Ensure that the VM works on the target PC and the HA registration page is accessible at <Virtual Machine LAN Address>: 8123. Proceed to Home Assistant Configuration.

If the Home Assistant VM is to be hosted by SecureOffice, proceed to the next section.

3.2.1      Install SecureOffice VmWare Workstation

Omit this step if Home Asssistant (virtual or real machine) is hosted on another (non SecureOffice) PC on your LAN.

Once the Home Assistant virtual machine has been created, it can be copied over to SecureOffice and the SecureOffice / VmWare Workstation application installed by following the instructions starting at Create VM Directory on SecureOffice.

Do not proceed until you can access the Home Assistant initial registration page (like Figure 1) at "<Virtual Machine LAN Address>: 8123".

Proceed to Home Assistant Configuration.

3.3                Use Home Assistant Server On LAN

A dedicated or shared server on the LAN can be used to provide Home Assistant services. Internet research to determine hardware, OS and installation methods, for example Raspberry PI (which has issues with SD card reliability and performance). Officially supported platforms for installing Home Assistant Supervised (hassio) are available at GitHub.

Do not proceed until you can access the Home Assistant initial registration page (like Figure 1) at <Home Assistant LAN address>: 8123.

Proceed to Home Assistant Configuration.

Rating 0/5
Rating: 0/5 (0 votes)
Votes are disable!
Print article
The comments are owned by the author. We aren't responsible for their content.

Technologies Used:

Design by: XOOPS UI/UX Team