HABPanelViewer

android
habpanel
Tags: #<Tag:0x00007fd311254568> #<Tag:0x00007fd311254400>

(Norman) #402

Additional Info:

It seems Problem 1 is not caused by your app. It seems to be caused by the latest openHAB update. I’ve placed a digital clock with seconds on my panel - it does not count seconds, it skips up to 2~5 seconds sometimes and after a few hours the clock stops completely. The tablet gets hot on the back side after a a few hours. So does my other tablet, so I can rule out a hardware problem.

I will restore my openHAB image from before the update and will report back after testing.


(Norman) #403

Nope, doesn*t work. Neither problems are solved. The panel loads normal and behaves normal for a couple of minutes. Then the skipping and lagging begins until, after a few hours, the panel freezes. I now restored the latest software versions. I am out of ideas.

The normal operation, eg. shutters, lights, motion sensor, data from my WiFi weather station are all working fine, like nothing has happened. Just habpanel behaves weird.


(Volker Bier) #404

Have you tried to reproduce the problem with chrome on your tablet? Does it show HabPanel correctly? If yes, it might be a problem in HPV. If not, try to get help from HabPanel experts.

Regarding the commands, have you put the server URL (without path, e.g. https://openhab:443/) into the Server URL preference? Does it show this URL in the upper part of the menu or does it show not connected?


(Volker Bier) #405

I have just released version 0.9.20 in my github repository. It mostly contains bug fixes for several bugs, crashes and an ANR (application not responding) and should fix all problems reported in the google play console that are not caused by native code (originating from the webview component or underlying driver code).

In order to avoid the native crashes, I have now disabled HW acceleration by default (you can activate it in the preferences). So in case you get crashes with HW acceleration turned on, please disable it and check that you still get the crash before reporting the problem here.

fdroid should pick up and build the new version in a few days, @miker will hopefully upload the new version to the play store as soon as he has the time.

0.9.20

  • screen state can now be reported to openHAB
  • user agent chrome version is now shown in status information
  • fixed several bugs and crashes

(Norman) #406

Hi Volker,

yes, I did try it with Chrome. I could not quit HPV for some reasons, it restarted immediately in a loop. So I reset the tablet to factory settings and installed Chrome. It is still running now for about 6 hours - working fine, still responsive and not skipping any seconds (so far). I will let it run until tomorrow to be sure. After that I will install HPV and test it.

And to answer your questions: yes, I did write the server URL into the settings - just that, not a path. It does not show “not connected”, so it is ok I assume. I double checked server URL and page URL - all correct. No matter what device I use (ancient Android, Android 4.4 until 7.1 - the commands do not work. The timestamp from HPV to openHAB does work nicely though.

I am using a AVM FritzBox as a router here, openHAB is connected via cable from a Raspberry Pi 3+ - I am using Z-Wave, Hue for my lamps and WiFi for my outdoor sensors. It is a pretty much standard network configuration, nothing fancy.


(Volker Bier) #407

@Norm, check the wiki page for commanding:

It has some instructions on how to validate that HPV can communicate with openHAB.


(Norman) #408

Hi Volker,

thanks for the link - this is exactly how I did this. I will re-check once more tommorow after my run with plain chrome. I’ll install your latest 0.9.20 after that and will report back.

Norm


(Norman) #409

Hi Volker,

here’s the result of my observations:

Commands are now getting through - it was my fault (me = Pappnase) - I used .postUpdate instead of .sendCommand. I changed it and now everything works.

I let both, Chrome and HPV run for about 8 hours. Chrome is still running and it is running without problems. No lag, no skipped seconds, all buttons responsive.

HPV on the other hand froze after about 6-7 hours. It lagged and button states were not updated. The tablet itself was fully responsive, I could start other apps or used HPVs menu. Only habPanel was frozen.

I restarted HPV from within the menue and all was running like it has never stopped. 3 hours later it began to lag again, skipping 2,3 or even 5 seconds at once.

Chrome is running perfectly, HPV not so much. Fully Kiosk Browser has the same problem.

I would love to run HPV so tell me how I can help you in solving the problem.

Norm


(Volker Bier) #410

@Norm, if both HPV and Fully have the same problem, than it is most likely caused by the underlying webview component. This is very old on 4.x tablets and probably has some bugs that might result in the behaviour that you are seeing.

And, frankly, there is not much I can do about it. You can try the following things when you have the problem and see if it makes HabPanel responsive again:

  • reload the page
  • clear passwords with the context menu (as this also clears the cache)
  • open System Information and go back
  • send command SHOW_URL about:blank followed by SHOW_START_URL

Or disable HW acceleration and see if the problem still occurs after some time.


(Norman) #411

Hi Volker,

why is Chrome working perfectly then?

And it doesn’t make sense at all, as I wrote in my initial posting: it worked fine with Fully Kiosk Browser for more than a year until the latest openHAB update. I will try what you wrote and report back.

I will also test my Android 7.1.1 tablet if it works fine or not.

cheers

Norm


(Volker Bier) #412

Because chrome does not use the system webview, but brings it own implementation of the rendering engine that is newer.
Most likely the bug in the webview component is triggered due to code changes done in openHAB.

Please also test with android 7. This should have an up-to-date version of the webview component, as it can now be updated via the play store (starting with Lollipop).

If nothing helps, you can send me an adb log. Maybe I can see something in there (but I would not count on it).


(Michael Joos) #413

Hi

I can confirm that old webview doesn’t work! I have a Amazon Fire HD 5th Gen…and it was not possible to use HPV because of the same problems mentioned above. Even the installation from Google Play Store didn’t help. It’s somehow in the system.
Fortunately there was an update available from Amazon…with new webview. And now running like a charme :+1:


(Alpoy) #414

Fantastic app! I’ve more or less replaced my imperihome solution for this! :grinning: The only problem I have left is that I can’t tap the screen and wake up the display…? (HPV running in kiosk mode)
Anyone know why that is?


(Volker Bier) #415

You need to send the KEEP_SCREEN_ON and SCREEN_DIM commands to the app. Have you done that?

@Norm: another thing you can try is installing the new version of the app, enable screen state reporting and then adding a rule that loads about:blank when the screen has been turned off and load the start page when screen is turned on. It may take a while until the page is loaded when the screen turns on, but it would be better than the current state.


(Alan Fenwick) #416

Please post any updated @Norm - similar issues for me.

vBier - great work. As soon as I can get past the refresh / hang issue… I will be a very happy man :slight_smile:


(Alan Fenwick) #417

Righto,

As it turns out, there is no new Rom available for my Android tablet (wall mounted)
I have a Galaxy Tab 4.0 7 (T230) and the latest ROM (official or unofficial) runs 4.4.2.

Any recommendations, since I am having the hanging issue, but love the habpanelviewer implementation.

Thanks


(Alan Fenwick) #418

OK, so my latest is.
As a test / stopgap I have installed Fully Kiosk Browser and run it for about 16 hours.
I have found it to be slightly quicker than HPV and have not had it hang on me at all (I am using Kitkat 4.4.2)

Whilst this is a positive outcome, I really would like to continue supporting guys who put so much effort into OpenHab.

I do think that what might be helping the stability of FullyKiosk is that it has an option to restart my page when idle, or when it exits from ‘sleep’ mode. So effectively, any time I retrn to the tablet, the data displayed has been regathered.

I’d imagine that this is quite easy to implement in HPV?
The added bonus of this is that static data (e.g. data that I am scraping from other sites, and not storing as native Openhab objects) - can be refreshed at set intervals

In addition, it has a premium option that should allow me to launch external apps (I am thinking Spotify / Plex Remote here)

Please do keep up the very good work, I will revisit occasionally - and will continue to feed back ideas that I have picked up from any other temporary solution that I use while I wait for this issue to be resolved (and / or replace my wall mounted tablet)


(Volker Bier) #419

@Norm, @bulletprooffool: I have just pushed a test version that drops the webview every time the main activity stops (screen goes off, app non longer on the main screen) and recreates it when activity is started the next time:
https://github.com/vbier/habpanelviewer/raw/webviewtest/app-debug.apk

It has some drawbacks (you can no longer send SHOW_* commands to the app while the screen is off, it always starts with the start page), but you can test if that helps. If it does, I can think about adding it to the regular version.


(Alan Fenwick) #420

Thanks Bier - will test as soon as I have a chance

Thanks
Alan


(Norman) #421

Hi Volker,

thanks a lot, I will run some tests with it and report back.

A shame there is no new firmware for my Acer Iconia tablet available. I am no programmer, so I dont know what I am talking about but is there a way to integrate Chromes webviewer component/API somehow with some voodoo power into your software? That would get rid of all the problems with older tablets.

regards

Norm