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.
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.
Card name | function |
Alarm Panel | Enter Alarm Code to arm/disarm security system in conjunction with Alarm type integrations. |
Button | Custom button to realize one-click operation of Action |
Calendar | Calendar can be integration with Google calendar or Time & Date to display calendar items |
Conditional | The Conditional card displays another card based on entity states. |
Entities | A list showing various Entities, which can include the current status of Entity and function buttons, etc. |
Entity | The Entity card gives you a quick overview of your entityâs state. |
Entity Filter | Filter 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 Stack | The Vertical Stack card allows you to group multiple cards so they always sit in the same column. |
Weather Forecast | To display weather information, there are many weather forecast service providers to choose from. |
Webpage | Embedding 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.
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/
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
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.