-
-
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
[grundfosalpha] Initial contribution #15907
Conversation
I had to disable the default filtering of duplicate data in bluez, otherwise I could not get the data of the alpha reader. I only used bluez on my development laptop, in my production environment I use a bluegiga dongle. That worked out of the box, so the configuration for the bluez and bluegiga environment are different by default. The commit in this PR makes the bluez implementation behave the same as the bluegiga implementation regarding duplicate data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution! It looks very good. I have added a few initial comments.
Do you know if the protocol for Grundfos Alpha Reader is similar to the one for Grundfos Alpha3, i.e. pumps with built-in Bluetooth support? I have an Alpha3 and would love to help testing and contributing if this could be supported as well. I already did a backport of your binding to 4.0.x to see if might communicate with my pump through BlueZ (Raspberry Pi 3), but unfortunately without success.
In order to be extensible in the future, I would already propose to rename to GrundfosAlpha, i.e. drop "Reader". If Alpha3 support could be added, this could then be a new thing type within the same binding.
I believe the binding id might need to be org.openhab.binding.bluetooth.grundfosalpha
(i.e. with a bluetooth prefix), but I will need to get back to that to be sure.
Can you also add I18N properties? See https://www.openhab.org/docs/developer/utils/i18n.html#generating-i18n-properties-file.
There are a few compiler warnings and checkstyle warnings to address. You could take a look at target/code-analysis/report.html.
bundles/org.openhab.binding.grundfosalphareader/src/main/resources/OH-INF/binding/binding.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.grundfosalphareader/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.grundfosalphareader/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.grundfosalphareader/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.grundfosalphareader/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.grundfosalphareader/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Thanks for the review, I will work on your issues. Regarding Grundfos Alpha 3:
When that works, you could try to dump the bluetooth messages with:
And send me some of the messages, so that I can compare them to mine. |
89a7e31
to
002c541
Compare
That sounds promising! Just to be clear, support for Alpha3 can be added in another PR as it's clearly out of scope for this one. But I'm very much interested in finally getting my pump online. 😄
I can read a lot of data with Grundfos Go Remote: I tried to install this one, but already at first step it seemed like it would start some major calibration, so didn't dare to go further.
Thanks. I've sent some messages by private mail. Perhaps this might also be helpful, I had a brief look at that when previously collecting messages and trying to figure them out: |
002c541
to
6bd4ce9
Compare
I have renamed/moved the add-on to org.openhab.binding.bluetooth.grundfosalpha. Could you help me with the following warnings? What do I have to do to fix them? [WARNING] OH-INF.thing.thing-types.xml:[0] I had a quick look on your Alpha3 logs and I think they can be supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much found on second pass, only some minor comments.
.../org/openhab/binding/bluetooth/grundfosalpha/internal/GrundfosAlphaReaderHandlerFactory.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.bluetooth.grundfosalpha/src/main/resources/OH-INF/addon/addon.xml
Outdated
Show resolved
Hide resolved
.../org/openhab/binding/bluetooth/grundfosalpha/internal/GrundfosAlphaReaderHandlerFactory.java
Outdated
Show resolved
Hide resolved
...rg/openhab/binding/bluetooth/grundfosalpha/internal/GrundfosAlphaReaderBindingConstants.java
Outdated
Show resolved
Hide resolved
...penhab/binding/bluetooth/grundfosalpha/internal/GrundfosAlphaReaderDiscoveryParticipant.java
Outdated
Show resolved
Hide resolved
...penhab/binding/bluetooth/grundfosalpha/internal/GrundfosAlphaReaderDiscoveryParticipant.java
Outdated
Show resolved
Hide resolved
Great!
Sure, I will have a look.
That would be awesome, let me know how I can help. 🙂 |
I think you are missing these in the thing type definition: <supported-bridge-type-refs>
<bridge-type-ref id="roaming"/>
<bridge-type-ref id="bluegiga"/>
<bridge-type-ref id="bluez"/>
</supported-bridge-type-refs> |
071a51d
to
f0f6231
Compare
@tisoft - just in case you missed them, there are still a few small comments to resolve. We can merge right after that. :) |
Yeah I know. Was a bit busy with work the last days. Will get back to this as soon as possible. |
f0f6231
to
a57d910
Compare
Those definitions are already in the file. I just tried to build the plugin org.openhab.binding.bluetooth.radoneye and I get the same warnings. So maybe this is currently expected? |
75185d0
to
fc7788d
Compare
.../org/openhab/binding/bluetooth/grundfosalpha/internal/GrundfosAlphaDiscoveryParticipant.java
Outdated
Show resolved
Hide resolved
...nhab.binding.bluetooth.grundfosalpha/src/main/resources/OH-INF/i18n/grundfosalpha.properties
Outdated
Show resolved
Hide resolved
I think I should have addressed all review comments. I have tested the binding again and it still works. 😄 |
Signed-off-by: Markus Heberling <[email protected]>
Co-authored-by: Jacob Laursen <[email protected]> Signed-off-by: Markus Heberling <[email protected]>
3c2934c
to
17339b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor details, will commit them before merging the PR.
Signed-off-by: Jacob Laursen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you!
@kaikreuzer - can you add @tisoft as contributor so he will be automatically assigned as code reviewer for the new Grundfos Alpha binding? 🙂 |
Sure, done! |
* [Bluez] Disable automatic filtering of duplicate data * Added Grundfos Alpha binding Signed-off-by: Markus Heberling <[email protected]> Signed-off-by: Jørgen Austvik <[email protected]>
This adds support for reading out the data of Grundfos Alpha Pumps with a Grundfos Alpha Reader (https://product-selection.grundfos.com/de/products/alpha-reader/mi401-alpha-reader-98916967?pumpsystemid=2213476387&tab=variant-specifications)