[SOLVED] HABPanel sluggish

I have the same problem. This should be fixed by openhab - not with a user-workaround. Best way would be, if someone could implement the workaround into habpanel directly.

Maybe some time this will be included in future. I hope so… :slight_smile:

Hi Pavel,

is there a more detailed “howto” for using your fix/workaround?

I only saw your small instructions and the download link in the other thread…

Is it only place the two addons into openhab-addons-folder, put all items, which will be used inside habpanel into the new group and that´s it? No more additional configs?

Where is the event-stream used in habpanel? Is this the events.log ?

I know how to place an item into a new group, but how can i move an event into a group???

Hi,

This is as simple as just using the two addons (habpanel and habpanel-filter) and putting all of the items that you want to the mentioned group. That is all, no additional config required.

Pavel

Edit:
2.5 binaries here: Dropbox - openhab-habpanel-2.5.zip - Simplify your life
3.5 binaries here: Dropbox - openhab-habpanel-3.1.zip - Simplify your life

That is the beauty of OpenHab - it is user extensible or changeable, eg I have 5 addons that I tailored because one thing or another thing bothered me with the actual implementation: Dainkin for polling for updates when a value is changed (for example you set a temperature and then it is set back quickly because of previous value is still on the ac), Yamaha for properly handling device linking and multi-zones and also those stupid “updated” statuses each minute and etc.

1 Like

Interesting, is your code available somewhere? Did you consider opening a PR with these changes?

1 Like

When switching dashboards HABPanel retrieves the whole list of items again (GET /rest/items) before displaying the widgets, this was a conscious decision to increase the reliability of the display, there were issues with state management when the SSE connection dropped at some point. This also gave opportunity for some widgets, notably the slider, to initialize themselves and perform initial rendering properly - they would display the wrong state or “flicker” for a split second.

It was an acceptable trade-off (delaying the display of the dashboard in favor of having a clean initial display) because the performance of this GET /rest/items was good even with lots of items; however it deteriorated in the last couple versions. It might be a good choice to revisit that decision again.

4 Likes

I’ll second the question. I don’t use any of those bindings but did you submit any of your changes as a PR?

1 Like

Thank you for the answer. Now I know (and hope for the habpanel-filter in a future official release :slight_smile: )

This change:

implements what I stated above. The dashboard switches are near instantaneous now, but I’m not confident enough to merge it yet.
If someone is interested in testing, feel free to apply this change to your fork.

Yes, I see this with dimmer sliders. I had to remove them because the performance hit was so great, even on a very powerful system, lots of memory and then using a recent IPhone, it was way to slow to be usable.

It would be great if there’s a more efficient way to do this and improve the speed of HabPanel in general. In my view it’s the best UI by far but could do with some performance improvements

Is there a precompiled jar with the changes? I would be happy to test it.

I would also be happy to test this, if there is a jar-file available.

I don´t use habpanel in my house till now, because it is so laggish… This is no good user experience with the long wait times. I have build a smart home with many expensive devices and then i would have to control it with such a poor speed. So i still use a combination of openhab android app and HomeHabit.

But i would be very happy, if i could use HabPanel as well, because this would be great on a big tablet on the wall in my living area. I already have some pages, but i don´t use them.

all of my changes are here: https://github.com/arctus/openhab2-addons
sorry, i did not submit the PR, however would be willing to do that once have time and you think it is useful for the changes that I did …

1 Like

I could provide a changed habpanel-filter and habpanel for 2.4 (as I am using this as 2.5 M2 is not stable enough for me), what version of openhab you use?

I’d be glad to test this; have 3 tablets on the walls and would love to increase the speed.

I’m just running OH 2.4 with some 2.5m1 bindings; nothing to do with habpanel.

Best, Jay

I´m on oh2.5 snapshot #1665 currently. My last snapshot update was on august 19th.

For which oh-version is your filter, provided in the other thread?

Does this infect when connecting to habpanel from a remote browser as well? (I have an Rpi running with Ubuntu and a browser to show habpanel on a 24" screen in resolution 1920x1080. It´s slow as hell).

Yes, this should help in this situation as well. I will provide the binaries over the weekend.

1 Like

these are the bindings that I am using on 2.4 (habpanel-filter and habpanel): https://www.dropbox.com/s/hy8kb2laphliqbn/openhab2-addons.zip?dl=0
I will try building habpanel 2.5 this weekend (good luck to me with that … hurray the mvn black magic)

to use: simply copy to the addons folder and you are almost done - just add items that you wish to use in the habpanel to the group named ‘Group_HabPanel_Dashboard’ (and do not forget to create the group itself). There is no need to add items that you won’t be displaying (meaning you can still use any items that you would be sending commands to in habpanel without adding them to the mentioned group).

let me know if there are any questions.

@arctus from my review and understanding of the rest API a call to [GET] [/items/{itemname}] when called to a group item will return all items which are part of that group in addition. So I am curious why the additional need of the custom rest api binding?

From my review this could actually be a very good solution. Modify the HABpanel loadItems(){} function to make a call to a user configurable groupname. This way all the user needs to do is create the group in there items and then add the items to that group? Am i missing something?

function loadItems() {
            $http.get('/rest/items/$insertvariblegroupnamehere')
            .then(function (data) {
                if (angular.isArray(data.data)) {
                    console.log("Loaded " + data.data.length + " openHAB items");
                    $rootScope.reconnecting = false;
                    $rootScope.items = data.data;
                    if (!liveUpdatesEnabled) registerEventSource();
                } else {
                    console.warn("Items not found? Retrying in 5 seconds");
                    $rootScope.reconnecting = true;
                    $rootScope.items = [];
                    $timeout(loadItems, 5000);
                }
                $rootScope.$emit('openhab-update');
            },
            function (err) {
                console.warn("Error loading openHAB items... retrying in 5 seconds");
                $rootScope.reconnecting = true;
                $timeout(loadItems, 5000);
            });
        }