create account

在树莓派3B上搭建Hass.io并接入米家和iOS(一) by ety001

View this thread on: hive.blogpeakd.comecency.com
· @ety001 ·
$4.15
在树莓派3B上搭建Hass.io并接入米家和iOS(一)
最近想要在树莓派上折腾下 Home Assistant。

Home Assistant 于 2017年7月26日发布的 Hass.io 集成系统,全可视化安装配置,基于 Docker 和  ResinOS。

Docker 的引入使得 Hass.io 管理功能插件就像你在手机上安装 App 一样简单(事实上 iOS 的底层确实采用了类似机制),再不用通过命令行和代码来管理你的 Home Assistant。同时,通过 Docker 来封装插件,使得插件的稳定性得到了极大提高,用户能够把精力集中在个性化定制 Home Assistant 及自动化上来。

可以预见 Hass.io 是 Home Assistant 的发展方向,如果说它有什么缺点的话,那么也在于它的封闭性上。

## 下载针对树莓派3的 hass.io 镜像

https://github.com/home-assistant/hassio-build/releases/

![](https://steemeditor.com/storage/images/G5b3TG80id57xV2UGde9TLHsk86lflWLBkB7HYIj.png)

## 使用 etcher 写入镜像到 TF 卡

![](https://steemeditor.com/storage/images/1IYlHON1Ps6nYgYm2MAYdfN18NkxN2nFkCZPlUKU.png)

## 配置Wifi

如果树莓派采用 WiFi 连接,在烧录完成后使用文本编译器打开 TF 卡目录下 system-connections/resin-sample 文件,修改填写你的 WiFi 信息:

```
[connection]
id=resin-wifi
type=wifi

[wifi]
hidden=true
mode=infrastructure
ssid=你的 WiFi SSID

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=你的 WiFi 密码
```

## 启动初始化

将 TF 卡插入树莓派中,上电,几分钟后,在浏览器(推荐 Chrome)地址栏输入 http://hassio.local:8123 即可看到如下界面了

![](https://steemeditor.com/storage/images/me4NsNkXIpyiyk31ejnLfkkiWu1UjvCgPUrCpyZQ.png)

由于没有国内的镜像站,所以且等着就好了,需要很久,除非你在路由上开了科学上网。

完成后,大致是这样

![](https://steemeditor.com/storage/images/kAwZf0AZEWiy8hGjEn3TNgCcdpKDADoK9bTm6WNU.png)

## 接下来

在下一篇将会继续安装相关的插件和配置,敬请期待。

---

### 欢迎使用 [SteemEditor](https://steemeditor.com) 来编写文章,[获取 @steemeditor.bot 的大力点赞!](https://steemit.com/cn/@steemeditor.bot/steemeditor)

------

#### 欢迎使用 [SteemTools](https://steem.to0l.cn),微信扫一扫开始使用
![](https://steemeditor.com/storage/images/UhbrH4z4b8EaGpOzFhqZElRO3NSB3vXpcZjLOqwd.png)

------

**感谢你的阅读,我是中文区见证人之一,欢迎通过 [SteemConnect](https://v2.steemconnect.com/sign/account-witness-vote?witness=ety001&approve=1) 来给我投票,或者打开 [https://steemit.com/~witnesses/](https://steemit.com/~witnesses/) 页面,输入 *ety001* 进行投票。**

![2.gif](https://steemitimages.com/DQmZfJo3F8NXpFx7nenQA3zTU9jg6YoRQvfyeeHgSYpdqr4/2.gif)

**中文区的见证人目前有:**
支持一下他们(按字母顺序),*一人可以有30票*:
- @abit | [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=abit)
- @bobdos | [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=bobdos)
- @ety001| [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=ety001)
- @justyy |[投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy)
- @oflyhigh | [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=oflyhigh)
- @partiko | [投票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=partiko)

---

**Thank you for reading.  I'm a witness. I would really appreciate your witness vote! You can vote by [SteemConnect](https://v2.steemconnect.com/sign/account-witness-vote?witness=ety001&approve=1). Or open [https://steemit.com/~witnesses](https://steemit.com/~witnesses) page, input *ety001* to vote.**

![2.gif](https://steemitimages.com/DQmZfJo3F8NXpFx7nenQA3zTU9jg6YoRQvfyeeHgSYpdqr4/2.gif)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 143 others
properties (23)
authorety001
permlink3b-hass-io-ios
categorycn
json_metadata{"tags":["cn","cn-dev"],"app":"steemeditor/0.2.0","format":"markdown","app_url":"https://steemeditor.com"}
created2018-12-05 09:00:51
last_update2018-12-05 09:00:51
depth0
children1
last_payout2018-12-12 09:00:51
cashout_time1969-12-31 23:59:59
total_payout_value3.131 HBD
curator_payout_value1.019 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,946
author_reputation57,395,188,397,494
root_title在树莓派3B上搭建Hass.io并接入米家和iOS(一)
beneficiaries
0.
accountsteemeditor.bot
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,388,170
net_rshares7,103,255,582,940
author_curate_reward""
vote details (207)
@steemstem ·
re-ety001-3b-hass-io-ios-20181206t102038970z
<div class='text-justify'> <div class='pull-left'> <br /> <center> <img width='125' src='https://i.postimg.cc/9FwhnG3w/steemstem_curie.png'> </center>  <br/> </div> <br /> <br /> 

 This post has been voted on by the **SteemSTEM** curation team and voting trail in collaboration with **@curie**. <br /> 
 If you appreciate the work we are doing then consider [voting](https://www.steemit.com/~witnesses) both projects for witness by selecting [**stem.witness**](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=stem.witness) and [**curie**](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=curie)! <br /> 
For additional information please join us on the [**SteemSTEM discord**]( https://discord.gg/BPARaqn) and to get to know the rest of the community! </div>
properties (22)
authorsteemstem
permlinkre-ety001-3b-hass-io-ios-20181206t102038970z
categorycn
json_metadata{"app":"bloguable-bot"}
created2018-12-06 10:20:42
last_update2018-12-06 10:20:42
depth1
children0
last_payout2018-12-13 10:20:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length800
author_reputation262,017,435,115,313
root_title在树莓派3B上搭建Hass.io并接入米家和iOS(一)
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id76,442,672
net_rshares0