HABPanelViewer

android
habpanel
Tags: #<Tag:0x00007fd31346ce20> #<Tag:0x00007fd31346ccb8>

(Volker Bier) #61

I am running out of ideas. I also saw that I did not read your post thoroughly enough. I do not have the same tablet, but another 10 inch Samsung Tablet.

Can you try the new version and see if it makes a difference?


(Volker Bier) #62

I have just updated the app to version 0.9.4:

  • mDNS discovery is now only performed on first start (no longer when the server url is empty) and can additionally be started from the openHAB URL preference
  • the app does now allow to change the volume depending on an openHAB item. For this to work, the item has to contain a number in the range from 0…max volume. the maximal volume depends on the hardware and can be found on the application status information screen
  • in case of invalid certificates, certificate details are now shown

(Alex) #63

Hi, Now I made it to get it working. I Even the menu icon of habpanel was not visible it seems it was there… I swiped from left (not total left to not get the HabPanelViewer menu.) and got up the Habpanel menu.

Maybe a good idea would be to moke the App menu on the right instead of left to not interfeer with habpanel menu?


(Volker Bier) #64

I only use HABPanel in kiosk mode and therefore never had problems with accessing the menu. But as I am open to good ideas, I have pushed version 0.9.5. It now has the menu on the right side (with a setting to move it back to the left side).


(Volker Bier) #65

I missed a bug in version 0.9.5 that results in a new version once again:

Version 0.9.6

  • fixed crash on start (introduced in 0.9.5)
  • added dialog with new features that is shown on update

I should probably not release so many new versions, but as long as you don’t need any of the new features then just skip the versions.


(SiLeX) #66

I tested your application on my android 5.1.1 tablet. It starts without problems, discovery works nicely as well.

I am missing an immersive mode, though. I need the screen space and want to hide the soft buttons of android on the bottom of the screen.
Themes are not supported somehow, so habpanel looks boring and provides no feedback. It works on Google Chrome though.
The back light cannot be switched, too. But this is a complicated thing on Android as I found out.


(Volker Bier) #67

I can look into adding support for immersive mode.

What do you mean with themes do not work? On my screenshot you can see that I use matrix-theme. Have you added the css file in the HABPanel configuration? There is no special theme support needed, as all this should be done by the webview. Or am I missing something?

What do you mean with the backlight can not be switched? Does it not turn on? Does it not stay on? Have you configured the regexp correctly or are you using motion detection?


(SiLeX) #68

I must admit that was pretty vague. I assume my Webview version lacks some features. The HABPanel tiles are grey and provide no visual feed back nor rounded edges (Like the Pale Blue theme has). When going to the settings in HABPanel within that Webview, HABPanel tells me that Themes are not supported in this Browser where the Theme dropdown normally is.

I’ve configured a switch item to be the backlight switching item and changed the Regexp to ON. The item state is updated correctly within HABPanelViewer, as the status view shows. But nothing happens when turning the switch ON or OFF.

Usually I use Tasker with Secure Settings to turn the Display ON and a built-in Tasker method to turn it OFF (Lock Device). The functionality - even in Tasker - varies a lot between devices, so it just may be that my Android Version is not supporting the more recent methods of waking up or locking the device (a.k.a turn on or off the backlight).

As you seem to be very interested, I will provide you more information about my generic tablet device, as soon as I come home. I would love to help with making HABPanelViewer more compatible with older devices, like most cheap tablets are.

Thanks and I will post an update later.


(Volker Bier) #69

There seem to have been some updates in HABPanel, my version does not have a theme chooser. I will update HABPanel and see if I can reproduce the problem. AFAIK, if chrome can display it, HABPanelViewer should also be able, as they use the same rendering engine.

Backlight control only turns the screen on, screen off has to be managed by the android display timeout. I am a little bit suprised that this does not work, as I am using a temporary wakelock to turn the screen on, and that is the only way to do it that I know of (and exists from android 1).

You can write an issue for the backlight in my projects github and add the additional information there. Add (an excerpt of) the android log containing the time frame where the backlight should have been turned on. That might be a starting point to find the source of the problem.


(Volker Bier) #70

I have updated my HABPanel installation and can reproduce the theme problem. Unfortunately I also have several other problems now. I could as well reproduce the problem reported by @biobier, switching kiosk mode on and off no longer works and does now require a restart of the app to take effect. And additionally, the header is no longer shown when using the matrix-theme.

It looks like the new HABPanel theming engine needs custom css properties. These are supported by chrome/webview from version 49. So if you can update the android system webview to at least version 49, this should work as long as your tablet manufacturer has not replaced the webview component.

See this more detailed explanation and instructions on how to work around this: https://android.stackexchange.com/questions/139413/android-system-webview-installed-but-not-used-by-apps

Edit: I have now pushed a pre version that shows webview version info in the status information and uses immersive mode.


(SiLeX) #71

Just installed the com.google.android.webview package v61 from the play store. Unfotunately my tablet uses com.android.webview to as rendering engine. So I can confirm to still have the hard-coded, bundled Webview v39 by MPMan on my MPQC106i.

The device is not rooted, as the community support is quite limited for these low-end devices. I can’t seem to find another way to change it.

Not being an Android developer so excuse the question: Can you choose which rendering engine to use instead of using the hardcoded one from my framework-res ?

If of any interest for having an example device: This is mine.


(Volker Bier) #72

I not an Android developer either, I started only 2 months ago. But to my knowledge the webview implementation is not selectable by the app. Starting from Android 7, the webview implementation that is used by apps can be selected in the android developer options. But this won’t help you, I’m afraid.

There is not much to be found on the internet about your device. Looks like I can’t help your there.


(Volker Bier) #73

Version 0.9.7

  • add webview version info to status information
  • use immersive mode for webview
  • changed “Allow Scrolling” preference to “Prevent Dragging”. Changed default behaviour to allow scrolling
  • fixed toggling of kiosk mode with 2.2-snapshot of HABPanel
  • add preference allowing to control whether screen shall stay on as long as regexp matches
  • disable uploading of anonymous diagnostic data to Google by the webview

(Tommy Hagenes) #74

First of all, very nice app. This is what i have been waiting for before implementing it on my installation.
I only have one drawback now, i cant see my cameras :frowning:

When will it have support for image.jpg that updates ever 1 seconds?
Or should it already work? Works fine in openhab app, and other browsers.


(Volker Bier) #75

I am not sure what you are talking about. In order to be able to reproduce your problem, you have to provide some more details. How do you show the image in HABPanel? Do you expect the image to come from the tablets camera?


(Tommy Hagenes) #76

I have 3 IP cam.
In openhab i can see them in the app using image url with refresh=1000
This also work with Habmin (maybe not in all browsers)
Image url=“http://username:password@IPadress/tmpfs/auto.jpg” refresh=1000

This seems not to work in you app, have tried with phone and two different android tablets.


(Volker Bier) #77

I have just added an image widget with a refresh interval and had a script running that copied an image to my webserver dir every few seconds. This worked on my phone as well as on my tablet. Are you sure you have 1000ms instead of 1000s refresh?


(Tommy Hagenes) #78

Yes, the settings are ok. I just get the broken image link.
I see that in firefox it works fine, but not in internet explorer/samsung standard browser or the app.
Maybe its because of the syntax with usernam:password@ip?


(Volker Bier) #79

Cause of the problem is that webview/chrome does intentionally block subrequests with basic authentication: https://www.chromestatus.com/feature/5669008342777856. Do you have a possibility to get rid of the username/password in the url?


(Tommy Hagenes) #80

Ah, ok.
In fear of going off topic, but still related to the image problem. Can i show a image from c:/picture/picture.jpg? Or does it need to be inside of openhab folder? This is running on windows.