Hue items doesn't work after a time. No issue in the logs

What OH version are you on?

Your HTTP/2 session error may be a regression caused (for example) by a recent Jetty upgrade in OH core. The Hue API v2 binding was the first thing to implement HTTP/2 in OH, so the HTTP/2 client code was completely binding specific. However I have a suspicion that OH may recently have added HTTP/2 client code at core level. My gut reaction is that the changes in OH Core have banjaxed the binding. And as we are very close to the official release of OH 4.3 it is really important to resolve this issue promptly.

Iā€™m on OH 4.2.0

And Iā€™m also sure, that this issue is only on the motion things related. I have a lot of lamps, switches and plugs and all of them are working, except the motion things.

I canā€™t see those messages when the issue occurs. At least I didnā€™t see them

This discussions made me thinking about the vs code server plugin again. Iā€™ll try to uninstall it now to see if the issue disappears again. As wrote on Aug 11th. I already this this there and had no issue anymore. Two weeks ago I had a SD card crash and reinstalled my system. At this point I also reinstalled the vs code server. Maybe the main issue is the vs code server and results also in other ?unseen? issues. So Iā€™ll uninstall it now againā€¦

Andrew are you using vs code server? Maybe you are able to reproduce it when using that? Iā€™m running on a Pi3 within a docker container.

Edit: sorry itā€™s a pi4 not a pi3

Thanks,
Denis

No I donā€™t use it. But I will try to do soā€¦

Iā€™m on openHAB 4.3.0.M4.

Denis, what do you mean with VS Server Plugin? As far as I know I have nothing installed in OH and use only the VS-Code Plugin in VS. Are we talking about the same software?

Thomas

Ok. So I installed the OpenHAB ā€œrobust toolā€ plugin in Visual Studio, set it up to connect to my OH running test server, it is displaying the respective Things and Items in the sidebar, and I could open and edit a .rules file. So far I donā€™t see any errors in the OH logs. And I have a Hue motion sensor configured as a Thing with all its respective Items. => So what shall I do now? Just waitā€¦ or??


EDIT: while we are waiting, perhaps you can answer a few other generic questions as follows:

  1. are your Hue bridge and OH server connected via ethernet or wifi?
  2. do your Hue bridge and OH server have static or dynamic DHCP leases?
  3. do you have any firewalls running?

EDIT 2: just for information:

The connection between the OH Hue binding and the Hue Bridge is a single HTTP/2 pipe which is used for all state updates from Hue to OH and all commands from OH to Hue. So if the pipe gets broken then all traffic gets lost. And in that case the binding detects the error and re-establishes a new connection. Possible causes for the HTTP/2 pipe breaking are 1., 2., or 3. above (but there may be others).

By contrast, if only some events are being lost (e.g. only motion signals) then it means the HTTP/2 pipe is still OK but that a) those messages are not being sent from Hue to OH, b) they are not being received by OH, or c) the messages have changed their syntax so that OH cannot understand them any more. Only a log would tell us a), b), or c).

VSC does not talk directly with the binding, but rather with the OH core server; there is only a very indirect link between the VSC-OH traffic and the OH-Hue traffic.

But perhaps there may be another issue: Do you have anything else talking to the Hue Bridge? The bridge can support multiple clients in parallel (usually at least two ā€“ namely the Hue App, or Hue cloud, and the OH binding). But I can imagine that if you have many clients talking to the Hue Bridge at the same time, it may get overloaded. Are you running API v1 and v2 at the same time on one PC? Or are you running more than one instance of OH connected to the Hue? Or are you using also the Zigbee binding to talk to Hue devices?

The Hue bridge server has a limited throughput capability, and the documentation does specifically say that if rate limited, then it might compress multiple state changes into a single event. So for example a rotary dial switch does not send an event for every ā€˜clickā€™ but may compress them into one event with total number of clicks since last reported. And maybe (just maybe) a motion ā€˜off-on-offā€™ sequence might be compressed to just ā€˜offā€™ (or no event at all).

Yes just wait for it. In my setup it needs max one day until I see the issue.

Both devices on Ethernet meanwhile on my side. IPā€˜s are fixed. No firewall.

Ok. See my prior post again which I just edited to include a few more ideas and questions.

Fixed addresses and wired connection here too.
I had a second OH 2.5 running parallel for many month without any problems but disabled the bridge there last week. Without any improvement.
I will try to catch the error with logs tomorrow or when it happens next.

Running openHAB 4.x.x and code-server (for others: VS Code in the browser) on the same machine is not the best idea for a pi3. code-server needs lot of ressourcesā€¦

Vs Code installs the server automatically on the openHAB when connecting to the instance

Ok. So you think the pi could be overloaded? Iā€™m already thinking about switching to a pi5 with Emmc to get rid of the sd card. This would bring much more performance

Edit: Sorry that was a mistake. Iā€™m running on a pi4, not a pi3

No other connections except the hue App. And the hue app shows the motion events at every time. I donā€™t need to restart the bridge. Itā€™s every time fixed with restarting the OH instance. Maybe itā€™s really a general ?performance? Issue with pi4, OH4 and vs code server?

Edit: Or an issue in the OH core?

Yes, think so.
But i also have to say, I completely abandoned this, even I started the tutorial.
I do not use any file based config since long time, so no need for code-server anymore on my productive system. Just started using it again in a high powered VM for WebUI development. But thats a different storyā€¦

As I have a verry same setup, but have my VS running on my laptop, I would no focus too much on the code-server. Specially if you are not using it when the error occursā€¦ :thinking:

I have no idea if it is a performance issue. Or whatever. I need to see a log.

Iā€™m pretty sure that there is a relationship between both. Last time the issue didnā€™t occur again after uninstalling the server. But Iā€™m also restarting the OH instance meanwhile each time after I changed configuration using vs code.

Not using the vs code server alone didnā€™t solve the issue.

Can you please be more specific? There are two things ā€” namely the Language Server that runs on OH and the VS code plugin that runs inside VS. So is your problem about whether the Language Server is actually running or not? Or is it about the VS plug in talking to the Language Server?

Please see my post. code-server is a port of VS Code to run it browser accessible on your openHAB serverā€¦

@hmerk thanks for the info. Perhaps with your coding experience you can imagine some way that this server could prevent Hue motion events being received over an HTTP/2 socket, yet still allow Hue light events over the same socket?

(I myself can only imagine some kind of selective firewall filter based on packet contents. But itā€™s hard to imagine that your server could be doing that,)