-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[homekit] bugfix #7701. set correct configuration revision on bundle start. #7702
Conversation
…penhab#7701 Signed-off-by: Eugen Freiter <[email protected]>
Travis tests were successfulHey @yfre, |
LGTM. I was wondering if we should also store the number of detected accessories and only start the bundle after we either found the same number or a certain timespan has elapsed. The idea behind this was that there may be some delay with the items on startup. sequence 1:
sequence 2:
My idea was that in sequence 2 the app removes all accessories (and their metadata) and later re-adds them, but the metadata is lost. Sometimes only some of my items are moved to the standard room and I thought that this might be related to the sequential reading of the items. Also sometimes rules report missing items on startup. |
this is good idea. |
Unfortunately, since eclipse-archived/smarthome#1896 ist still not resolved, there is no such event. That‘s probably why the idea of the configurable delay (default 30s) was born in the issue you linked. |
Since this a fix anyway, I'll merge that and we can add more improvements later. |
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]> Signed-off-by: CSchlipp <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
…#7702) Signed-off-by: Eugen Freiter <[email protected]>
HomeKit uses configuration revision number to indicate changes in the configuration of accessories and bridges.
Bridge (in our case openHAB) communicates the revision number to all clients (home apps) and should increase it with every change in configuration (in our case items config). This is supported by HomeKit addon. However, on HomeKit bundle restart the revision was set to 1.
e.g. before bundle restart the revision was 34. after bundle restart the revision was set to 1.
This could lead in some cases to a configuration reset in home app so that all changes done in home app (e.g. room assignment, scenes, renaming) will get lost. See #7701
This PR ensures that the configuration revision is set correctly on the bundle start.
Signed-off-by: Eugen Freiter [email protected]