Comments (6)
Hi @deanlyoung,
Yeah, this is extremely annoying, especially when you have many lamps and sensors connected to your hue bridge. The current implementation of homebridge-hue loads all accessories at startup. When it cannot find or fails to communicate with the hue bridge, it starts nonetheless, but exposes no accessories to homekit. Homekit then thinks these accessories are no longer present and deletes them from it's database. Consequently, when you restart homebridge (and homebridge-hue), homekit thinks the accessories are brand new.
The structural solution to this is to change homebridge-hue to support homebridge 2.0's dynamic accessory model, see issue #4. Homebridge would then persist the accessories in the .homebridge directory, so homebridge-hue could still expose the "old" accessories, even when the connection to the bridge is (temporarily) lost. It will take me some time to make this change, though.
I would appreciate your ideas on some other more or less related thoughts, neither of which is implemented quickly, unfortunataly:
- Homebridge-hue could propagate name changes in homekit back to the hue bridge, so at least the names would be remembered. Edit: this can only work for service names (Siri names), which are stored in a characteristic. Accessory names are maintained in the homekit database, not in a characteristic. The homekit database can only be accessed by iOS apps, not by accessories like homebridge.
- Homebridge-hue could support the Room groups on the hue bridge to assign lights to a room (as does the bridge v2 homekit implementation). Again, homebridge-hue could propagate homekit changes of room assignments back to the bridge. Edit: would need an iOS app for this.
- Homebridge-hue could use resourcelinks on the hue bridge to remember room assignments of sensors. Edit: would need an iOS app for this.
from homebridge-hue.
Hey @ebaauw, those suggestions sound right. I'm afraid I don't know too much about the inner workings of the Hue bridge, but all the more reason to read up on it. I wonder though if something could be learned (or brought over) from @nfarina's philipshue repository? I was using that one before switching, in order to gain access to sensors, and it at least had the perception of being a little more stable.
from homebridge-hue.
Hi Dean, @deanlyoung
I looked at that plug-in, before deciding to create on my own. Like you, I wanted homekit support for the hue sensors. For that, I needed a different design of the plug-in. Last I looked, homebridge-philipshue only queries the hue bridge and updates homekit when a homekit app actually requests the homekit characteristic values. Homebridge-hue instead polls the bridge every heartbeat seconds to detect changes without any homekit app being active. This is needed to trigger homekit rules when hue sensor values change. Also, I like the homekit apps to mirror the bridge state without having to refresh the app manually.
Another difference: homebridge-philipshue collects all homekit characteristic changes for a light in a single hue bridge request. [Edit: no it doesn't, see issue #15]. The way I setup homebridge-hue, each individual characteristic change is pushed to the bridge immediately and independently. I want to change that eventually, but I'm currently focussing on the dynamic accessories.
Consequently, homebridge-hue is more resource intensive on the system it runs on, on the network and on the hue bridge.
from homebridge-hue.
Gotcha! Makes sense. It explains a little more for the other issue (#15) I opened as well.
I wonder if there would be any benefit from separating the sensor component and the light control component and expose them separately to the Home app as two platforms? Although, maybe it would still be pinging the Hue bridge just as frequently...
from homebridge-hue.
No, it wouldn't, the problem lies with the hue bridge (gen 1). See my response to issue #15.
from homebridge-hue.
I'll close this issue. The timeouts are tracked through issue #15, and the solution of the wiping of the homekit settings is with issue #4, the homebridge v2.0 dynamic accessory model.
from homebridge-hue.
Related Issues (20)
- 0.13.67 version mismatch HOT 5
- Add artificially delay before turning off a scene switch HOT 2
- Homebridge flooded with logs? HOT 4
- Intermittent toggling between states of certain lights HOT 12
- error:0A00010B HOT 1
- Unable to update to version 0.13.68 HOT 3
- Reset Timeout parameter throws error HOT 1
- Log level settings HOT 3
- Hue Bridge: warning: not using recommended Hue bridge api version 1.60.0 HOT 8
- 2nd Hue Bridge needs manual pressing of button HOT 13
- Hue Zones to Homekit? HOT 3
- Trying to add an outlet HOT 7
- Unable to setup - Unauthorized HOT 2
- Hue Dimmer Switch don't show in new home architecture HOT 2
- No devices showing up at all HOT 6
- Many devices not reachable since today HOT 7
- HUE Wall-Switch Module new Revision RDM004 not working HOT 2
- Expose more precise Hue bridge daylight sensor status HOT 1
- Hue light group shows as Off even if some of the lights are On HOT 2
- This plugin causes JavaScript heap error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-hue.