HABPanelViewer 0.9.27

@steffe, can you create a ticket in my github project and attach an ADB Log?

@neil_edward, check if you have disabled all energy saving settings for HPV, check that you have set WIFI to stay on when screen turns off in the system settings.

You can see if motion has been detected in the System Information Screen. Open it via the menu, let the device go to sleep and move in front of the camera. If you then wake up the device, you should see that the motion detection counter has increased. I doubt that the camera is put to sleep, but who knows.

The System Information also has connection statistics. This should show if the WIFI connection is gone after the device has turned off the screen. Or you can use the connection indicator item, which is updated cyclicly by HPV. If it remains constant after the device has been turned off, then most likely the WIFI has been put to sleep.

For both things remember to wait the 30 seconds after the screen has turned off.

Thank you for the prompt reply.

I can confirm that wifi is set to stay on and and with the screen sleeping numerous times (and woken by pressing the power button) the ‘running for’ and ‘online’ times match, ‘offline’ shows zero.

Motion is being detected as the count is incrementing but not if i dont activate it withing the initial 30 seconds, when it goes to sleep. The command log doesn’t show any commands issued either when the screen is sleeping and motion is activated after the initial ‘window of opportunity’. It then shows a SCREEN_ON after i have pressed the power button to wake the screen.

Here is my rule

rule “HabPanel_Test Screen On”
when
Item HabPanel_Test_Motion changed to CLOSED
then
HabPanel_Test_Command.sendCommand(“SCREEN_ON”)
end

rule “HabPanel_Test Screen Off”
when
Item HabPanel_Test_Motion changed to OPEN
then
HabPanel_Test_Command.sendCommand(“ALLOW_SCREEN_OFF”);
end

Regards,

Neil.

A new discovery with regard to my issues. If i have Day Dream enabled in Android, motion detection works 8 times out of 10.

I also think that something is wrong with motion detection. Simultaneously I had active two triggers, one based on proximity sensor, second on motion and Rules similar to above. Proximity works correctly but motion only once after HPV restart. I checked it in logs. I would also eliminate saving and WiFi as issue because I as mentioned, proximity works always

@neil_edward, does it make a difference whether you use camera API 1 or 2? Which OS is running on your device? Can you grab an ADB log?

@9mateusz, can you look into your event log if the contact is opened again after it is initially closed? It is only opened when the motion detection does not detect any motion for one minute. Only after that detection will trigger a new motion event. So if you want to test if detection works, leave the device alone for more than a minute, check that the contact is OPEN in the openHAB event log, then move in front of the device and check if the contact has been closed (or the screen turns on).

On this particular tablet I don’t have a choice on the camera API as its running Android 4.4.2

I dont know how to get and ADB log im afraid, im not a developer. Is it easy to do?

Kind regards,

Neil.

I tried to reproduce the problem but could not. It works on my devices either with API 1 or 2.
But I do not have any device with android 4.

Is there anybody else that uses HPV with motion detection on an Android 4 device?

See the first answer here on how to get a log file:

Edit: @neil_edward, when you used the SCREEN_DIM command, did you have automatic brightness enabled in the android preferences? If yes, can you test again after disabling this?

Hi,
I need some help with CAPTURE_CAMERA. I can’t get it to work.
The command log shows the CAPTURE_CAMERA command in yellow?? (command is not known)

I’m running version 9.22 on Tablet Nexus 9, android version 7.1.1
All app permissions are granted + device administrator
Am I overlooking something?

Have you added Item Name and JPEG quality as Parameters?

Edit: just saw that quality parameter is optional.

Yes I did.
Created an Image Item in OH and I am using that one as parameter

The pattern that is used for the command is this one: “CAPTURE_CAMERA (\S+)( [0-9]+)?”, which means you have to have exactly one space between CAPTURE_CAMERA and the item name, no leading or trailing blanks.

OK found it! My stupid mistake. Forgot to include brackets :flushed:
Sorry.

im using this with a samsung galaxy tab s 10.5 inch. its about 4 years old.
it has a proximity sensor, but in the settings it greyed out.

Also i cant get motion to work consistently
it will update the contact once. Then even after a minute it wont update.
I have to restart the app before it does anything.

Enable the preview, it shows when motion is detected. If that does not help, describe in more details what happens (i.e. what is the contact state)

Motion is working. I was able to tweak it yesterday. But what happens is. Motion detected. After a minute screen goes to dim using the rule SCREEN_DIM. after that motion is not being detected anymore. Only when screen is on.

Kinda defeats the purpose of motion detection

Also any idea why I can’t use the proximity sensor in the tablet. It’s greyed out

Have you disabled power saving for HPV? Is you WIFI still up when the device screen turns off? Is the app still connected to openHAB when the screen is dimmed?

No idea about the proximity sensor. Are you sure it actually has one? Samsung specs say it hasn’t:

Sensors: Accelerometer, Fingerprint Sensor, Gyro Sensor, Geomagnetic Sensor, Hall Sensor, RGB Sensor

That is from this page; https://www.samsung.com/uk/tablets/galaxy-tab-s-10-5-t805/SM-T805NTSABTU/
Or is this the wrong device?

No you might be correct sorry about that. I just had a quick look online and found it was offering me a proximity flex cable replacement so I assumed it did.

Also. I’ll have to check everything else out and see about the motion. So definitely it should work with the screen dimmed? What about with the screen off from Android.

Is it somehow possible to change the displayed HabPanel from rules?
Like sending the URL to the device or somehow… If not, would not be a great feature to implement?
I’m going to install my wall-mounted screens and would be great if I can use HabPanelViewer (which seems really nice), but this feature is missing.

@Christopher_Hemmings, i cannot speak for Others, but it works for me when the screen is off.

@rkrisi , is it missing?