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

Color Temperature / Color widget wrongly sends second POST for Color item #2849

Closed
andrewfg opened this issue Oct 30, 2024 · 14 comments · Fixed by #2860
Closed

Color Temperature / Color widget wrongly sends second POST for Color item #2849

andrewfg opened this issue Oct 30, 2024 · 14 comments · Fixed by #2860
Assignees
Labels
bug Something isn't working main ui Main UI

Comments

@andrewfg
Copy link

andrewfg commented Oct 30, 2024

@toomtech many thanks for the pcap. It shows something rather odd. See screenshot below. I am pretty sure that this is an error in Main UI. And to be specific the problem is NOT in the OH standard items slider screen, but IS in your Locations | Office widget.

Your pcap shows the following sequence of events:

  1. UI client commands CT item to 67%
  2. OH server notifies CT item changed to 66.86%
  3. OH server notifies Color item changed to HSB 38.101,56.52900,98.02 // note: S=56.52900 !!
  4. UI client commands Color item to HSB 39,39,98 // note: S=39 !!
  5. OH server notifies CT item changed to Undef
  6. OH server notifies Color item changed to HSB 39.016,39.00500,98.02

Specific observation is that the S value massively changes between events 3. and 4. !! => It makes me suspect that your Client | Locations | Office widget is wrongly sending HHB instead of HSB. => We need to look into the widget code!

image

Originally posted by @andrewfg in openhab/openhab-addons#17643 (comment)


After the user issues a Color Temperature command, and OH sends respective Color Temperature and Color HSB state update responses, the UI Widget is issuing -- on its own initiative -- an extra Color HSB command. There are two problems here..

  1. The Widget seems to be sending HHB rather than HSB
  2. And -- far more important -- the Widget should not be issuing ANY commands on its own initiative.
@andrewfg
Copy link
Author

@toomtech as I myself don't use these widgets, perhaps you can provide some info for others about the one you are using? Does it have a name? And/or some config settings? Etc.

@toomtech
Copy link

toomtech commented Oct 31, 2024

This is all just built in to openHAB and I don't configure any part of the UI manually. The boxes I'm clicking in the gif in linked issue are provided automatically once you define semantics for the items.

@andrewfg
Copy link
Author

^
you must have configured your Locations page and added the Office widget. So how did you do that?

@toomtech
Copy link

@andrewfg I have not configured the Locations page nor added the Office widget. At least not directly or manually. That is automatically constructed when I configure the item semantic metadata as outlined here. I'm configuring the item metadata via REST API and the resulting configuration is attached to the previous hue issue here where the relevant bits are .[].metadata.semantics The MainUI looking version of this configuration is something like this (this is back to a more complicated setup currently but you get the idea):

Screenshot 2024-10-31 at 15 51 49 Screenshot 2024-10-31 at 15 41 04

Beyond the configuration which appears in the Model tab shown (which is just item configuration) and adding the relevant things and linking their channels to said items, I'm not doing any other configuration. I do not touch anything in the pages tab or anything else that would result in manual UI configuration for this issue.

Does that make sense? I found the semantic model confusing for quite a while and I may be confusing my terminology in general, so apologies if so.

@andrewfg
Copy link
Author

andrewfg commented Nov 1, 2024

^
Unfortunately I don't use any of these UI widgets, so I have very little knowledge on them and their code. So someone else will have to resolve this. And we need to give as much info as possible for that person. I think the bug is not related to the semantic model, but rather related to the actual script code of the actual widget which is loaded into your browser. There are many possible widgets that may have been used. So we (they) need to know as much as possible about the actual widget and its actual code.

@toomtech
Copy link

toomtech commented Nov 1, 2024

I'm happy to provide any information you think will help. Just let me know what you need.

@andrewfg
Copy link
Author

andrewfg commented Nov 1, 2024

I'm happy to provide any information you think will help. Just let me know what you need.

@maniac103 / @lolodomo => handing over to you guys.

@lolodomo lolodomo added bug Something isn't working main ui Main UI labels Nov 1, 2024
@lolodomo
Copy link
Contributor

lolodomo commented Nov 1, 2024

@maniac103 / @lolodomo => handing over t

Don't think we can help as it looks like a bug in a Main UI page. I let @florian-h05 confirm.

@andrewfg
Copy link
Author

andrewfg commented Nov 3, 2024

382576864-bc4a5261-1e2b-4fb0-b000-b7e5b0b37a29

@andrewfg
Copy link
Author

andrewfg commented Nov 3, 2024

video shows clearly Main UI standard screens.

Indeed. And to be more specific the issue only occurs on a screen where there are both a color item widget and a color temperature slider on the same screen (see below). And the problem is that when the UI POSTS a command to change the color temperature, then the OH core (correctly) notifies both the new color temperature and color values, and then the UI wrongly POSTS a second command for the new color value. => This second POST SHALL NOT happen!

image

@andrewfg andrewfg changed the title Color / Color Temperature Widget sending wrong values Color Temperature / Color widget wrongly sends second POST for Color item Nov 3, 2024
@andrewfg
Copy link
Author

andrewfg commented Nov 3, 2024

@florian-h05 if you need it, then @toomtech has a Wireshark pcap that he can (perhaps) share with you.

@florian-h05
Copy link
Contributor

I think the root cause of problems here is #1268.

@andrewfg
Copy link
Author

andrewfg commented Nov 4, 2024

Yes. That issue has been open since 2022 so I am hoping it can finally be fixed.

@toomtech
Copy link

toomtech commented Nov 4, 2024

To chime in from a end user perspective, the issue in question makes it difficult to truly replace the hue app (at least in an ergonomic way) with OpenHab MainUI. The hue app itself is very annoying to use once you have more than one bridge to control and it's always nice to consolidate apps to interface with in general obv.

If you need anything from me please let me know. I really appreciate everyone's time volunteering on this, can't wait until it's fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants