3

Introduction

This tutorial will show you the initial installation and deployment of Home Assistant and Zhiting Home Cloud. Like many open source projects, Home Assistant is a common one. As a foreign open source software, you need to read a large number of English documents and edit them in the editor. Creating your own configuration files, manually adding smart devices, and customizing every detail is a daunting amount of work.

Today, let's introduce the domestic open source software. Zhiting Home Cloud combines the software characteristics of all domestic smart home manufacturers to provide a cross-brand, cross-category and full-ecological open source protocol for unified control and management of various smart devices from different manufacturers ( Apache License, Version 2.0) software, provides plug-in packages of different brands, realizes the access of various smart devices, and is compatible with multiple platforms. You can easily install and manage some functions that need to be deployed in the command line environment.

Next, let's compare the advantages and disadvantages of Home Assistant and Zhiting Home's installation and deployment? Which one is relatively simple and easy to use, take Docker as an example here, and first look at Zhiting's.

1. Install Zhiting Family Cloud

  1. Equipment preparation
  • linux host
  • docker
  • docker-compose
  1. Create a directory as the root directory for SA to run and create a docker-compose.yaml file in that directory.
version: "3.9"

services:
  zt-nginx:
    image: docker.yctc.tech/zt-nginx:3.0 
    ports:
      - 9010:9010
      - 9020:9020
      - 9030:9030
    depends_on:
      - smartassistant
  etcd:
    image: bitnami/etcd:3
    environment:
      - ALLOW_NONE_AUTHENTICATION=yes
      - ETCD_GRPC_KEEPALIVE_TIMEOUT=10s
      - ETCD_GRPC_KEEPALIVE_INTERVAL=10s
    ports:
      - 2379:2379
      - 2380:2380
  fluentd:
    image: fluent/fluentd:v1.13
    ports:
      - "24224:24224"
      - "24224:24224/udp"

  smartassistant:
    image: docker.yctc.tech/smartassistant:1.4.0
    ports:
      - "37965:37965"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - etcd

Enter the following command to start the service:

docker-compose up

3. The environment required to run the script SA

  • awk command
  • openssl
  • root user privileges
     
    4. Execute ./build/install/install.sh

image.png

  1. Fill in the configuration and confirm

image.png

  1. Then the installation is completed successfully

image.png

  1. Check operation

image.png

  1. After the service starts, you can check the status of SA with the following command:

curl http://localhost:37965/api/check

If the following is returned, the service is running and not bound

{"status":0,"reason":"成功","data":{"is_bind":false,"revision":""}}

Second, install Home Assistant

First of all, in the official documentation of homeassistant, four different installation methods are provided:

  • Install the Home Assistant system directly on the hardware device;
  • Install through containers such as Docker;
     
  • Manual installation on traditional Linux distribution machines;

Installing in a Python Virtual Environment If you're using Docker, you'll need at least version 19.03.9, ideally higher, and 2.42 or higher.

image.png

installation steps are as follows:
1. Search for Docker in the package center, and then you can find the corresponding package, just click to install.
image.png

 

  1. Open the Docker suite, search the registry for homeassistant, and select the first download.

image.png

3. Find the image you just downloaded in the mirror, select it and click Start.
image.png

  1. Set a name in the first window and click Advanced settings.

image.png

  1. Check "Enable automatic restart" in advanced settings.
    image.png
  2. Select Add Folder in Volume and make the following settings. Finally click Apply.

image.png

  1. environment, add a variable. Click + to add the variable as TZ and the value as Asia/Shanghai. The time zone is added here. Then click Next.
    image.png
    image.png
     
  2. Click Apply to start the container.
    image.png

9. Finally, you can see the started container in the container.

image.png

10. Select the HomeAssistant container in the container, and then select the above operation to see the restart option. After that, access HomeAssistant in the form of ip+port. ip is the host IP of the NAS, and the port defaults to 8123. You can log in.
image.png
image.png

Summary

In general, there are differences between homeassistant and Zhiting Family to some extent. First, the installation and deployment of homeassistant is more complicated and complicated than that of Zhiting Home Cloud; It can be accessed in the local area network, but cannot be accessed from the external network. In contrast, in addition to using the local area network, the local area network can still run smart devices normally when the network is disconnected. The third aspect is that homeassistant only supports Apple mobile phones. Few smart devices connected to HomeKit can be accessed through Android phones (except domestic Aqara).


已注销
28 声望24 粉丝

引用和评论

0 条评论