wallpanel-android icon indicating copy to clipboard operation
wallpanel-android copied to clipboard

[BUG] - FaceDetection stops working after a while on Samsung Tab A7

Open TheQue42 opened this issue 2 years ago • 13 comments

Describe the bug After an unknown and variable number of hours, the wakeup-on-facedetection stops working, and I have to manually wake screen.

To Reproduce I can reactivate it by entering settings, and and performing a camera test. Then it starts working again, for a while. After a few hours, it will stop working again.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy Tab A7
  • OS: Android 12
  • AppV: 0.10.2
  • I am not using motion detection to wake screen, only facedetection, and no sensor publishing.

TheQue42 avatar Oct 18 '22 06:10 TheQue42

As additional info, I enabled the sensor publication yesterday. At first, it looked like that caused the camera/facedetection to work longer, but now this morning, its dead again. Checking the sensors for motion and facedetection, they do not react on any movement or person in front of the camera, so that is at least a minor hint that the fault is closer to video logic, and not just failure in waking the screen.

TheQue42 avatar Oct 19 '22 06:10 TheQue42

I also just noticed that I dont actually need to enter "Camera Test" to make it work again. Just enter settings==>"camera settings", and exit, and the camera is working again. Is it samsung that times out the access/handle to the camera once in a while?

TheQue42 avatar Oct 19 '22 09:10 TheQue42

It seems very similar to the bug I declared #39 .

It could be a regression from the MR #33 added in version v0.10.1.

Clement-B avatar Oct 19 '22 09:10 Clement-B

Quite possible. Today, I noticed the opposite. All sensors became unavailable, but facedetection still works. I had however changed the publication time to 90s from 60s, but I dont see how that would explain that all sensors become unavailable permantently

TheQue42 avatar Oct 20 '22 09:10 TheQue42

After restoring the timeout to 60 (sec, I hope), the sensors came back. But now this morning, the sensors are unavailable again, but facedetection still works.

TheQue42 avatar Oct 22 '22 04:10 TheQue42

And, I've noticed, after i started publishing sensors, and they fail, the mqtt-commands fail as well, and I am quite dependent on the mqtt-Speak/TTS commands. Is there any way I can provide additional debugging info? It clearly seems that the mqtt-code is somehow fracking up...

How about adding syslog output for logs?

UPDATE: I think this might have been in error, but I've been modifiying configurations/restarting etc so much that I cant be sure, but i DID have a fault in my own HA script for sending OUT the mqtt-speak/tts messages. But syslog is still a good idea :-)

TheQue42 avatar Oct 23 '22 06:10 TheQue42

i am using a tab a7 for a long time with wallpanel and as i can remember, this happens only since updating to android 12

this feature worked before, also with 0.9.x (no motion, only facedetection, and no sensor publishing)

t0bse avatar Oct 25 '22 09:10 t0bse

I've created PR #47 that should handle all MQTT disconnects. Before, only one particular type of disconnects would have been handled. My expectation is that this solves this issue but it doesn't clarify why the disconnects happen while using the camera.

FredericMa avatar Nov 01 '22 21:11 FredericMa

I've created PR #47 that should handle all MQTT disconnects. Before, only one particular type of disconnects would have been handled. My expectation is that this solves this issue but it doesn't clarify why the disconnects happen while using the camera.

thank you, but didn't fix it for me. still the same error as before. sometimes it's working for one day, and in the next morning, it crashed out of the app or it's not turning on the screen if a face is detected.

t0bse avatar Nov 07 '22 15:11 t0bse

I've also created PR #48 which will make sure that the CPU doesn't go to sleep if the screen is off so the MQTT connection remains active.

FredericMa avatar Nov 07 '22 19:11 FredericMa

The last release was superb when it comes to the MQTT connection failures, but the facedetection issue still remains, yes. Since for me at least, I can restore facedetection by just entering the camera settings, and exiting again, I wouldnt mind a workaround, that performs the same reinit once every hour, that is done during entering of the camera settings. Currently, my after entering camera settings, face detection works for plus/minus an hour, and then fails.

TheQue42 avatar Nov 14 '22 10:11 TheQue42

I've opened #48 a week ago but it hasn't been merged yet. That PR will keep the CPU alive when the screen is turned off (which I guess is also the case in your setup). I hope that one fixes also the issue you are facing. If that PR doesn't work I'm out of ideas and we might need to consider reverting the changes I made.

FredericMa avatar Nov 14 '22 10:11 FredericMa

I've opened #48 a week ago but it hasn't been merged yet. That PR will keep the CPU alive when the screen is turned off (which I guess is also the case in your setup). I hope that one fixes also the issue you are facing. If that PR doesn't work I'm out of ideas and we might need to consider reverting the changes I made.

can you send me a APK with this PR? i could test it.

t0bse avatar Dec 23 '22 09:12 t0bse