Table_of_Contents
1.2 Is Home Assistant For You?
1.4 Hassio Versus Standalone Home Assistant
1.5 Further Reading
2 Home Assistant With SecureOffice
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
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.
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.
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.
Feature | Hassio | Standalone | Notes |
Runs under SecureOffice | Yes, package docker-hassio | No |
|
Easy, suitable for novices. | Yes | No | 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. |
|
Implementation | 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. |
|
Support | 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.
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
Home Assistant compatible devices
WiFi, ZigBee, Z-Wave Differences
Zigbee And WiFi Co-existence / Interference
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.
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
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.
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.
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:
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).
Once installed, docker-hassio is configured like any other Home Assistant installation. Proceed to Home Assistant Configuration.
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.
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.
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.
|
Technologies Used: