找回密码
 立即注册
查看: 3227|回复: 8

[教程] 猫盘群晖安装homebridge对接domoticz实现siri控制智能家居

[复制链接]

4

主题

44

回帖

329

积分

中级渣柚V1

积分
329
发表于 2019-10-27 16:24:05 | 显示全部楼层 |阅读模式
本帖最后由 mstsc 于 2019-10-27 17:28 编辑
, u) }$ A* A3 j, q% w) l7 @: `: y2 S" Q* s  D
之前安装了domoticz和mqtt,现在安装homebridge实现siri控制
/ u) u5 r) A$ z  k# U猫盘群晖安装domoticz和mqtt实现智能家居控制1 m5 i" |" B+ q4 L9 s$ \' s7 \
准备工作
% @: w" l3 b' I* e0 S/ e- m群晖套件中心安装Node.js v8; D; C; }2 C- d! r& _+ b2 ~
/ [  r& u7 p  P" T3 k! y
安装bootstrap
' w1 R& Y" V2 j+ [0 G: d- B4 J7 K$ i7 _$ Y
  1. sudo -i
    7 y% u  h8 N7 N0 K( W  h
  2. cd /volume1/@tmp
    , z  f# `4 ]! _0 F5 U2 A
  3. /usr/bin/wget http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh
    - q; S( \! o- N, ^, Z# H
  4. chmod +x /volume1/@tmp/buildroot-armeabihf-bootstrap.sh0 G( W3 g2 i. c. _6 k% \: j
  5. /volume1/@tmp/buildroot-armeabihf-bootstrap.sh) E9 x% Z5 ~$ i, m! R( }' H4 o
  6. export PATH=$PATH":/opt/bin"   //添加环境变量
复制代码
继续
. C! ^  M/ h  _9 p' O6 V: P3 B2 F
  1. ipkg update
    % q0 m% u2 Z/ n& t5 B
  2. ipkg install gcc
    ! p; b1 |$ f1 {) K: W0 d3 ~/ p
  3. ipkg install automake, h- K  W) h+ y9 s0 f  q' K
  4. ipkg install dbus
    & {# O0 _7 c4 ^% t! s. f
  5. ipkg install avahi
    ) d! g/ y. v( ?
  6. ipkg install nano
复制代码
2 z% i# y  c7 j9 \1 a8 h6 g+ ~
安装homebridge和edomoticz插件# {. L9 _: I: a% o4 S
  1. cd /volume1/@appstore/Node.js_v8/usr/local/bin/ o, Z. Z9 y6 b" J4 n$ k
  2. npm install -g npm2 p* G# l9 a$ B( }9 K! A
  3. npm install -g --unsafe-perm homebridge0 P7 q; T# f5 @2 m/ y$ p, ^* |
  4. npm install -g homebridge-edomoticz
复制代码

6 a1 i* I* A% i6 f) k6 K配置domoticz0 x+ G* b' h! W, S! m& y2 H
在 Domoticz 中添加房间区域,点设置 → 更多选项 → 平面图/区域图 → 房间区域,添加一个“客厅”,记录客厅的IDX,并在客厅中添加开关+ j' Q6 C/ o" z4 D) S

2 I$ |3 f* O( V- D% y
配置homebridge
4 g/ g* o5 \  ]
  1. touch /root/.homebridge/config.json  //创建配置文件
    ( |& v1 M) W/ B0 |
  2. nano /root/.homebridge/config.json   //修改配置文件,添加以下内容
复制代码
{' u8 e) ^, a4 ^1 M/ `
    "bridge": {
8 l! h: p: R2 `% \/ ~        "name": "Homebridge",3 F. b4 j% m9 i# V0 |
        "username": "CC:22:3D:E3:CE:30",& W- U7 V/ }5 y3 v0 u' F8 O; H$ y4 Q
        "port": 51826,; b6 r% s4 f5 D
        "pin": "031-45-154"1 P1 e  q" h3 }% m; F8 j6 R
    },
0 D  E) K' D: c, ?; n    "description": "Configuration file for (e)xtended Domoticz platform.",1 W: K) ?( F- m
    "platforms": [
7 j. K, o& J, y" Q8 D$ U/ ]7 P        {. c4 w: p' X% K, g' j( W7 @
            "platform": "eDomoticz",. W; D+ h6 {5 E- ?4 x
            "name": "eDomoticz",  S0 W1 }0 s' E# n
            "server": "127.0.0.1",
2 v# y6 D  ?8 b* t% t7 V            "port": "8000",
  }2 G  `! M6 S            "ssl": 0,% u2 c! W2 ^+ P) N
            "roomid": 2,
0 q3 I4 |; c7 @* \8 m            "mqtt": 1,
4 l* ?5 a8 l2 C% V5 Q2 p; r            "excludedDevices": [# @' s- M/ Y6 U8 q- B  t
                1
9 d6 {% g9 G+ Z; C& D            ]
" u, Y9 a& }8 \+ y4 X        }0 H# I+ i3 _, P4 l
    ],3 G9 E: t( n: J2 c
    "accessories": []7 j: G" ^6 |, R
}; d% e2 _3 _/ l- @
( |) ]  c% p$ p( a+ p  b1 @: i
运行homebridge
' |. J8 y/ b7 h- V, @7 ^; c
  1. /volume1/@appstore/Node.js_v8/usr/local/bin/homebridge
复制代码
打开iphone—家庭—添加扫码即可,siri就可以控制开关了$ x6 @  `8 q! y- e% d+ s! h! p

评分

参与人数 1渣金 +10 经验值 +5 收起 理由
zystbbs + 10 + 5 赞一个!

查看全部评分

4

主题

44

回帖

329

积分

中级渣柚V1

积分
329
 楼主| 发表于 2019-10-27 16:24:32 | 显示全部楼层
占楼

2

主题

19

回帖

131

积分

初级渣柚V2

积分
131
发表于 2019-10-27 17:59:54 | 显示全部楼层
牛皮了      

1

主题

29

回帖

109

积分

初级渣柚V2

积分
109
发表于 2019-10-27 19:10:57 | 显示全部楼层
学习了   

1

主题

20

回帖

94

积分

初级渣柚V2

积分
94
发表于 2019-10-27 19:13:58 | 显示全部楼层
真大佬,进来学习了

1

主题

233

回帖

367

积分

中级渣柚V1

积分
367
发表于 2019-10-27 21:23:14 | 显示全部楼层
我的还没刷,我要赶快刷了玩玩

1

主题

266

回帖

519

积分

中级渣柚V2

积分
519
发表于 2019-11-17 18:51:56 | 显示全部楼层
大佬  学习了

5

主题

116

回帖

314

积分

中级渣柚V1

积分
314
发表于 2019-11-17 21:15:06 | 显示全部楼层
太高级了,看不上很懂啊

3

主题

79

回帖

157

积分

初级渣柚V2

积分
157
发表于 2020-3-11 23:42:48 | 显示全部楼层
第四行就出错了
1 J$ f9 e% z6 |% |. P2 ^+ H! _- i6 d
rm: cannot remove ‘/tmp/’: Is a directory$ M$ T' i' G, S/ a* t8 m) m2 g
/volume1/@tmp/buildroot-armeabihf-bootstrap.sh: line 8: /opt/etc/ipkg.conf: No such file or directory* V# ^& x7 ^  m- Z+ _9 t
/volume1/@tmp/buildroot-armeabihf-bootstrap.sh: line 9: /opt/etc/ipkg.conf: No such file or directory
% t1 Z! G! ?* ~3 i# l3 r1 }Bootstraping done$ `% V: _! x' A" }; w3 }
Installing glibc-locale package to generate needed /opt/lib/locale/locale-archive4 W8 t7 ^/ r" |: J: @. `
=================================================================================
; A3 \+ g$ E+ S- {4 T" }; x/volume1/@tmp/buildroot-armeabihf-bootstrap.sh: line 18: /opt/bin/ipkg: No such file or directory
2 k% T" P8 y4 H% _/volume1/@tmp/buildroot-armeabihf-bootstrap.sh: line 19: /opt/bin/ipkg: No such file or directory
9 `& _% M7 l6 o& Z+ D=================================================================================3 N/ k: {5 m2 a. P
Removing glibc-locale package to save space: this doesn't remove generated /opt/lib/locale/locale-archive
* A0 f6 Y) l0 q0 X; R; v1 H, V$ ?/volume1/@tmp/buildroot-armeabihf-bootstrap.sh: line 24: /opt/bin/ipkg: No such file or directory7 m' l) G/ _% T" k" W$ t! Y
root@YiNas:/volume1/@tmp# export PATH=$PATH":/opt/bin"   //添加环境变量7 g: d8 d4 r0 k
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|矿渣社区 ( 黔ICP备2024020525号-1 )

GMT+8, 2025-4-16 10:59 , Processed in 0.120066 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表