-
-
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
[govee] Fix brightness vs. color synchronization #17812
Conversation
Signed-off-by: AndrewFG <[email protected]>
You can download the jar for test purposes below. Uninstall the standard binding, then unzip the file below and drop it in your /addons folder. Note: there are two zipped Jar files -- namely for OH 4.3.1 on Java 17 and OH 5.0.0 on Java 21 |
Signed-off-by: AndrewFG <[email protected]>
Can we add the |
This comment was marked as outdated.
This comment was marked as outdated.
I also noticed something about color temp: The color temp abs works fine, I defined a min and max in the sitemap so I can only send values that are supported by the lamp. |
Two things..
|
PS you also mentioned that you have a lamp which is not (yet) supported .. can you provide more info about it .. and I will see if I can fix that too.. |
This comment was marked as outdated.
This comment was marked as outdated.
Is the H60A1 the one on 192.168.4.237 ?? You say it works fine. But you also say it reports an error.. |
Yeah, it would be.. |
Yes it is.
You mean the |
I will add your H60A1 to the properties file. This simply allows to display a clear text label in the thing properties. However this DOES not solve the "thing Handler .. couldn't be found" error. If you say that 1) it works, and 2) it shows the error message, then this probably means that you have two duplicate things defined on the same IP address, and one is working, and the other is giving the error. Or something like that. |
Signed-off-by: AndrewFG <[email protected]>
That's not it. I double checked the MainUI and the config files. I only got this one Govee Edit: Weird… After removing the comment (adding the thing again) the message does not come up again. After restarting the binding the message appears again |
Can you please create a |
One thing that could be useful: A string channel which states whether the lamp is in color temp mode or in color color mode. I think that could become pretty useful in some rules. Would it be possible to implement that? Thank you very much for your work!! |
I noticed that the color temp must be a
This is with the
Can we change this such that a |
Could you provide a trace log around that sequence of events? |
I would like to focus on fixing the bug(s) first, before we consider extending the features. |
Not really. If you look at the CIE color space you will see that color temperatures are points which lie on the Planckian locus within the color space. And when you command a Govee lamp to a particular CT it causes the lamp to select an RGB value (i.e. color XY value) for that point. Therefore when you send a new CT, both the CT channel, and ALSO the Color HSB channel will be updated to match. Or to say it in other words, there is no such thing as Color resp. Color Temperature mode. EDIT: however the color temperature channels will be UNDEF if the color point is NOT on the Planckian locus. So that would perhaps be the indicator that you are looking for. |
Signed-off-by: AndrewFG <[email protected]>
The Jar in the post above has now been updated to the latest commit. |
Apropos the "handler couldn't be found" .. when a lamp sends an update, the code takes one of two possible forks -- namely if the handler can be found it processes the update, and if it can't be found it outputs the error message. However you are saying that it does both, which is a kind of Schroedinger cat condition... |
@lsiepel this one is (finally) ready. |
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.
Nice patch! Left two comments, otherwise LGTM
...hab.binding.govee/src/main/java/org/openhab/binding/govee/internal/CommunicationManager.java
Outdated
Show resolved
Hide resolved
Co-authored-by: lsiepel <[email protected]> Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg Do you think that this is going to be 5.0 only, or will there be a backport for 4.x? (In the meantime I cherry picked to 4.3.x locally and I will install probably this weekend on my production system. |
According to OH principles only bug fixes shall be back ported. So following those principles I guess it should not be (officially) back ported. However nevertheless I see some benefit for "selected" users to be able to run it on OH 4.3. Fortunately, if you follow the code in the message below, it is easily possible to (unofficially) back port it. https://community.openhab.org/t/openhab-5-x-snapshot-requires-java-21/160890/5
|
This comment was marked as resolved.
This comment was marked as resolved.
There is no "After try" log message any more in the latest version. So whatever version you are testing is probably the standard OH 4.3.x release version. You need to uninstall the release version. Probably clean-cache in order to remove the release version entirely. And then drop the new version into you addons folder. The backported version needs to have been compiled for Java 17 and a target version of OH 4.3.x If the Jar was built in the new OH 5.0 build system it will be built with Java 21 for OH 5.0 .. which will not load on OH 4.3 (and that may force OH to go out and look for a compatible (i.e. prior) version.
There is one in the post at the top of this thread. (It does not have the change I made today for @lsiepel but it should work for you). I will build a final final jar when we are done. |
Sorry, my bad, I messed up with the merge and then rebuilding. I finally checked out your PR and |
Slightly offtopic. Afer each release i have this issue. The given command does not build 4.3.0 jar's from main branch. It shows this error:
|
Maybe add the
|
^ |
I have updated my production system and I would say so far that it looks pretty good. The only thing that happened in the logs is "Failed to normalize configuration for new thing"
|
^ |
@lsiepel apropos the channel type xml update instructions issue above: I checked my xml syntax again and it seems OK to me. But perhaps you can have an independent look at it again? I am wondering if the issue might have been related to dropping the jar in addons rather than the normal jar loading process. In which case there may be an edge case issue in PH Core?? |
Can't test due to not havintg any govee devices. Would be best if you install a fresh openHAB with the shipped binding version and drop the jar after all is setup. For the update process it should not matter if itis shipped or placed in the addon folder. |
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, LGTM.
The warnings might be due to the development. I don;t see a clear casue in the code or update instructions. Let me know if you have tested enough.
Me neither. The log says "Channel types or config descriptions .. are missing" -- which is really helpful since it is not clear if the problem is due to the channel types (and if so which of them) or the config descriptions (and if so which of them). And furthermore the log gives no clue if it relates to the attributes provided by the prior binding version, or the respective same attributes provided by the new binding version after the update. As I said: really helpful indeed. But anyway comparing the before and after thing code in UI it seems that everything was, and is now, all as it should be. So I don't know if this issue is a bug in the binding (either before or after) or a bug in OH core. The log message comes from the registry, and only appears on the first update run, so I am inclined to think the issue is not in the new binding. OldNew |
Many thanks @lsiepel .. as you can see I opened a new issue about the ThingManagerImpl warning.. |
And many thanks to you, Andrew, to refactor and improve the binding 🙇♂️ |
* [govee] Fix synchronization of brightness Signed-off-by: Andrew Fiddian-Green <[email protected]>
Resolves #17807
Resolves #17823
Also includes the following..
Signed-off-by: AndrewFG [email protected]