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.
Ah ok, understood, but unfortunately I don’t have a solution for this problem in mind…
yepp, this is why habpanel-filter addon was made
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/.
ProxyPass /rest/ http://localhost:8080/rest/
ProxyPassReverse /rest/ http://localhost:8080/rest/
As far as I know rest endpoint for event stream does not accept any parameters, so I do not think it is possible to filter it using proxy hack.
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?
Yes, @arctus you are right, those are not filtered because of lack of the “panelFilter” tag on them e.g.
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?
@arctus By the way, has anybody requested @ysc to implement habpanelfilter into habpanel?
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.
@ysc, perfect, that is exactly what is needed! now let’s hope that OH3 will come soon and won’t have a big migration headache like OH2 did.
Have these habpanel filter addons been placed in any official repository that I’ve missed?
The dropbox links for the 2.4 version no longer work and I cant seem to find the jar files anywhere.
I’m running OH 2.4 but I’m running the 2.5 habpanel filter for over a year now. Below is the copy I’m using, just remove the .txt from it.
org.openhab.binding.habpanelfilter-2.5.0-SNAPSHOT.jar.txt (19.3 KB)
Thanks for your response
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?