|
本帖最后由 mstsc 于 2019-10-27 17:28 编辑 ) p4 X2 `' s! Q4 ~5 I7 E/ s
- K+ j/ l- y' A8 A* _5 j1 r
之前安装了domoticz和mqtt,现在安装homebridge实现siri控制
* {# l' V; F/ R I猫盘群晖安装domoticz和mqtt实现智能家居控制3 g: _+ G" o( Z! Q) q
准备工作
9 ]$ y# r: o, ?; s: e0 m& e群晖套件中心安装Node.js v8 P% Q( V, U' |
4 t; J$ q, `9 v& t% t+ |
安装bootstrap" D- S' g6 Y, ]7 R' V. s7 s
) w" i) H, m2 s& A* P7 A# C- sudo -i5 s- \. A+ |/ M- x; v* J, \
- cd /volume1/@tmp2 G% Q5 V% E \
- /usr/bin/wget http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh
/ \1 s% h4 k- D f - chmod +x /volume1/@tmp/buildroot-armeabihf-bootstrap.sh9 ]0 n; Z- X# m' N$ l$ _
- /volume1/@tmp/buildroot-armeabihf-bootstrap.sh& K* o0 ?. ^/ D A
- export PATH=$PATH":/opt/bin" //添加环境变量
复制代码 继续
1 t: J$ s% i: V- ipkg update
! ]% n( P/ n" T0 d9 p7 D - ipkg install gcc F$ v6 I* ]* G1 u8 I; L% {2 h" X
- ipkg install automake
( y4 l2 z: ^) ]" f7 G+ _ - ipkg install dbus0 V7 d" x& F4 O
- ipkg install avahi8 c' }# i- I4 X j- y
- ipkg install nano
复制代码
7 R9 V; ]8 ]" [' a H5 M/ I3 E安装homebridge和edomoticz插件) g' J9 |, z- _
- cd /volume1/@appstore/Node.js_v8/usr/local/bin/ R' n6 S5 X; v( w. `+ h; J d
- npm install -g npm
8 O9 v. G y( e$ W - npm install -g --unsafe-perm homebridge5 U$ N& H; } {0 q% c! Z# v
- npm install -g homebridge-edomoticz
复制代码 7 d$ @ z( N1 }1 K$ ]
配置domoticz
7 b8 N" b3 N( O在 Domoticz 中添加房间区域,点设置 → 更多选项 → 平面图/区域图 → 房间区域,添加一个“客厅”,记录客厅的IDX,并在客厅中添加开关+ E) P$ J1 r9 G9 b. Z- J
8 G# w4 R, j$ e
配置homebridge7 ?$ ~' v0 Q V# ]6 f/ d+ M( [
- touch /root/.homebridge/config.json //创建配置文件
: b9 @( E6 W/ N3 m" g8 w+ d. A - nano /root/.homebridge/config.json //修改配置文件,添加以下内容
复制代码 {0 I9 C- S! G1 K; }: ?
"bridge": {; S# ?+ S- h- r6 D7 T
"name": "Homebridge",# n [. m, w1 ?% U2 q& x2 [
"username": "CC:22:3D:E3:CE:30",
1 v; A5 F( \% @- |- I. H "port": 51826,+ {" \6 w# e2 u& r* n: B$ h
"pin": "031-45-154"
{% i0 [" l% b& D! p* u3 N },# v# s2 Z6 Y6 B9 }1 F D
"description": "Configuration file for (e)xtended Domoticz platform.",& r" Q: P( j; n+ s6 R
"platforms": [
0 q. T+ J3 W0 I' i {
+ q$ i5 m9 j. L4 i "platform": "eDomoticz",: N9 z9 @9 f) t4 Z& ?7 A! u
"name": "eDomoticz",% _- c7 e9 o: `( O+ M8 X5 x L6 p3 u2 h+ ?
"server": "127.0.0.1",9 e' c( ^) K6 m4 q6 K" E/ x% j+ _
"port": "8000",
# q8 X* n* W# Z/ {, j2 k, f "ssl": 0,
6 W% n, O+ `6 B: W5 y" M& U1 i "roomid": 2,7 Y. I" z+ K3 _' ?
"mqtt": 1,
" h4 Q0 D) K- ?3 v3 `2 L3 x! C9 k "excludedDevices": [
! x9 ~3 @( y- f( S$ w @) [# }6 O) m 16 K3 E y6 u1 D9 C
]: ^% S- r: f o- `2 m
}3 D6 o* O2 F" o* a
],
2 R& T. c# m+ J/ f" W" W$ [ "accessories": []8 f, O. n7 b% \5 t% g1 ~! e# a% I
}3 a" p2 E+ |4 F8 L0 ?* g
6 W4 o9 n$ F+ t
运行homebridge
- [+ g) H7 l1 J K4 l- /volume1/@appstore/Node.js_v8/usr/local/bin/homebridge
复制代码 打开iphone—家庭—添加扫码即可,siri就可以控制开关了
" E' v/ V0 l5 o. \& b# L* d0 Z; s |
评分
-
查看全部评分
|