Skip to content
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 7491 / add support for merging several updates to one command #7825

Merged
merged 8 commits into from
Jun 7, 2020

Conversation

yfre
Copy link
Contributor

@yfre yfre commented May 31, 2020

Issue:

complex openHAB items like Dimmer and Color have several characteristic. in case of Color all 3 characteristics are updated with one command/state - HSBType.
in the same time, HomeKit home app sends updates for the characteristics independently of each other, e.g. update for hue, update for saturation and update for brightness.
as results, characteristics can be get overwritten.
see #7491 and https://community.openhab.org/t/coloritem-hue-and-saturation-updates/99468/4
for more details.

Solution:
as propose in https://community.openhab.org/t/coloritem-hue-and-saturation-updates/99468/4 this PR introduce a proxy for openHAB item, that collects commands/update first and then sends merged update - either wenn all relevant updates received or after 50ms after first update.

in addition to HUE/Saturation issue, this update also solved Dimmer issue with "ON" and "Bightness" updates at the same time. see https://community.openhab.org/t/homekit-homekit-sending-on-and-100-command/99485

Signed-off-by: Eugen Freiter [email protected]

@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@yfre yfre added the bug An unexpected problem or unintended behavior of an add-on label May 31, 2020
@yfre yfre linked an issue Jun 1, 2020 that may be closed by this pull request
@J-N-K
Copy link
Member

J-N-K commented Jun 1, 2020

Also, please add yourself as a CODEOWNER. I would like to hear your thoughts on PR to this bundle.

Eugen Freiter added 2 commits June 1, 2020 19:50
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@yfre yfre requested a review from a team as a code owner June 1, 2020 17:53
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@J-N-K
Copy link
Member

J-N-K commented Jun 1, 2020

I didn't think about the names of the config options. I'll comment on that tomorrow

Signed-off-by: Eugen Freiter <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Eugen Freiter <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@J-N-K
Copy link
Member

J-N-K commented Jun 2, 2020

Otherwise LGTM

@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@yfre
Copy link
Contributor Author

yfre commented Jun 5, 2020

@cpmeister thank for the review. i have committed all changes. is anything missing ?

Signed-off-by: Eugen Freiter <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Eugen Freiter <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @yfre,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@cpmeister cpmeister merged commit e271705 into openhab:2.5.x Jun 7, 2020
@cpmeister cpmeister added this to the 2.5.6 milestone Jun 7, 2020
@yfre yfre deleted the fix_hue branch June 20, 2020 17:30
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: Daan Meijer <[email protected]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
…e command (openhab#7825)

* add support for merging several updates to one command
* incorporate J-N-K feedback, adapt the logic for dimmer
* add yfre to CODEOWNERS
* incorporate feedback from @cpmeister
* remove some blank lines

Signed-off-by: Eugen Freiter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[homekit] Lightning Dimmer sends 2 commands
4 participants