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.
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.
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?
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:
are your Hue bridge and OH server connected via ethernet or wifi?
do your Hue bridge and OH server have static or dynamic DHCP leases?
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).
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ā¦
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?
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ā¦
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?
@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,)