-
-
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
[openthermgateway] Add support for Ventilation/Heat Recovery units #11203
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/opentherm-gateway-binding/39160/294 |
Not sure why the build failed, it seems unrelated to the changes made to the binding. Stacktrace
|
a0dd7a8
to
8ab3173
Compare
Rebased onto main, now PR build succeeds |
8ab3173
to
7042170
Compare
Rebased onto main |
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.
There are some checkstyle warnings left. You could take a look at target/code-analysis/report.html
after building it with mvn clean install
.
Are there any breaking changes like renamed channels or renamed Thing/Bridge UIDs?
|
||
| Channel ID | Item Type | Description | Access | | ||
|------------|-----------|-------------|--------| | ||
| vh_ventilationenable | Switch | Ventilation enabled | R | |
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.
What's the reason for adding a suffix to the channel names?
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.
The names of the channels are mostly a copy/paste from the OpenTherm specifications. And those names do not always follow openHAB coding guidlines when it comes to the number of words, length in characters or things like using a suffix. So I find myself abbreviating or leaving words out.. just to comply with coding guidlines really but not making anything better in terms of readability imho or matching with the OT specs. So.. I don't know.. should I change them?
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.
I'd remove the prefix as it seems redundant for all Channels.
...ermgateway/src/main/java/org/openhab/binding/openthermgateway/handler/BaseDeviceHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.openthermgateway/src/main/resources/OH-INF/thing/channels.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.openthermgateway/src/main/resources/OH-INF/thing/channels.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.openthermgateway/src/main/resources/OH-INF/thing/channels.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.openthermgateway/src/main/resources/OH-INF/thing/channels.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.openthermgateway/src/main/resources/OH-INF/thing/channels.xml
Show resolved
Hide resolved
@fwolter thank you for the review! I will look into each comment but this may take some time. I'll let you know once it's ready to be reviewed again.
Fixed most of them.. just the import of .* I haven't found a more elegant solution to
Yes, definitely. The previous version had 1 Thing and that was used for boilers only. This version has a Bridge to communicate with the gateway and then separate Things for the actual devices, which allowed for support for ventilation/heat recovery units. In the future, more Things may be added such as solar panels and energy storage units. |
Signed-off-by: Arjen Korevaar <[email protected]>
Signed-off-by: Arjen Korevaar <[email protected]>
Signed-off-by: Arjen Korevaar <[email protected]>
Signed-off-by: Arjen Korevaar <[email protected]>
Signed-off-by: Arjen Korevaar <[email protected]>
Signed-off-by: Arjen Korevaar <[email protected]>
19639a5
to
210066c
Compare
You can simply use the Organize Imports function of eclipse to resolve these. I added the portentially not backward compatible label. The changes should be mentioned in the update.lst to show a warning when the user updates the system. See https://github.com/openhab/openhab-distro/blob/main/distributions/openhab/src/main/resources/bin/update.lst |
Ok @ArjenKorevaar, this is going to take me more time than I thought, so I will do it in three (at least) steps..
|
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.
Review step 1 on the OpenThermGatewaySocketConnector
and OpenThermGatewayHandler
classes..
...main/java/org/openhab/binding/openthermgateway/internal/OpenThermGatewaySocketConnector.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/openthermgateway/internal/OpenThermGatewaySocketConnector.java
Show resolved
Hide resolved
...main/java/org/openhab/binding/openthermgateway/internal/OpenThermGatewaySocketConnector.java
Show resolved
Hide resolved
...main/java/org/openhab/binding/openthermgateway/internal/OpenThermGatewaySocketConnector.java
Show resolved
Hide resolved
...main/java/org/openhab/binding/openthermgateway/internal/OpenThermGatewaySocketConnector.java
Outdated
Show resolved
Hide resolved
...eway/src/main/java/org/openhab/binding/openthermgateway/handler/OpenThermGatewayHandler.java
Show resolved
Hide resolved
...eway/src/main/java/org/openhab/binding/openthermgateway/handler/OpenThermGatewayHandler.java
Show resolved
Hide resolved
@ArjenKorevaar before I start work on the general code review, I would like to ask your opinion about how you prefer to handle it. There are two possible ways..
So it depends a bit on your workload and what you prefer. => Please let me know.. |
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg just a heads-up: I won't be able to spend time to look into this any time soon. |
.. well that did not go quite as I expected .. I really hate Git! Instead of pushing my proposed changes to a PR on @ArjenKorevaar 's repo (so he could optionally choose whether to adopt them or not, and then cascade into this PR), it seems that all of my commits landed directly in this PR automatically! (I don't really know how that happened..) But anyway, @ArjenKorevaar if you are NOT happy with my suggestions, then you will need to unwind the 16 commits made by me today February 3rd, 2022. Please accept my humble apologies for the unintended usurpation of your PR. The good news is that all of my code review suggestions, (and some of @fwolter 's still open suggestions), are now included in the PR, so I can now give you an LGTM on the final result! |
PS I note the following..
|
The two files |
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
One of my prior commits had broken the Thing initialization, so I pushed a fix just now. |
...ermgateway/src/main/java/org/openhab/binding/openthermgateway/handler/BaseDeviceHandler.java
Outdated
Show resolved
Hide resolved
...ermgateway/src/main/java/org/openhab/binding/openthermgateway/handler/BaseDeviceHandler.java
Show resolved
Hide resolved
...ermgateway/src/main/java/org/openhab/binding/openthermgateway/handler/BaseDeviceHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@ArjenKorevaar there are a couple of open issues that you need to resolve concerning the review from @fwolter
@fwolter I wonder if you can kindly help us with the merge conflict? |
Yes, how can I help? |
@fwolter the merge conflict is due to two files where the Git change tracker is not clever enough to recognise the changes..
Unfortunately I dont know enough about Git commands to tell it how to unwind its confusion. |
There were other commits in the meantime, modifying the two files. That's why they are conflicting in this PR. @ArjenKorevaar you need to rebase your branch with |
@fwolter , @ArjenKorevaar told me that he is quite busy and does not have much time to work on this. So as an alternative potential approach I created this new branch on my repo, to which I have copied all the files from this PR, and also also rebased it on the current So if we would proceed with a PR based on my new branch rather than proceeding with this PR, we could potentially speed up the review and approval process since I myself would be able to do all the remaining work, without imposing further effort on @ArjenKorevaar. However before I do this, can you please give me the Ok? |
Sounds good. |
Sounds good to me too. I am currently abroad and won't be able to work on this for atleast another couple of weeks. |
Closed in favor of #12367. |
Added support for Ventilation/Heat Recovery units to the OpenTherm Gateway binding.
More info at #11202
Solar Boiler units are currently only partially supported by the OpenTherm Gateway device itself, so this may be added to the binding at a later time.