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

[freeathome] Fix not updating values of room temperature devices #17957

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

JankKeks
Copy link
Contributor

Description

Fix for problems between freeathome and openhab. With 4.2. (and newer) things values was no longer sucessfull updated. Problem was caused by a bug generating the ID of the device Channels. (That leads to UpdateStatus failed).
Bug should be fixed

Further Discussions (and remaining bugs..:
https://community.openhab.org/t/abb-busch-jager-free-home-official-rest-api/141698/119

@JankKeks JankKeks requested a review from andrasU as a code owner December 22, 2024 21:42
@JankKeks JankKeks marked this pull request as draft December 22, 2024 21:45
@JankKeks JankKeks marked this pull request as ready for review December 22, 2024 21:50
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.

Thanks for fixing this issue! Hopefully this is a start for some more fixes.
Besides the minor style comment , i wonder why the binding folder was renamed, could you revert that renaming? ...nevermind...

@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Dec 22, 2024
@lsiepel lsiepel changed the title [Freeathome] Fix for not updating values of room temperature devices [Freeathome] Fix not updating values of room temperature devices Dec 22, 2024
@lsiepel lsiepel changed the title [Freeathome] Fix not updating values of room temperature devices [freeathomesystem] Fix not updating values of room temperature devices Dec 22, 2024
@jlaur jlaur changed the title [freeathomesystem] Fix not updating values of room temperature devices [freeathome] Fix not updating values of room temperature devices Dec 22, 2024
@jlaur
Copy link
Contributor

jlaur commented Dec 22, 2024

Besides the minor style comment, i wonder why the binding folder was renamed, could you revert that renaming?

I think it needs to be rebased so this will not be shown as differences. The actual binding id is freeathome, it was already renamed from freeathomesystem.

@lsiepel
Copy link
Contributor

lsiepel commented Dec 22, 2024

Besides the minor style comment, i wonder why the binding folder was renamed, could you revert that renaming?

I think it needs to be rebased so this will not be shown as differences. The actual binding id is freeathome, it was already renamed from freeathomesystem.

haha i thought it was the other way around... and guess what,.... i did it myself: #16718

@JankKeks
Copy link
Contributor Author

Besides the minor style comment, i wonder why the binding folder was renamed, could you revert that renaming?

I think it needs to be rebased so this will not be shown as differences. The actual binding id is freeathome, it was already renamed from freeathomesystem.

haha i thought it was the other way around... and guess what,.... i did it myself: #16718

Thanks for review. You renamed the binding already, but the internal path was not renamed - that caused a lot of internal warnings and problems with the mapping and classes. So I fixed it also.

@jlaur
Copy link
Contributor

jlaur commented Dec 23, 2024

You renamed the binding already, but the internal path was not renamed - that caused a lot of internal warnings and problems with the mapping and classes. So I fixed it also.

Thanks for clarifying and fixing this. Would you be able to cherry-pick that first commit into a separate PR so that we could merge this first and have a clean baseline for further fixes? This would reduce the risk of conflicts when backporting fixes into 4.3.x.

@JankKeks JankKeks marked this pull request as draft December 23, 2024 11:57
…ab/binding/freeathome/internal/handler/FreeAtHomeDeviceHandler.java

Co-authored-by: lsiepel <[email protected]>
Signed-off-by: JankKeks <[email protected]>
@JankKeks
Copy link
Contributor Author

You renamed the binding already, but the internal path was not renamed - that caused a lot of internal warnings and problems with the mapping and classes. So I fixed it also.

Thanks for clarifying and fixing this. Would you be able to cherry-pick that first commit into a separate PR so that we could merge this first and have a clean baseline for further fixes? This would reduce the risk of conflicts when backporting fixes into 4.3.x.

Unfortunately I have no idea how to do that :) If your provide some hints, I could do that.
Regarding back porting - I already build it for 4.3.0 - and it runs fine.

@JankKeks JankKeks marked this pull request as ready for review December 23, 2024 12:06
@JankKeks JankKeks requested a review from lsiepel December 23, 2024 12:06
@jlaur
Copy link
Contributor

jlaur commented Dec 23, 2024

Unfortunately I have no idea how to do that :) If your provide some hints, I could do that.

Sure, here is how I would do it:

git checkout main
git pull
git checkout -b freeathome-fix-path
git cherry-pick a4be1ebe726da112378cf2703ad208f1d7d799fd
git push --set-upstream origin freeathome-fix-path
# now create PR from this branch
# when merged, update your fork, then:
git checkout main
git pull
git checkout THISBRANCH
git rebase main

And now I see that you committed your changes directly to your main branch, so you will not be able to do any of this without getting into trouble. Making changes directly on the main branch is a bad idea, because you will not be able to work on different branches at the same time, and the probability of running into issues with rebasing etc. is high.

It is possible to resolve this, but it requires some more advanced git commands where any mistake can lead to bad results. If you are not already comfortable with using git this way, I would rather not try to give advise, because I could make mistakes as well and not be able to support you if it goes sideways.

If @lsiepel is okay with backporting the full contents of this PR, we could keep it as one PR and merge it as is (assuming PR comments are resolved). Going forward after that, you should create PR's from separate branches rather than using main.

@andrasU - would you like to review this PR as binding maintainer?

@JankKeks
Copy link
Contributor Author

Unfortunately I have no idea how to do that :) If your provide some hints, I could do that.

Sure, here is how I would do it:

git checkout main
git pull
git checkout -b freeathome-fix-path
git cherry-pick a4be1ebe726da112378cf2703ad208f1d7d799fd
git push --set-upstream origin freeathome-fix-path
# now create PR from this branch
# when merged, update your fork, then:
git checkout main
git pull
git checkout THISBRANCH
git rebase main

And now I see that you committed your changes directly to your main branch, so you will not be able to do any of this without getting into trouble. Making changes directly on the main branch is a bad idea, because you will not be able to work on different branches at the same time, and the probability of running into issues with rebasing etc. is high.

It is possible to resolve this, but it requires some more advanced git commands where any mistake can lead to bad results. If you are not already comfortable with using git this way, I would rather not try to give advise, because I could make mistakes as well and not be able to support you if it goes sideways.

If @lsiepel is okay with backporting the full contents of this PR, we could keep it as one PR and merge it as is (assuming PR comments are resolved). Going forward after that, you should create PR's from separate branches rather than using main.

@andrasU - would you like to review this PR as binding maintainer?

Ok thank you, I will keep it in mind for the next change. Unfortunately I'd never worked with git before o.o

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.

Thanks, LGTM.
Will backport all of it, that is fine.

@lsiepel lsiepel merged commit 5c76284 into openhab:main Dec 23, 2024
3 checks passed
@lsiepel lsiepel added this to the 5.0 milestone Dec 23, 2024
lsiepel pushed a commit that referenced this pull request Dec 23, 2024
)

* Fixed Pathnaming matching new binding name
Signed-off-by: JankKeks <[email protected]>
@lsiepel lsiepel added the patch A PR that has been cherry-picked to a patch release branch label Dec 23, 2024
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/busch-jaeger-free-home/31043/706

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 patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[freeathome] Room Temperature Actors and some more devices don't update values since 4.2
4 participants