What was/is the problem 2 about? (I don’t know this issue).
My main problem was the slow change between screens or long time waiting after pushing a button. And both problems have gone with my solution. The panel is much faster now. And item update still work with a reasonable delay.
As I have a lot of items, my main problem (besides the loading time) is that my tablet is not fast enough to process all the changes happening (process openhab event stream, also tablet gets very hot) and event stream needs to be filtered in order to reduce event stream only to events happening on filtered devices. So all in all, filtering not only item list but also event stream.
That’s fine that you solved your two problems with the habpanel-filter…
Unfortunately habpanel-filter did not work on my system as it depends on OH and after every new OH2 release modifications might be necessary. No habpanel-filter version was available for my OH version.
So I tried to find a solution solving my one problem and which is independent from OH and OH releases.
I don’t see any problem in having different solutions for similar problems, do you?
How do you filter events stream within habpanelfilter? As far as I understand, as you said, you need to filter both /rest/items and /rest/events. The proxy virtualhost seems to filter anything that is going to the whole for /rest/.
I’m not sure if I understand what you’re saying. That’s why I’ve asked what actually was done with habpanelfilter that is different from filtering specific items? What differs event stream? I just don’t catch it.
sorry for misleading in my last comment. What I actually meant is that habpanelfilter does:
Provide a filtered item list through a separate rest endpoint.
Provide a new event stream through a separate rest endpoint (that attaches to the openhab event stream and filters events based on filtered item list).
Hi, thanks for clarification. So if I understand correctly, to verify if proxy method works with event stream, would it be correct if I go to http://serveraddress:8081/rest/events/ and verify if only filtered items remain there?
Hm, now, the part of habpanelfilter that do this work, is this hidden in modified habpanel? How it is done?
I wonder if there is a way to index all the items that are provided in /rest/items and filter /rest/events by using this indexed item names. I have no idea how to do it, but maybe someone else knows it.
Also, with some modification, It should work if the filter tag would be part of the item/thing name, am I right?
this is done through habpanelfilter addon - it attaches to the openhab event stream and creates a new event stream (with new rest endpoint) that is filtered based on the group. HabPanel addon has only 2 modifications:
Change url for items and events (also as events are modified to send new state of the item, we do not need to query the rest items endpoint again as the current habpanel does).
SSE connection is reset and reconnected every 5 minutes.
I think he knows, but all in all - this is a hack and there are far more beautiful architectural solutions than this. So once a habpanel redesign is scheduled, maybe this should be taken into account.
There’s a new way of retrieving item states in OH3 (https://github.com/openhab/openhab-core/issues/1363) which allows clients to dynamically specify the items whose states to track, so HABPanel and other UIs should take advantage of it eventually. So each time to switch to another dashboard the SSE will only get the states of the items it needs, this will improve performance a lot.
I’ve now successfully got the habpanelfilter working, I can see the relevant items at /rest/items-filtered
I need to change the habpanel version itself though, are you just using the modified 2.5-SNAPSHOT from above in this thread too? When I tried to use the 2.5 version, habpanel started but I got lots of errors and my individual dashboards were listed but would not load their widgets. What do you use?