deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib
ctrl+x 输入y 回车
然后打开浏览器中输入树莓派IP地址:http://ip:9000
选择本地Docker socket to manage a local Docker engine
(not available for Windows Containers (Windows Server 2016))
7.5安装armhf-homeassistant镜像
homeassistant:
# Name of the location where Home Assistant is running
# 智能家居系统的名字,显示在主界面顶部。
name: 智能家庭
# Location required to calculate the time the sun rises and sets
# 下面填入纬度和经度,计算太阳升起和设定时间所需位置,越精确越好。
latitude: 36.8522520715
longitude: 你的纬度
#谷歌地图:36.8522549045,你的纬度
#百度地图:36.8579226871,你的纬度
#腾讯高德:36.8522520715,你的纬度
#图吧地图:36.8429499815,你的纬度
#谷歌地球:36.8518599815,你的纬度
#Hassio官方地图使用了[url=https://www.openstreetmap.org/]https://www.openstreetmap.org/[/url],可以去这个地址搜索 然后右键去调整你的Home位置
# Impacts weather/sunrise data (altitude above sea level in meters)
# 海拔高度用于修正天气参数和日出日落时间参数 (默认单位是:米)。
elevation: 31
# metric for Metric, imperial for Imperial
# 度量衡单位制式(metric)是公制,(imperial)是英制。
unit_system: metric
# Pick yours from here: [url=http://en.wikipedia.org/wiki/List_of_tz_database_time_zones]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url]
# 时区,从这里选择你的:[url=http://en.wikipedia.org/wiki/List_of_tz_database_time_zones]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url],默认北京时间。
time_zone: Asia/Shanghai
customize: !include customize.yaml
# Show links to resources in log and frontend
# 在网页界面的首页显示简介 (那一大段英文)不想看到的话,请在前面加上#号。
# introduction:
# Enables the frontend
# 是否使用默认的“首页”
# 测试任何您更改的配置文件,在命令行中用hass --script check_config。这个脚本可以让你测试的变化而不需要重新启动家庭助理。
# Enables the frontend
frontend:
# Enables configuration UI
# 自定义配置UI
config:
http:
# Uncomment this to add a password (recommended!)
# 给系统网页的登录加上一个密码,先去掉下面这行的#号,然后把PASSWORD改成你想要的密码。
# api_password:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# [url=https://home-assistant.io/blog/2016/10/25/explaining-the-updater/]https://home-assistant.io/blog/2016/10/25/explaining-the-updater/[/url]
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# 升级提示,当 HomeAssitant 有新版本发布的时候,“日出日落”图标会变成(Updater)字样
# include_used_components: true
panel_iframe:
#添加HA侧边面板
designicons:
title: 'Design Icon'
icon: mdi:vector-square
url: 'https://cdn.materialdesignicons.com/2.0.46/'
router:
title: 'Mi Router'
icon: mdi:router-wireless
url: 'http://192.168.31.1'
bridge:
title: 'HomeBridge'
icon: mdi:steam
url: 'http://192.168.31.243:8766'
docker:
title: 'Docker'
icon: mdi:console
url: 'http://192.168.31.243:9000'
recorder:
purge_interval: 2
#每两天执行一次清理,重启会重置
purge_keep_days: 5
#历史数据保存的天数
db_url: mysql://hass:hassio@core-mariadb/homeassistant
# Discover some devices automatically
# 系统自动发现新的设备
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
# 启动浏览器的语音命令
conversation:
# Enables support for tracking state changes over time
# 在系统数据库中保存“历史数据”
history:
# View all events in a logbook
# 在logbook显示所有事件
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Weather prediction
# sensor:
# - platform: yr
# Text to speech
# 文字转换语音
tts:
- platform: baidu
# language: zh
app_id: 10534910
api_key: 填入你获取到的百度API KEY
secret_key: 填入你获取到的密钥
speed: 5
pitch: 5
volume: 10
person: 0
# Cloud
cloud:
xiaomi_aqara:
discovery_retry: 5
gateways:
- mac: 你的小米网关的MAC地址
key: 你的网关KEY
device_tracker:
- platform: xiaomi
host: 192.168.31.1
username: admin
password: '小米路由器的后台密码'
new_device_defaults:
track_new_devices : false
#If new discovered devices are tracked by default
#跟踪新设备的添加,默认true
hide_if_away: false
interval_seconds : 12
#Seconds between each scan for new devices
#扫描每个设备的间隔
consider_home : 180
#Seconds to wait till marking someone as not home after not being seen.
#This parameter is most useful for households with Apple iOS devices that go into sleep mode while still at home to conserve battery life.
#iPhones will occasionally drop off the network and then re-appear.
#It helps prevent false alarms in presence detection when using IP scanners such as Nmap.
#Accepts various time representations, (E.g. the following all represents 3 minutes:180,0:03,0:03:00)
#在设定秒数之后追踪不到某个设备,设置为不在家
#这个参数对于那些在家时进入睡眠模式的苹果iOS设备非常有用,以节省电池寿命。
#iPhone偶尔会脱离网络,然后重新出现。在使用IP扫描器如Nmap进行检测时有助于防止误报。
#接受各种时间表示(例如,以下代表3分钟:180,0:03,0:03:00)
android_ip_webcam:
host: 网络WEBCAM的IP
port: 8081
switches:
- overlay
#日期时间显示
- gps_active
#激活GPS
- video_recording
#视频录制开关
switch: !include switchs.yaml
group: !include groups.yaml
automation: !include automations.yaml
sensor: !include sensors.yaml
script: !include scripts.yaml