- 积分
- 791
- 金钱
- 653
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 791
- 金钱
- 653
- HASS币
- 0
|
本帖最后由 whuiscool 于 2017-9-7 19:17 编辑
先在HomeKit里添加里HB,而HB里已经添加了小米空气净化器,运行正常。但是在学习这个帖子想添加摄像头时,不知道大神是不是都这样,虽然给出了config.json都写法,可是像我这样都新人,在config.json里已经有配置项的情况下,不知道摄像头这段该添加到哪里。于是就自己摸索添加到如下这样子:
{
"bridge": {
"name": "Homebridge",
"username": "XX:27:EB:2F:FB:2E",
"port": 51826,
"pin": "123-45-678"
},
"platforms": [{
"platform": "HomeAssistant",
"name": "HomeAssistant",
"host": "http://192.168.199.104:8123",
"password": "raspberry",
"supported_types": ["fan", "binary_sensor", "sensor", "garage_door", "input_boolean", "light", "lock", "media_player", "rollershutter", "scene", "switch"],
"default_visibility": "visible"
}, {
"platform": "Camera-ffmpeg-omx",
"cameras": [{
"name": "走廊摄像头",
"videoConfig": {
"source": "-re -i rtsp://admin:[email protected]:554",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
}]
}],
"accessories": [{
"accessory": "MiAirPurifier",
"name": "空气净化器",
"showTemperature": true,
"showHumidity": true,
"showAirQuality": true
}]
}
问题就来了,在HomeKit里添加配件时只能看到摄像头,而添加小米空气净化器的HB不见了。如果把摄像头这段加到accesories里,HB启动就报错。
不知哪位大神可以指点一下,多谢!
已经解决了,今天公司路由器出鬼了,后来重刷了备份的img就又好了。
|
|