This extension uses the Camera to detect motion within the CameraPreview. A threshold can be used to set the sensibility of Detection. When a motion is detected it triggers an event, where you can set a Alarm sound for example like in the test aia. You can also trigger to take a picture automaticly. The Images are stored in the Documents folder. Have fun!
[Edit} Updated.
DjMotionDetect
A motion sensor using the device camera
Events:
MovementDetected
Triggered when movement is detected
PictureTaken
Triggered when a picture is taken
Parameter
Type
filePath
text
Methods:
SetupPreview
Sets up the camera preview inside a given arrangement
Parameter
Type
arrangement
component
SetCamera
Sets the camera to use. Use 'front' or 'back'
Parameter
Type
cameraFacing
text
StartDetection
Starts motion detection
StopDetection
Stops motion detection
TakePicture
Takes a screenshot of the camera preview and saves it to the specified path with timestamp
*** Tip for the Test Aia : When you switch to "photo" 2 Images/sec will be taken
and stored in your /Documents folder. Dont forget to stop detection when there
is heavy motion! ***
Thanks for your suggestions! I made a quick fix, removed "OpenCamera" as it wasnt needed anymore. I did some fix on the camera switch issue. Hope it works now for you. Updated first post.
The extension could still do with a method to unset the cameraPreview, and have the ability to restart it ? (It chews up the battery at 1% per minute...)
I am finding that "motion is detected" when I switch cameras ( I get the alarm ) even when there is no motion to be detected.