[SOLVED] HABPanel sluggish

I tried it. It stopped HABpanel working and seemed to cause other problems too.

Please, as it’s not particularly clear reading through the thread, can someone confirm the following:

  1. Does this work with stable release 2.4 ?
  2. If so, which two files and versions do I need and where are they ?

Thanks!

  1. I dont know.
  2. The link to the files are posted above (somewhere) in this thread…

I havn´t tried myself yet, (i´m on openhab 2.5M2). But I get the picture (understand the concept).

First of all, you need to understand what this “hack” is all about. It´s an alternative habpanel (modified original = “hack”). So you´ll have to uninstall the original one first, and then replace it with this new one.
When replacing, you´ll need to add the two files into your addons folder.
After that you need to set the “tag” to the items you want to filter. No tagging, there will be no items going through the filter. And therefore no items availble in habpanel.

Thats basicly it. (as far as I understand).
Notice - You may have to clear cache/tmp and restart openhab for it to work.
If it still doesnt work. You just make the changes back in opposite direction. Remove the two files, install original habpanel again. And you should be back to where you started.

This is suppose to be a simple “hack”. So I guess it should work with openhab 2.4.

1 Like

Thanks for the reply. I understand the process and believe I followed it correctly.

What I don’t know is whether it should work and the location of the two files. I’d like that information before I try again.

I know where to put them! I don’t know which two files to use.

Thanks. I’ll try again.

@Saracen
See the links in the post above where @arctus posted his files.

Drop those 3 2.4 ones into your addon folder. That’s all you need to do. Don’t recall if I restarted. Won’t harm if you do.

There is another set of 2.4 files listed above, I can’t remember where, which break HABPanel all together.

C

It works now. Thanks @sihui for the correct links.

I think those are the files I must have used the first time.

With over eighty posts in this thread, and many more in other threads, it’s easy to make such a mistake.

1 Like

Thank you very much @arctus !

This functionality should be part of the OH distribution for HabPanel for sure.

I have 3 android tablets on the walls with an item file that is 1,927 lines long and I only need 427 of them for my HabPanels. I have a total of 35 HabPanels because I have horizontal and vertical hanging tablets (different layouts).

This has been a HUGE help for performance from the tablet side, bandwidth and from the OH server side.

I hope you can work with @David_Graeff to get this part of the OH regular binding builds.

Best, Jay

2 Likes

Thanks, I do not mind helping to get this into the official build :slight_smile:

2 Likes

The best solution would be, if openhab would recognize the items itself, which are used inside the habpanel, so that we don´t need to put all the items in an addition group.

Would this be possible?

3 Likes

You know, that actually would be much better. Not sure how tough that would be and not to take away anything from arctus because the community is loving this

2 Likes

I’m not sure I ever thanked @arctus for this. It has definitely transformed the use of Habpanel for me.
Thank you!

2 Likes

Question does installing this erase created panels or custom widgets? If so how do you backup your panels prior to installing. Really want to try this out but don’t want to lose my panels.

No. You’ll be OK.
Handy to make sure a backup anyway.

@ysc - have you decided to merge the code yet?
Seems a game changer to me

As much as I appreciate the need for a solution and the fact that this one is working for some, my position is still this:

It simply cannot be merged as-is - in an add-on classified as a “HABPanel filter” binding, providing filtering capabilities to members of a hardcoded group and expose it as an alternative API - because it has virtually no chance of getting past a review by the add-ons maintainers:

  • First, on a conceptual level, it isn’t the purpose of a binding to provide an extension to the API. Of course it can be reclassified as a “misc” add-on but…
  • Second, they will likely say (rightfully) is that what needs to be done instead is to add/extend generic filtering capabilities to the existing API, for example as additional parameters to the rest/events endpoint (currently we’re only able to filter events by topic), then HABPanel and others can be modified to use it.

I have however merged two PRs recently which are supposed to improve the perceived performance, without changing the backend. You can download the .jar from the CI server (or use the latest distro snapshot) and report back if they help a little and more crucially if you see regressions, especially right after switching dashboards.

1 Like

Thanks you for the fantastically verbose and on point response - you are a legend.

I agree with you on the point of filtering against the API - especially on the hardcoded grouping. I do however feel that HabPanel could do with a native ability to fire requests straight against the API without a need for event tracking and status updates (I actually got onto this discussion, because I am trying to code an AV remote (Custom widget: Direction buttons) that uses Openhab as the backend for posting instructions to devices. (AngularJs http 'Get' in a function, hosted in HabPanel)

My exact scenario is that I want to be able to scroll through a menu quickly (down, down, down, down, down, down, down,) as button clicks on my remote and have every single click processed by Openhab, - If I send a series of down instructions to the API using Powershell, or Curl, they are all happily processed, but if I try button clicks in HabPanel, I miss about half of the clicks - I have several hundred items in my config, which I know doe snot help.

sadly, my AngularJS is terrible - else I’d build a script function on my ‘remote’ in HabPanel, that simply sends whichever click I am sending, straight to the old school API, rather than rendering it through the HabPanel refresh / event engine.

I don’t know the architecture beneath HabPanel, I am not quite sure why an instruction takes long to process - but if we are unable to amend the API for information gathering, it would still be nice to enable some extension to HabPanel that allows stateless execution of certain instructions? (e.g. a button click that is used for scrolling down a menu does not need any event tracking, as long as the selection on your TV screen changed?)

Irrespective, thanks for the hard work, I’ll try your enhancements for now, to see how much improvement they make.

If you’re doing things like ng-click="sendCmd('item', 'cmd')"in your widget it shouldn’t be relevant how many items you have, all it does is send the command request. You should open the developer tools of your browser, and check on the Network tab (and the Console) what’s happening, and how much time a request takes.
maybe replacing ng-click with ng-mousedown can help too.