HABPanelViewer

android
habpanel
Tags: #<Tag:0x00007fd30ead7238> #<Tag:0x00007fd30ead70f8>

(Frederic Mariën) #342

Thanks for your info. I’ll do some further checks on that.

I did notice a crash of HPV this evening.
When I restarted my OpenHAB instance, HPV did not reconnect when it was back up and running.
HPV looks normal and keeps displaying the state from before the restart.
Once I try to interact with HPV or try to open the menu, it doesn’t respond and after a few seconds I get the message that HPV has crashed.

I have the setting “Track Browser Connection” checked.

Was this something you also noticed from the app crashes you’ve seen in the play console?


(Volker Bier) #343

I can not see what users have been doing in the log, so it is hard to tell if this is a problem I have already seen. If you can reproduce it, grab an adb log and create an issue with the log attached.
You can also try if the app linked to in the first post works better, it is built from the current development state which contains fixes for some of the crashes. But you have to uninstall the play store version before.


(Frederic Mariën) #344

I tried to reproduce it and create an adb log but it appears to be a bug that all programmers love the most…
One that you can’t reproduce when you want to…
I tried to reboot OpenHAB several times yesterday and today but hpv reconnects as expected.
Is there some way I can get some information out of the android os about previous app crashes?
If not, I will try to reproduce it now and then, but for now, you can ignore it in that case.


(Frederic Mariën) #345

Yesterday, I rebooted OpenHAB to test something else and guess what… hpv crashed.
I couldn’t get a log file since the tablet was not connected to my laptop.
I had to option to send feedback and include the system log files so I added as a comment “Crash after openhab restart”.
Is this something you can view play console this way or who is receiving this feedback?


(Volker Bier) #346

I can see a crash on a Oneplus3T with Android 8 at 21:55. Is that you?

Edit: you can still fetch a log after the crash. Just connect it then and pull the log. The log is written all the time android is running, the adb command just retrieves the log file from the device.

Edit2: I do not get those logs, they will only be used by google to improve android. See https://android-developers.googleblog.com/2010/05/google-feedback-for-android.html


(Frederic Mariën) #347

Oh ok, then I will get the log files tonight.
Such a shame that only google is getting these log files.
FYI it is a Lenovo Tab 4 running android 7.1.1 and it was somewhere between 20:30 and 22:00


(Frederic Mariën) #348

I’ve successfully reproduced the issue and I was able to collect the log file.
You can find the log file here: https://pastebin.com/saS6q3WX
These are the steps I took:

11:35:46.408: I restarted OpenHAB

± 12:13:25.667 : I tried to open the side menu but this didn’t do anything. Nothing showed up. I also noticed that items on HABpanel itself weren’t refreshed anymore. Next I swipped from bottom up to show the toolbar with the previous, minimize and applist buttons (don’t know the exact name). When I swipped up, the crash popup appeared.

I hope this can help to find the root cause?

I’ll be out of town from tomorrow on for a week so if you want me to test something, I will be happy to help you somewhere next weekend.


(Volker Bier) #349

Just had a quick look. Looks like the app did not crash, but was unresponsive and thus has been killed by the OS at user request. The log shows that some info has been written to /data/anr/traces.txt

Can you paste that, too?


(Frederic Mariën) #350

Thanks for your quick reply!
You can find the contents of the traces.txt file here: https://pastebin.com/CLyTCADp


(Volker Bier) #351

I wrote an issue for the problem:

Edit: Okay, I have fixed the problem. Please try the apk file linked in the first post and see if you can still make HPV hang when restarting openHAB.


(Daniel Linder) #352

Hi,
I was just experimenting with displaying Items statuses in HABPanel Viewer.
I am using the “Dummy” item in HABPanel. Whenever the item (String) is upated, the update is instant in HABpanel (in Chrome) and Classic UI. However in HABPanel Viewer there are delays ranging from seconds to minutes.
Does anyone have any clue about what could be the issue?


(Frederic Mariën) #353

Thanks! If can help you with something I’ll be happy to help next weekend.


(Volker Bier) #354

I am simply using a webview (which is the rendering component used by chrome) to show HabPanel. There is no additional code in the browser component which could slow down visualization, so I am not sure what the reason might be. Is the app responsive when it does not update, e.g. can you pull open the menu?

Does this happen when the tablet screen is on and the app is showing?


(Gerhard Riegler) #355

Hi @vbier

Is it possible to create a hpv-debug.apk from the current master?

I have some troubles with my tablets, they crash by accident. Sometimes after a few hours, sometimes after a few days. I need to start it with a long press on the on/off button.

You’ve fixed some bugs in the master, maybe it works better now. I would be surprised, however, that an app can completely crash a tablet. So I think it’s something else.

Thank you!


(Volker Bier) #356

It is linked in the first post.


(Daniel Linder) #357

Thanks for the feedback.
For some reason the viewer does not refresh very often.
However Chrome does…
I do not know whether this is due to the app of something else in Android. Is there some kind of refresh setting somewhere?

Also, normally the app stops running in approx. 24 to 48 hrs. It stops responding to input, and I have to reboot the tablets (Huawei T1 10, running stock Android 4.4.2).


(Volker Bier) #358

Try the apk linked in the first post, and provide a log file in case it still crashes. Otherwise I can not help.


(Rob Pope) #359

Right, I’m going to try and get the motion detection working now I’ve got a break from some other projects.

Here are my items:

//Kitchen Tablet
Number  Tablet_Battery_Level    "Kitchen Tablet Battery [%d %%]"
Contact Tablet_Motion_Detected  "Motion Detected [%s]"
Contact Tablet_Is_Charging      "Kitchen Tablet Charging [%s]"
String  Tablet_Control          "Kitchen Tablet Control"

The settings are red, I’m sure it used to turn a different colour when the item was found


But nothing is set in the sitemap
image

What am I missing?


(Volker Bier) #360

Is the app connected to openHAB? Does it show the server in the upper part of the menu or “not connected”?


(Rob Pope) #361

RTFM Rob, RTFM :wink: I’d put the full habpanel path into the URL box. Changing it to be just the server address resolved the issue. Thanks!