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

[bluetooth.hdpowerview] New binding using Bluetooth Low Energy #17099

Merged
merged 17 commits into from
Sep 8, 2024

Conversation

andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Jul 18, 2024

Resolves #16992

HD Powerview Gen 3 shades can be monitored/controlled either via a Gateway (over IP) or directly via Bluetooth Low Energy (BLE). The OH HD Powerview binding currently only supports the former. This PR adds a new binding that supports the latter.

Signed-off-by: AndrewFG software@whitebear.ch

@andrewfg andrewfg added the new binding If someone has started to work on a binding. For a new binding PR. label Jul 18, 2024
@andrewfg andrewfg self-assigned this Jul 18, 2024
@andrewfg andrewfg requested review from cdjackson, cpmeister and a team as code owners July 18, 2024 19:10
@andrewfg andrewfg changed the title HD Powerview Binding over Bluetooth Low Energ HD Powerview Binding over Bluetooth Low Energy Jul 18, 2024
@andrewfg andrewfg added the work in progress A PR that is not yet ready to be merged label Jul 18, 2024
@andrewfg andrewfg force-pushed the hdpowerview-ble branch 3 times, most recently from 3a06e65 to 60b2c9b Compare July 19, 2024 09:53
@andrewfg andrewfg changed the title HD Powerview Binding over Bluetooth Low Energy [bluetooth.hdpowerview] New binding using Bluetooth Low Energy Jul 19, 2024
Initial contribution

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg removed the work in progress A PR that is not yet ready to be merged label Jul 19, 2024
Signed-off-by: AndrewFG <software@whitebear.ch>
@andrewfg
Copy link
Contributor Author

Note: CI build is failing due to an error in 'deconz' binding.

@andrewfg
Copy link
Contributor Author

andrewfg commented Jul 21, 2024

@jlaur can I ask your opinion concerning a dependency in this binding on a class in the other 'hdpowerview' binding's namespace?

This is a bluetooth binding so it is (must be) hosted in the org.openhab.binding.bluetooth.* namespace. It depends on a single class org.openhab.binding.hdpowerview.ShadeCapabilitiesDatase in the original HD Powerview binding. And in order to compile this binding I had to clone that class into org.openhab.binding.bluetooth.hdpowerview.ShadeCapabilitiesDatase.

I am concerned about having two separate, but supposed to be identical, clones of this class, since I think there may be a maintenance issue in future if HD would introduce new shade models with different types and capabilities.

I wonder if you have any thoughts about this? We could in theory put 'ShadeCapabilitiesDatase' in a common feature so that both bindings could use it. But I am not sure then how that feature would be distributed or loaded? => WDYT?


EDIT one solution would be for this binding org.openhab.binding.bluetooth.hdpowerview to include org.openhab.binding.hdpowerview as a dependency in its 'feature.xml' file. That would cause both bindings to be installed. I am not sure what happens if the user would then manually uninstall org.openhab.binding.hdpowerview .. potentially it might break org.openhab.binding.bluetooth.hdpowerview ..


EDIT 2 .. or I could use Maven to copy the Java file over during the build process..


EDIT 3 .. the last commit is using Maven to copy the shade capabilities database file prior to compiling the jar.

andrewfg added 2 commits July 21, 2024 16:42
Signed-off-by: AndrewFG <software@whitebear.ch>
Signed-off-by: AndrewFG <software@whitebear.ch>
@andrewfg andrewfg added the rebuild Triggers Jenkins PR build label Jul 22, 2024
@andrewfg andrewfg added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jul 22, 2024
Signed-off-by: AndrewFG <software@whitebear.ch>
Signed-off-by: AndrewFG <software@whitebear.ch>
@andrewfg andrewfg added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Aug 26, 2024
@andrewfg
Copy link
Contributor Author

Ping me when you are ready

@lsiepel ..

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some last moment issues.

Signed-off-by: AndrewFG <software@whitebear.ch>
@andrewfg andrewfg requested a review from lsiepel August 27, 2024 20:57
Signed-off-by: AndrewFG <software@whitebear.ch>
Signed-off-by: AndrewFG <software@whitebear.ch>
@andrewfg andrewfg added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Sep 7, 2024
@lsiepel lsiepel added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Sep 8, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Sep 8, 2024

Failed tests are not related.

@lsiepel lsiepel merged commit 3132127 into openhab:main Sep 8, 2024
3 of 5 checks passed
@lsiepel lsiepel added this to the 4.3 milestone Sep 8, 2024
@andrewfg
Copy link
Contributor Author

andrewfg commented Sep 8, 2024

Failed tests are not related.

@lsiepel do I need to change something in the Hue binding?

@lsiepel
Copy link
Contributor

lsiepel commented Sep 8, 2024

Failed tests are not related.

@lsiepel do I need to change something in the Hue binding?

No it is fixed by upgrading jmdns in another PR. It should all be good. Now, you could add your binding's logo to the openHAB website. See https://next.openhab.org/docs/developer/addons/#add-your-add-on-s-logo-to-the-openhab-website-and-the-ui

@andrewfg
Copy link
Contributor Author

Now, you could add your binding's logo

@lsiepel => openhab/openhab-docs#2365

digitaldan pushed a commit to digitaldan/openhab-addons that referenced this pull request Sep 24, 2024
…ab#17099)

* [bluetooth.hdpowerview] initial contribution

Signed-off-by: AndrewFG <software@whitebear.ch>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
…ab#17099)

* [bluetooth.hdpowerview] initial contribution

Signed-off-by: AndrewFG <software@whitebear.ch>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
…ab#17099)

* [bluetooth.hdpowerview] initial contribution

Signed-off-by: AndrewFG <software@whitebear.ch>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
…ab#17099)

* [bluetooth.hdpowerview] initial contribution

Signed-off-by: AndrewFG <software@whitebear.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bluetooth.hdpowerview] Add support for Bluetooth Low Energy
4 participants