Releases: adix992/ViewAssistCompanionApp
Releases · adix992/ViewAssistCompanionApp
0.9.2face
This upgrades the camera's motion detection system by replacing the pixel-based AggregateLumaMotionDetection with Google's ML Kit Face Detection.
The previous implementation relied on pixel changes, which could trigger false positives from shadows or pets, and relied on Home Assistant's 20-second timeout to clear the sensor. This update makes the tablet highly accurate at detecting actual human presence and makes the sensor instantly responsive.
Key Changes:
- Added Google ML Kit: Integrated
com.google.mlkit:face-detectionvia the version catalog. - Refactored CameraBackgroundTask: Swapped the legacy luma detector for ML Kit's
FaceDetector, processing theInputImagedirectly from the camera frames. - Instant On / Instant Off: The app now fires a custom
faceStateChangedevent. It sendstruethe millisecond a face enters the frame, and explicitly sendsfalsethe exact moment the face leaves, bypassing the need to wait for Home Assistant's timeout. - Heartbeat Ping: To prevent the Wyoming integration's 20-second auto-clear timer from turning off the sensor while a user is actively looking at the tablet, the camera now sends a
trueheartbeat ping every 10 seconds (MOTION_INTERVAL) as long as a face remains in the frame. - Updated Routing: Added the
faceStateChangedpayload router inBackgroundTask.ktto seamlessly pass the new boolean states to Home Assistant.
Testing:
Tested locally on physical hardware connected to Home Assistant. The Wyoming sensor instantly triggers when a user approaches the tablet, stays active continuously while the user is present, and immediately clears when the user walks away.