HABPanelViewer 0.9.25

Tags: #<Tag:0x00007f1e6535cc00> #<Tag:0x00007f1e6535ca98>
(Volker Bier) #623

You can save an ImageItem to a file using the following rule and bash script:

rule "HABPanelViewer Picture Taken"
	Item ImageItem changed
	val outputFile = "/tmp/" + now.toString.replaceAll("[:\\/ \\+]+", "_") + ".jpg"

    //var String call_result = 
	executeCommandLine("/etc/openhab2/scripts/captureImage.sh ImageItem " + outputFile, 5000)

with the shell script being:

curl -m 10 --insecure -o - https://openhabianpi:8443/rest/items/$1/state | dd bs=23 skip=1 | base64 -d > $2

Edit: are you using camera API 2 when taking the pictures?

1 Like

(Jesper Lauritsen) #624

Cool, I’ll try the captureImage.sh :smiley:

Yes, I’m using the camera API 2. I’ve had a single crash today, and the panel probably snapped a 100 pics because of the changing lights with today’s weather. Later I’ll change my rule to only snap in some situations, so it is no too bad. The strange thing is that when the screen lights up and it snaps a pic, I see a message at the bottom that the front camera could not be found - but it snaps with no problem.


(Jesper Lauritsen) #625

Hmm, last evening I can see in the log that my Motion Item changed to CLOSED, and I did a SCREE_ON and snapped an Image. But after that I never received any changes on Motion, so the the screen kept on all night. A reboot was necessary today for the motion detection to get working again. No errors in any logs.


(Volker Bier) #626

Did you look into the adb log? You will never see HPV errors in any of the openHAB logs. And there is not much I can do without an adb log file. If you can grab one, open an issue in github and attach it.


(Jesper Lauritsen) #627

I’ll be away the coming days, but will look into it when I’m back.


(Marcin) #628


I have strange visual issue with HABPanelViewer. On my Nexus 10 (Android 7.1 Lineage but I have the same issue with other versions) I have black square on bottom-right corner. It appears after entered into Preferences or changed recent apps or minimalized and restored HABPanelViewer. Restart app restores normal view. Nexus 10 has high native resolution 2560x1600 maybe this is an issue.


(Aurelio Caliaro) #629

I have a quite old tablet with Android 4.2.2 (a Medion product for which there are no OS updates).
Instead of throwing it away, which is not very sustainable, I would like to use it for HABPanelViewer. HABPanelViewer is however limited to Android >4.4, so when I try to install it it fails (“Parsing apk file failed Maybe minSdk of apk is lower than current Sdk”).
Any idea how to make it run or doesn’t it work at all on old Androids? Is this limitation to >4.4 just a default setting when building HABPanelViewer (which could maybe be overrun by setting an older Sdk) or is there a rationale for this limitation?


(Volker Bier) #630

This looks like the preview area. Do you have camera preview enabled in the preferences? Which version of the app are you running?


(Marcin) #631

Camera is broken in Lineage Android for Nexus 10. I almost sure that camera is disabled in preferences. A black square appears only in some circumstances. I’ll check camera properties on weekend. Version 0.9.24.


(Sid Amos) #632

Camera issue #26 strikes again. I have added new information to that issue.


(Marcin) #633

Camera preferences are disabled and I have this text in preferences: “Camera is not available on this device”.
I can’t enter into this option.


(Volker Bier) #634

From reading on the internet, the camera on the Nexus 10 does not seem to work on Lineage starting with Nougat. It is possible that the app does not handle that case very well. As I don’t have a Nexus 10, I can not reproduce what happens. If you are willing to install some development apks and send me some adb logs, you can create an issue in my github project. I will then instrument the app in order to find out what is going on and hopefully find a fix for your device.


(Marcin) #635

Issue created with logcat.


(Manuel Sept) #636


I want to use the HabPanelviewer but have some problems in the implementation. Use currently a Samsung Galaxy Tab S3 and a Xido X111 but on both tablets I can not get beyond the display of the start page. Both devices indicate that motion detection is not available. Must always press the power button to get back to the HabPanel page. Come synonymous with the instructions not very clear is there assuming that you use a Smart Home Designer? So far I have only set up everything via PaperUI. Am absolute beginner!

Kind regards


(Volker Bier) #637

What does the app show in the camera section of the system information? Which version of the app are you using?


(Michael Ritterbusch) #638

@vbier I was going to update the Play Store tomorrow (been behind on this) with 9.24 unless you plan a new release soon?


(Volker Bier) #639

I currently have two open issues. I will release 0.9.25 when they are fixed.

1 Like

(Manuel Sept) #640

Hello, Version 0.9.22, flashlight control and motion detection will be disabled and connection indicator to temperature sensor will be disabled!


(Volker Bier) #641

If it is shown as disabled enable it in the preferences and enter an item for everything that you want the app to report to openHAB.


(Manuel Sept) #642

which presets? am an absolute beginner and where can I enter the items?