Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TheQue42 opened this issue Oct 18, 2022 · 13 comments
Open

Comments

@TheQue42
Copy link

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
Copy link
Author

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
Copy link
Author

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?

@Clement-B
Copy link

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.

@TheQue42
Copy link
Author

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
Copy link
Author

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
Copy link
Author

TheQue42 commented Oct 23, 2022

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 :-)

@t0bse
Copy link

t0bse commented Oct 25, 2022

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)

@FredericMa
Copy link
Contributor

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.

@t0bse
Copy link

t0bse commented Nov 7, 2022

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.

@FredericMa
Copy link
Contributor

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.

@TheQue42
Copy link
Author

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.

@FredericMa
Copy link
Contributor

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.

@t0bse
Copy link

t0bse commented Dec 23, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants