Characteristic setValue or updateValue cannot response to Home App
See original GitHub issuehardware: Raspberry Pi 3B homebridge version: 2.2 nodejs version: 8.1.2 iOS version: 10.3.2
Hello all,
I’m trying to integrate our legacy smart lightbulb devices to Homkit using homebridge and serial port. And I’m developing a homebridge plugin to implement it. I have added accessories to bridge successfully and serial port communication is ok between homebridge and devices and
Now I meet a problem. When the plugin receive a serial port command, and I will set Characteristic value like following:
accessory.getService(Service.Lightbulb).getCharacteristic(Characteristic.On).updateValue(newValue);
Alternatively
accessory.getService(Service.Lightbulb).getCharacteristic(Characteristic.On).setValue(newValue);
but accessory button in Home App always haven’t response until I change Home App to backgroud or restart Home App. But I noticed that if I click the button in Home App, and call updateValue/setValue by serial port immediately, the accessory button in Home App have response.
I guess that updateValue/setValue haven’t connect EventedHTTPServer and Home App will connect that, and updateValue/setValue calling will send event before Home App disconnect from EventedHTTPServer. But I don’t confirm it.
Does anybody know what’s the reason and how to solve it?
Thank you very much.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (7 by maintainers)
Top GitHub Comments
Okay, so in Node.js 8.0, there is a new property introduced on http server which will close inactive connection after a timeout. homebridge 0.4.22 should addressed this problem on Node.js 8.0. Sorry for inconveniences.
OK, I’ve found the/my problem. I don’t have a fix tho. At least, not a good one.
It’s Node. 8.1.2 to be exact. Well, thats the version I used to have.
TL;DR:
homebridge-broadlink-rm
doesn’t. That needs 7.10I run the
homebridge-broadlink-rm
plugin which need 7.6.0 or better, so I got the latest stable, which appears to show this issueI went back to 6.10.3, and everything works (I had to disable the broadlink plugin tho 😦 )
My other machine, which is working, is running 4.6.0. I need to upgrade that to 6.10 😃
I then went for the latest in 7.x (for the broadlink one) which WORKS! yay!
So… 8.1.2 bug? I’m not overly familiar with the Node ecosystem, so I don’t know where to look for breaking changes…
I’m also seeing this in the debug, which I assume is 👍