HABPanelViewer 0.9.27

No you got me wrong. All commands n Habpanel work and the item status is shown correctly, but I can´t send commands to HPV or get a status of the tablet. It says “nicht verbunden” instead of the URL under the logo

I don´t see the difference in the URL - I copy pasted your URL but with the same result. I don´t understand what can be wrong - its just one setting to make - the URL. Its also no problem to find it via the discovery.

So it must have something to do with the SSE but I don´t find anything to change.

BR
Daniel

The URL I posted in reply to your post is what HPV uses to subscribe the updates from openHAB when you set http://xxx.xxx.xxx.xxx:8080 as server URL and Command_Lenovo_E7 as Command Item. If it does not work in the browser, HPV will show “not connected”. Test
http://xxx.xxx.xxx.xxx:8080
http://xxx.xxx.xxx.xxx:8080/rest
http://xxx.xxx.xxx.xxx:8080/rest/events
Do they all give you a 404?

Do you have a reverse proxy in front of your openHAB instance? Does http://xxx.xxx.xxx.xxx:8080/start/index in a browser show you the selection of UIs?

@sidamos, I had forgot to push the changes, so you downloaded the same apk again. I have now pushed.

@vbier, the newest version can be configured without fiddling. Also, the new start item is working great! I’ll give you feedback about the camera tomorrow. Thanks!

Hi Volker

I tried all those URL with the following result:
8080–> slection of UI because start/indec was added automatically
rest–>
{"version":"1","links":[{"type":"habpanel","url":"http://xxx.xxx.xxx.xxx:8080/rest/habpanel"},{"type":"iconsets","url":"http://xxx.xxx.xxx.xxx:8080/rest/iconsets"},{"type":"voice","url":"http://xxx.xxx.xxx.xxx:8080/rest/voice"},{"type":"profile-types","url":"http://xxx.xxx.xxx.xxx:8080/rest/profile-types"},{"type":"extensions","url":"http://xxx.xxx.xxx.xxx:8080/rest/extensions"},{"type":"things","url":"http://xxx.xxx.xxx.xxx:8080/rest/things"},{"type":"discovery","url":"http://xxx.xxx.xxx.xxx:8080/rest/discovery"},{"type":"bindings","url":"http://xxx.xxx.xxx.xxx:8080/rest/bindings"},{"type":"config-descriptions","url":"http://xxx.xxx.xxx.xxx:8080/rest/config-descriptions"},{"type":"persistence","url":"http://xxx.xxx.xxx.xxx:8080/rest/persistence"},{"type":"items","url":"http://xxx.xxx.xxx.xxx:8080/rest/items"},{"type":"services","url":"http://xxx.xxx.xxx.xxx:8080/rest/services"},{"type":"inbox","url":"http://xxx.xxx.xxx.xxx:8080/rest/inbox"},{"type":"thing-types","url":"http://xxx.xxx.xxx.xxx:8080/rest/thing-types"},{"type":"links","url":"http://xxx.xxx.xxx.xxx:8080/rest/links"},{"type":"channel-types","url":"http://xxx.xxx.xxx.xxx:8080/rest/channel-types"},{"type":"sitemaps","url":"http://xxx.xxx.xxx.xxx:8080/rest/sitemaps"},{"type":"uuid","url":"http://xxx.xxx.xxx.xxx:8080/rest/uuid"},{"type":"habmin/floorplan","url":"http://xxx.xxx.xxx.xxx:8080/rest/habmin/floorplan"},{"type":"habmin/dashboards","url":"http://xxx.xxx.xxx.xxx:8080/rest/habmin/dashboards"},{"type":"habmin/rules","url":"http://xxx.xxx.xxx.xxx:8080/rest/habmin/rules"},{"type":"habmin/designer","url":"http://xxx.xxx.xxx.xxx:8080/rest/habmin/designer"},{"type":"habmin/charts","url":"http://xxx.xxx.xxx.xxx:8080/rest/habmin/charts"},{"type":"templates","url":"http://xxx.xxx.xxx.xxx:8080/rest/templates"},{"type":"rules","url":"http://xxx.xxx.xxx.xxx:8080/rest/rules"},{"type":"module-types","url":"http://xxx.xxx.xxx.xxx:8080/rest/module-types"}]}

events -->404
As I am a Mechanical Engineer, I had to google reverse proxy - so no I don´t think so.

My System runs Openhabian on a Raspberry Pi 3 and I havent changed anything that comes with the openhabian installation.

BR
Daniel

@vbier, which webview is HBV using, when there are multiple installed? I have an Amazon Fire HD 10, which has its own system webview but I also installed Chrome and Android System Webview from the Play Store. Same for my Nexus 7 tablet with LineageOS (see attached screenshot)
Look like HBV is listing all 3 of them in the info screen, but what is it using?

@Daniel_OH
There is something wrong with your openHAB installation, as /rest/events should be there. There was somebody else with your problem (but no solution), see here: Rest/events returning 404

@sidamos
HPV uses the only webview it can get from the system, the version is shown in the user agent. Which version that is depends on a number of factors: OS version, Developer Settings, installed Chrome version, …
See https://developer.chrome.com/multidevice/webview/overview

@vbier, OK, so if newer versions of the webview are probably more stable regarding widget updates, I will have to get rid of the Amazon webview.

What is the common workaround for widgets that stop updating? Send RELOAD every now and then?

BTW, camera works really well so far. No failure after several hours, yet. :slight_smile:

@sidamos, any news with the camera? Does it work more reliable now?

@vbier, it works much much better now. It has gone for days without camera error.

This evening however, I saw that one of the widgets was not updating, so I decided to send the RELOAD command to HPV. But it did not react. So I sent RESTART, also with no effect. So, I went to the tablet and opened the command log. Those last 2 commands were not there, but I saw a failed camera snapshot from this morning. The status information still said connected, so it is strange that it did not get the commands.

Then I closed the app and restarted it and it worked and reacted to commands again. I don’t know if anything that happened was related to each other. More logging would be good, I guess.

Edit:
Seems, I spoke too soon. Today it is not working well. Just tested again 4 times without success, all 4 entries grey in the command log, saying:

  • Vorschau gestartet and one other Text I forgot (I think it was Starting Camera)
  • Vorschau gestartet
  • No extra detail
  • No extra detail

After restart of HPV it works again.

Edit 2:
In case something starts acting up, do you want adb logs?

What is your exact usage scenario? Do you have motion detection running? Is the tablet on or off? How often do you send the CAPTURE_CAMERA command?
You can create an adb log, but i doubt that it is helpful. Most likely it will show a RuntimeException in a call to the camera API, which is not even documented. If you are willing to put some effort in this, I could create an instrumented version. But this will most likely not work the first time, so you will need to install several apks until i can see something. If I can see something at all.

@vbier, at the moment, I do not use motion detection, yet. The tablet is always ON. I am still in testing of everything, so I just send the CAPTURE_CAMERA command every now and then. I find it a potentially useful feature, but have not yet decided about how I will use it (through rules). I just think that it would be at least nice to know that it works reliable.

I am willing to do more testing, if it possibly helps. I just think that me reporting that it did not work on one occasion does not help much. Hence the question about logging.

@sidamos, I have created an issue for the problem in my github project, see https://github.com/vbier/habpanelviewer/issues/26.
I have already made some changes and posted a link to the test version in the issue. It would be nice if you could test if this works better for you (I captured 50 photos in a row without problems). And can we please continue communication regarding the problem in the issue instead of here?

@vbier, ok, testing now and will report into the issue. Thanks!

Hey @vbier, thanks for this great product. I like it!

Today, i got my new Trekstor Surftab K13 (Android 8.0). I figured out a Problem. With this Tablet it seems that KEEP_SCREEN_ON will not work. The screen will be activated but after 15 seconds it switched off. Is there any chance to change this?

Greetings Alex

Can you test if this apk fixes the problem:
https://github.com/vbier/habpanelviewer/raw/keepScreenOnOreo/app-debug.apk

Volker,
In my case your app brings the java.exe on my OpenHAB server up to 90% CPU usage.
Utilization is growing until it reaches max.
As soon, as I disable the app, the CPU utilization goes down to less than 10%.
Client: Samsund Galaxy Note 10.1 (2014), Android 7
Server: Windows Home Serve 2011, Oracle Java (191)
App: 0.9.22 from Google Play Store

I, am sorry but there ist the same problem with that apk. Should i create an logcat log? Thanks for your great work!

@Joerg_Schreiner, what does the openHAB event log show when the app is running? Do you see lots of updates?

@highspeedwotschke, an adb log might help to find the problem.

Hi Volker,
no entries in eventlog, but in openhab.log.
The issue seems to be related to this issue:


So it doesn’t seem to be a direct issue of the HABPanelviewer, but the viewer is causing the load in OpenHAB due to this issue (http-requests).

HPV only makes requests to openHAB to send values. These would show up in the event log as item changes. If you see nothing in the event log, HPV does not make any requests, at least in theory.