Home Assistant

What is Home Assistant

Home Assistant(HASSï¼?is an open source smart home system, which more focus on local control. Unlike Alexa or Google Assistant,to enable the remote control feature, you need pay monthly subcription.

By integrating various components, Home Assistant can connect various external devices or services(Smart devices, cameras, emails, short messages, Cloud services, etc,there are nearly a thousand mature components),These external devices are linked manually or automatically,build your own smart home system with high flexibility.

Home Assistant needs to be installed on Linux operating system,System supports automation(Automation) ã€Grouping(Group)、UI customization(Theme) And so on highly customized settings.It is also possible with the corresponding components,with Amazon Alexa,  Google Assistant, Apple HomeKit,and other platforms to realize docking.

In actual use of HASS,there will be a lot of installation and debugging work,users are required to have certain IT background knowledge,not suitable for ordinary home users.The biggest advantage of this system is the quick response of local control,protect data privacy,it can be customized,community-supported components are also abundant,For missing components, users with coding ability can even develop their own.

Home Assistant Core

Home Assistant Core is the underlying engine of Home Assistant.The basic functions of Home Assistant are all realized by it.Home Assistant Core is composed of four parts: Event Bus, State Machine, Service Registry and Timer.

Event Bus

Event Bus is the core of Home Core,is that core of the whole Home Assistant.  Evnet Bus is responsible for managing each Event,handle data transmission between Event.

For example, when it is very hot today, we want to turn on the air conditioner. We can set a high temperature message when the thermometer temperature exceeds a certain temperature. (Firing events),And we don’t need to know the temperature,Check whether the thermometer sends out high temperature information(Listening to events),you can decide whether to turn on the air conditioner or not.

State Machine

State Machine responsible for monitoring,When a device changes state,will send one state_changed event�/p>

Service Registry

Be responsible for monitoring whether Event Bus has the Event of call_service,and allow other programs to register the Service.

Timer

Timer will send a time_changed Event to the Event Bus every second,let Event Bus know that a second has passed. For example, when we have a device that needs to check its status every minute,we can set the scan_interval of Home Assistantï¼?0 let to Home Assistant Ask about the status every 60 seconds,Timer is responsible for the role of timer here.

Home Assistant Supervisor

Home Assistant Core has no system security,system management functions such as permissions and updates,Therefore, in actual use, we usually install  Home Assistant Supervisor。Supervisor is built on the basis of Core and can effectively manage the system.

Original description on GitHub:
The Supervisor is responsible for managing your system so that you can manage your home. It’s the beating heart of the Home Assistant Operating System and it ensures that your system stays secure and up to date. When things do go wrong, the Supervisor is there to help you recover the system.

Installation

After understanding the basic architecture of HASS, it’s time to talk about how to install it. There are four installation methods provided by the government,Two methods are recommended:Home Assistant Operating System(Operating system image installation)and Home Assistant Container(Docker installï¼?Both of them are packaged and installed,simple installation. For some users with special requirements,there is provided Home Assistant Supervised(Manual installationï¼?and Home Assistant Core(Python virtual environment installation )two ways,it can be simply understood as customized installation.

Insallation Methods

Home Assistant Operating System – Minimal Operating System optimized to power Home Assistant. It comes with Supervisor to manage Home Assistant Core and pre-installed add-ons. Recommended installation method.

Home Assistant Container – Standalone container-based installation of Home Assistant Core (e.g. Docker).

Home Assistant Supervised – Manual installation of the Supervisor.

Home Assistant Core – Manual installation using Python virtual environment.

The diffferences

The differences between the four different installation methods can be understood through the following figure:

According to hosts with different architectures,Users need to install systems corresponding to their types,examples are provided in official website:ODROID, Raspberry Pi, Intel NUC and so on installation tutorials of several mainstream hardware platforms.If you want to use the finished product directly,A customized product called Home Assistant Blue is also available on official website,It comes pre-installed with the Home Assistant Operating System,users only need to plug in the power supply to use it directly.

Installation steps:

https://www.home-assistant.io/installation/

https://www.home-assistant.io/getting-started/onboarding

https://www.home-assistant.io/getting-started/automation/

https://www.home-assistant.io/getting-started/presence-detection/

https://www.home-assistant.io/getting-started/configuration/

Features

User Interface

Lovelace is a highly customizable card Dashboard,There are 29 cards with different functions to choose from,each card can be linked with integration to display real-time information, status and function buttons.In addition, users can customize the Theme of a page or card to create your own interface style.After lovelace is configured, you can see the running status of the devices in your home at a glance every time you open the interface.

The Online Demo

Card namefunction
Alarm PanelEnter Alarm Code to arm/disarm security system in conjunction with Alarm type integrations.
ButtonCustom button to realize one-click operation of Action
CalendarCalendar can be integration with Google calendar or Time & Date to display calendar items
ConditionalThe Conditional card displays another card based on entity states.
EntitiesA list showing various Entities, which can include the current status of Entity and function buttons, etc.
EntityThe Entity card gives you a quick overview of your entity’s state.
Entity FilterFilter Entity according to certain conditions, which is convenient for tracing the equipment in a specific state, such as listing the lights on.
Gauge 
Glance 
Grid 
History Graph 
Horizontal Stack 
Humidifier 
Light 
Logbook 
Map 
Markdown 
Media Control 
Picture 
Picture Elements 
Picture Entity 
Picture Glance 
Plant Status 
Sensor 
Shopping List 
Thermostat 
Vertical StackThe Vertical Stack card allows you to group multiple cards so they always sit in the same column.
Weather ForecastTo display weather information, there are many weather forecast service providers to choose from.
WebpageEmbedding other web pages with iframe

Automations

Automation is an important function of Home Assistant,Its operation principle can be summarized as trigger-> condition-> action, Where the condition is optional,Users define their own automation scenarios in this way.The following is an example listed on the official website.

Example to explain how automation works

Integrations

Home Assistant community provides a large number of different kinds of integrated components, and users can install and configure components corresponding to hardware devices or services according to their actual situation.For example:if you want to manage Philips Hue Light in Home Assistant,You need to install Philips Hue’s integrated components first.

Detailed installation instructions are generally provided on the component page, and the properties of the component are listed in the sidebar: IoT grade,Component rating,Original version and source code on GitHub.

Remote Access

While Home Assistant is a system focused on local control,through some technical means,for example using Dynamic DNS to map the Home Assistant server to an external network address,or subscribe to the Home Assistant Cloud, you can still control the Home Assistant remotely.

https://www.home-assistant.io/docs/configuration/remote/

https://www.nabucasa.com/

Resource

https://en.wikipedia.org/wiki/Home_Assistant

Code

https://github.com/home-assistant/

Blog

https://www.home-assistant.io/blog/

Official Website

https://www.home-assistant.io/

Cookbook

https://www.home-assistant.io/cookbook/

Developer

https://developers.home-assistant.io

Release History

https://www.home-assistant.io/blog/categories/release-notes/

YouTube Cannel

https://www.youtube.com/channel/UCbX3YkedQunLt7EQAdVxh7w

FaceBook

https://www.facebook.com/homeassistantio/

hass Core configuration file – configuration.yaml

The configuration file determines which components hass loads and how these components should run-similar to the construction of nervous system controlled by genes.

  • For example, the configuration information of the camera.mjpeg component contains which address camera should be connected to capture the video stream.
  • The sensor.yr component contains the weather forecast of which place and which time should be obtained.
  • For example, the configuration information of the http component includes information such as the open port number and access password.
  • The configuration information of automation components contains logical rules on how to link.

Name explanation

Hass – just a short from HomeAssistant

Home Assistant (Hass.IO 595 before naming refactor) is basically just a Docker 131 version of HomeAssistant with Portainer-like hypervisor tailored to work with Hass. It adds some new UI options in Home Assistant Core and allows you to: Install AddOns (More on them later), Update your Hass with one click and some other useful things like configuration folder backups.

HomeAssistant Supervised – and alias name of HomeAssistant when it’s necessary to make a clear distinction between HomeAssistant (ex Hass.io 39) and HomeAssistant Core.

HassOS is a minimal Linux appliance distribution that has ‘just enoughâ€?to run HomeAssistant. User has very minimal control over the host system, and it does not have a lot of things you’d expect in a general purpose distro, for example it does not even have a package manager, afaik. So basically if you wanted to do anything ‘out of the boxâ€?with Hass then you better use some other installation method that using HassOS. It is the easiest to start with, though!

Hassbian is a legacy was or running Hass, it is a Raspbian OS (native OS for Raspberry Pi) with HomeAssistant preinstalled in a Python VirtualEnv. It has scripts which allow you to update it, to install additional software like ZWave support, and things like that. At this point it’s no longer maintained or supported.