Homebridge plugin


#103

I have exactly this issue right now. Everything was ok, I also installed a script to auto start homebridge at startup and this code didn’t make any issue. Installing homebridge-soundtouch plugin (followed here) now the Home App doesn’t recognise homebridge devices anymore.

Domoticz is up and running correctly, controlling the devices.

What’s the problem?

Please help, thanks.


#104

Please grab some log of homebridge, so we can know what’s going on.


#105

可否写一个Yeelight加绿米网关的示例?菜鸟被挡在门外了。


#106

{
“bridge”: {
“name”: “YeeBridge”,
“username”: “18:00:27:40:BC:1B”,
“port”: 51825,
“pin”: “031-45-154”
},

“platforms”: [
{
“platform” : “yeelight”,
“name” : “yeelight”
},
{
“platform”: “AqaraPlatform”,
“sid”: [“6409802da3b3”],
“password”: [“02i44k56zrgg578b”]
}
]
}

绿米用的sid和password要去app里面拿


#108

哇,效率真高,早知道这么高效率我就睡一觉了,我一夜没睡在一小时前刚搞懂。对高效点赞!


#109

你好,我已经成功部署了yeelight白光和彩光灯泡,同时连上了小米网管等设备。
今天我准备添加一个新的yeelight彩光灯时,连接顺利,但在家庭app中操作灯没有反应
在log中出现了如下的连接报错信息:

connection brokenfalse
[object Object]
socket error
failed to connect!
[2017-5-7 08:50:33] [yeelight] accesseory unreachable
[2017-5-7 08:50:33] [yeelight] dev disconnected 0x00000000035a1168 false
retry connect (2) …: 0x000000000xxxxxx
并且在每次使用家庭app控制此灯是,log出现
connection brokenfalse
[object Object]
connection brokenfalse
[object Object]
我已经尝试过并确认:

  • 打开了极客模式,并且家庭app中也出现了这个灯,yeelight app和小米app可以控制这个灯,但家庭app中不可以控制。
  • 重置灯泡,再次连接,一样。
  • 清除了accessories 和persist下的设备和验证文件,并重新连接homekit,同样的问题。
  • 在google上查询是否有同样问题,无果。
    运行环境:
  • 树莓派,自带系统。
  • nodejs6,其他都是最新版,昨晚刚更新过

同时,另外的两个yeelight灯工作正常。
折腾其他几个东西,已经有点精疲力竭,但是这个问题是在没有头绪。望可以尽快给予帮助,谢谢。


#110

好吧,我删除了persist文件夹后再开启homebridge 并且重新连入home app后,所有的yeelight灯泡都不再显示了。包括之前可以用的。是不是需要重置灯?但之前重置了也米有用。。


#111

我按照这个修改了config文件后,其实就是添加了yeelight platform这部分,原先只有小米 网管的。
但之前可以同时使用的yeelight和小米网管,现在只有小米网管的相关设备可以被homebridge发现了。

之后我尝试关闭了再打开极客模式,这些灯就可以被homekit发现了,并且有设备号,但是,操作没有反应。log里的报错如上面所写,提示没有连接上,并且反复尝试连接。
我快奔溃了,原本只是想加一个灯,结果原本两个灯也不能用了。


#112

别着急,肯定是能搞定的。

你这样,找到灯的IP地址,然后直接运行命令 “telnet ip 55443",看看什么反应


#114

telnet 192.168.21.162 55443
Trying 192.168.21.162…
telnet: connect to address 192.168.21.162: Connection refused
telnet: Unable to connect to remote host

telnet 192.168.21.153 55443
Trying 192.168.21.153…
telnet: connect to address 192.168.21.153: Operation timed out
我开关了一次极客模式后,现在home app里可以读取灯泡的信息了,但是操作没有实际反映。


#115

微信告诉我,我帮你看看。


#116

weixin:lvxinyan1992


#117

Thank you so much for creating this! Working perfectly first time around


#118

Hi weiwei, Thank you for suport homebridge, I using this plugin very useful.
but, I have two problems.

  1. first connecting time is long (turn on, turn off about 10 times. but, once connected, working immediately.)
    I guess if there is no activity for some time, yeelight must reconnect to homebridge.
    any other homebridge connected device is working always immediately
    ex) connected smartthings zigbee device (xiaomi sensors, outlet), wi-fi connected logitech harmony.
    connect : devices(zigbee, wifi) -> smartthings -> homebridge -> apple homekit <<< this connection is working immediately

  2. if set bulb color with homekit (can brighter than yeelight app’s max brightness), bulb irregularly blinking.

do you have solution this problems?
problem 2 is not important. but, 1 is important.

I use raspberryfi 3, 10 yeelight color bulb, 2 yeelight light strip. there connected on apple airport express.
and yeelight firmware updated lastest. connected singapore server.

I will link my problem on youtube.

sorry for bad english.


#119

Hi llgnos,

Thanks for your feedback!
Could you do me a favor to capture homebridge’s log on your Pi when the 1st issue you mentioned happen again?
Meanwhile I will try to reproduce the issue by myself and do some debugging.

Thanks,
Wilson


#120

Jun 3 11:58:41 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:58:41 raspberrypi homebridge[518]: socket error
Jun 3 11:58:41 raspberrypi homebridge[518]: failed to connect!
Jun 3 11:58:41 raspberrypi homebridge[518]: [6/3/2017, 11:58:41 AM] [homebridge-yeelight.yeelight] accesseory unreachable
Jun 3 11:58:41 raspberrypi homebridge[518]: [6/3/2017, 11:58:41 AM] [homebridge-yeelight.yeelight] dev disconnected 0x000000000334e7ce false
Jun 3 11:58:44 raspberrypi homebridge[518]: retry connect (0) …: 0x000000000334e7ce
Jun 3 11:58:45 raspberrypi homebridge[518]: connect ok!
Jun 3 11:58:45 raspberrypi homebridge[518]: [6/3/2017, 11:58:45 AM] [homebridge-yeelight.yeelight] accesseory reachable
Jun 3 11:58:45 raspberrypi homebridge[518]: [6/3/2017, 11:58:45 AM] [homebridge-yeelight.yeelight] dev connected 0x000000000334e7ce true
Jun 3 11:58:49 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:58:52 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:58:53 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:58:56 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:58:56 raspberrypi homebridge[518]: socket error
Jun 3 11:58:56 raspberrypi homebridge[518]: failed to connect!
Jun 3 11:58:56 raspberrypi homebridge[518]: [6/3/2017, 11:58:56 AM] [homebridge-yeelight.yeelight] accesseory unreachable
Jun 3 11:58:56 raspberrypi homebridge[518]: [6/3/2017, 11:58:56 AM] [homebridge-yeelight.yeelight] dev disconnected 0x00000000035ac169 false
Jun 3 11:58:59 raspberrypi homebridge[518]: retry connect (0) …: 0x00000000035ac169
Jun 3 11:58:59 raspberrypi homebridge[518]: connect ok!
Jun 3 11:58:59 raspberrypi homebridge[518]: [6/3/2017, 11:58:59 AM] [homebridge-yeelight.yeelight] accesseory reachable
Jun 3 11:58:59 raspberrypi homebridge[518]: [6/3/2017, 11:58:59 AM] [homebridge-yeelight.yeelight] dev connected 0x00000000035ac169 true
Jun 3 11:59:00 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:59:02 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:04 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:59:05 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:05 raspberrypi homebridge[518]: socket error
Jun 3 11:59:05 raspberrypi homebridge[518]: failed to connect!
Jun 3 11:59:05 raspberrypi homebridge[518]: [6/3/2017, 11:59:05 AM] [homebridge-yeelight.yeelight] accesseory unreachable
Jun 3 11:59:05 raspberrypi homebridge[518]: [6/3/2017, 11:59:05 AM] [homebridge-yeelight.yeelight] dev disconnected 0x000000000359f9e7 false
Jun 3 11:59:06 raspberrypi homebridge[518]: 0x000000000334e7ce property change: power value: 1
Jun 3 11:59:06 raspberrypi homebridge[518]: [6/3/2017, 11:59:06 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 1
Jun 3 11:59:06 raspberrypi homebridge[518]: 0x000000000334e7ce property change: power value: 0
Jun 3 11:59:06 raspberrypi homebridge[518]: [6/3/2017, 11:59:06 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 0
Jun 3 11:59:08 raspberrypi homebridge[518]: retry connect (0) …: 0x000000000359f9e7
Jun 3 11:59:08 raspberrypi homebridge[518]: connect ok!
Jun 3 11:59:08 raspberrypi homebridge[518]: [6/3/2017, 11:59:08 AM] [homebridge-yeelight.yeelight] accesseory reachable
Jun 3 11:59:08 raspberrypi homebridge[518]: [6/3/2017, 11:59:08 AM] [homebridge-yeelight.yeelight] dev connected 0x000000000359f9e7 true
Jun 3 11:59:14 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:59:16 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:16 raspberrypi homebridge[518]: 0x000000000359f9e7 property change: power value: 1
Jun 3 11:59:16 raspberrypi homebridge[518]: [6/3/2017, 11:59:16 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 1
Jun 3 11:59:17 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:59:17 raspberrypi homebridge[518]: 0x000000000359f9e7 property change: power value: 0
Jun 3 11:59:17 raspberrypi homebridge[518]: [6/3/2017, 11:59:17 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 0
Jun 3 11:59:18 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:19 raspberrypi homebridge[518]: socket error
Jun 3 11:59:19 raspberrypi homebridge[518]: failed to connect!
Jun 3 11:59:19 raspberrypi homebridge[518]: [6/3/2017, 11:59:19 AM] [homebridge-yeelight.yeelight] accesseory unreachable
Jun 3 11:59:19 raspberrypi homebridge[518]: [6/3/2017, 11:59:19 AM] [homebridge-yeelight.yeelight] dev disconnected 0x00000000035ad8fb false
Jun 3 11:59:20 raspberrypi homebridge[518]: connection brokenfalse
Jun 3 11:59:20 raspberrypi homebridge[518]: null
Jun 3 11:59:21 raspberrypi homebridge[518]: socket error
Jun 3 11:59:21 raspberrypi homebridge[518]: failed to connect!
Jun 3 11:59:21 raspberrypi homebridge[518]: [6/3/2017, 11:59:21 AM] [homebridge-yeelight.yeelight] accesseory unreachable
Jun 3 11:59:21 raspberrypi homebridge[518]: [6/3/2017, 11:59:21 AM] [homebridge-yeelight.yeelight] dev disconnected 0x00000000035ac169 false
Jun 3 11:59:22 raspberrypi homebridge[518]: retry connect (0) …: 0x00000000035ad8fb
Jun 3 11:59:22 raspberrypi homebridge[518]: connect ok!
Jun 3 11:59:22 raspberrypi homebridge[518]: [6/3/2017, 11:59:22 AM] [homebridge-yeelight.yeelight] accesseory reachable
Jun 3 11:59:22 raspberrypi homebridge[518]: [6/3/2017, 11:59:22 AM] [homebridge-yeelight.yeelight] dev connected 0x00000000035ad8fb true
Jun 3 11:59:24 raspberrypi homebridge[518]: retry connect (0) …: 0x00000000035ac169
Jun 3 11:59:25 raspberrypi homebridge[518]: connect ok!
Jun 3 11:59:25 raspberrypi homebridge[518]: [6/3/2017, 11:59:25 AM] [homebridge-yeelight.yeelight] accesseory reachable
Jun 3 11:59:25 raspberrypi homebridge[518]: [6/3/2017, 11:59:25 AM] [homebridge-yeelight.yeelight] dev connected 0x00000000035ac169 true
Jun 3 11:59:27 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:27 raspberrypi homebridge[518]: 0x00000000035ad8fb property change: power value: 1
Jun 3 11:59:27 raspberrypi homebridge[518]: [6/3/2017, 11:59:27 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 1
Jun 3 11:59:28 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:59:28 raspberrypi homebridge[518]: 0x00000000035ad8fb property change: power value: 0
Jun 3 11:59:28 raspberrypi homebridge[518]: [6/3/2017, 11:59:28 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 0
Jun 3 11:59:30 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:30 raspberrypi homebridge[518]: 0x00000000035ad8fb property change: power value: 1
Jun 3 11:59:30 raspberrypi homebridge[518]: [6/3/2017, 11:59:30 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 1
Jun 3 11:59:32 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“off”,“smooth”,500]}
Jun 3 11:59:32 raspberrypi homebridge[518]: 0x00000000035ad8fb property change: power value: 0
Jun 3 11:59:32 raspberrypi homebridge[518]: [6/3/2017, 11:59:32 AM] [homebridge-yeelight.yeelight] update accessory prop: powervalue: 0
Jun 3 11:59:35 raspberrypi homebridge[518]: {“id”:1,“method”:“set_power”,“params”:[“on”,“smooth”,500]}
Jun 3 11:59:35 raspberrypi homebridge[518]: socket error
Jun 3 11:59:35 raspberrypi homebridge[518]: failed to connect!
Jun 3 11:59:35 raspberrypi homebridge[518]: [6/3/2017, 11:59:35 AM] [homebridge-yeelight.yeelight] accesseory unreachable
Jun 3 11:59:35 raspberrypi homebridge[518]: [6/3/2017, 11:59:35 AM] [homebridge-yeelight.yeelight] dev disconnected 0x00000000035b3ad9 false
Jun 3 11:59:38 raspberrypi homebridge[518]: retry connect (0) …: 0x00000000035b3ad9
Jun 3 11:59:38 raspberrypi homebridge[518]: connect ok!
Jun 3 11:59:38 raspberrypi homebridge[518]: [6/3/2017, 11:59:38 AM] [homebridge-yeelight.yeelight] accesseory reachable
Jun 3 11:59:38 raspberrypi homebridge[518]: [6/3/2017, 11:59:38 AM] [homebridge-yeelight.yeelight] dev connected 0x00000000035b3ad9 true


#121

This is some logs. you can find socket error and retry connect.
reconnected then working fine. but 5minute after bulb occur socket error, need reconnect.


#122

Thanks for your information, I will take a look ASAP.


#124

I made a update on the script, could you help do a verification?

Download new script “yee.js” from https://s3.amazonaws.com/yeelight-images/yee.js and replace the one on your Pi /usr/lib/node_modules/homebridge-yeelight/lib/yee.js. Remember to restart the homebridge service after the repalcement.

Just let me know the result.


#125

Thank you for update.
but I found solution. problem is Apple Airport Express.
I think yeelight and Apple Airport Express has unstable connection.
when I first connect to yeelight to Airport Express, I can’t connect to airport express.
but after firmware updated, I can connect to airport.
I guess Airport express and yeelight connection has something wrong.??
anyway, I will update new script. Thank you
sorry for bad english