Tablet with surveillance camera function and picture recording (part. 2)
I’ve already described a solution to use the camera of a wall tablet in real time (refer to post Tablet to control your smarthome with surveillance camera function), I’d like to add a picture recording function like those available on a security camera.
In smarthome controller side, cameras are managed natively by eedomus solution, so it’s easy.
Regarding tablet side, the proposed solution is integrating with imperihome and is using Tasker to configure actions.
Thanks to Tasker it will be possible to create complex scenarios when movement is detected : switch on backlight, then start imperihome, wait 1 minute, then start a photo slideshow if no more movement, then wait 3 minutes before switching off the screen.
We need to create a new peripheral to add an IP camera. Needed peripheral type is under “Add another type of camera” .
Then select “Camera other”
When created, parameters related to FTP server, user, password when be shown and can be copied into Motion Detector app.
Visualization interface is quite quite good, as is reactivity for the Web interface but also Android App. There you can access to full picture history.
A filter can be used to display pictures with movement or people on it. Those two filters are not really working correctly. In my case people detection is not working at all. For sure it’s possible to deactivate those filters to see all shots.
You can see on above snapshot, that mean luminosity of the picture is computed also. This value can be used like other peripherals and in particular can be integrated in configuration rules. We have then a bonus with a new luminosity sensor !
Tablet side installation
Testing several apps I’ve selected Motion Detector app available on Google Play developed by Emparador. Compared to others this apps have several advantages :
- app is constantly active although it is not in full screen. It is available in notification bar.
- app includes a movement detector with a tunable sensibility and detection zone that can be changed
- images can be recorded when a movement is detected and / or with a regular time interval
- pictures can be saved in multiple ways ( local, ftp, http, …) and ftp mode is working perfectly with eedomus servers
- app can integrate with Tasker (or other apps) :
- it sends a message when a movement is detected
- tasker can activate or deactivate the motion detection by sending a message
World is not perfect, Motion detector is missing a feature to enable or not recording of pictures but keeping active messages sent to Tasker. Motion Detector app author seems however open to adding this feature in a next version.
Motion detector configuration
Configuration is done in 2 menus. There are many parameters by user interface is clean.
In the first menu we have the following parameters to be configured to have it working in my case :
- Picture : To be activated to send shots.
Apart option date & time recording in picture exif parameters, I’m not using the other features related to picture treatements.
- Picture Quality : Low or Medium to be selected. High level seems to create quite big picture files.
- Upload : To be activated to send images to a eedomus FTP servers
FTP parameters can then be configured also with information available in eedomus interface (see above)
- Signal : Add a sound when motion is detected.
My proposition is to select a laser saber sound : children like that the first 5 minutes … then you can deactivate 😆
- Notification Send : To be activated to send an intent message to Tasker when motion is detected
- Notification Receive : To be tagged to have tasked being able to activate / deactivate motion detection
Other parameters are available in a second menu. You can enter in it by pressing Detector option in first menu. Here are the changes I would propose :
- Detector Delay : 1 second
No reason to delay motion detection activation
- Detector Suspend : 30 seconds
I have then a minimum time of 30 seconds between 2 shots
- Detector Sensitivity. You have access to this configuration panel :
- Start by changing Detector resolution : 1 x 1 is giving the lowest sensitivity, 10 x 10 giving the highest one.
2 x 2 is working well with 1280×960 pictures
- Then fine-tune sensitivity with Level of Sensitivity cursor
- Detector reduce : I’ve put 150ms
Increasing this time is reducing CPU load used by motion detector. Use of other apps (Imperihome) is then more fluid.
- Trigger Counter : Keep it to 1
- Trigger Expiration time : Keep it to 1 second
- Trigger interval : Select a value of 500 ms
- Camera Select : In a wall tablet use, front camera seems to be the best choice…
- Camera résolution : available options are depending on your tablet’s camera resolution.
In case of Archos 101XS, I’ve selected maximum resolution which is 1280 x 960
- Camera Exposition : you can change picture exposure there with real time result feedback. The selection cursor have a strange behavior, non linear on my tablet, do not hesitate to test several position of the cursor to find the best one
- Camera zone : To define zone in picture that will be used for motion detection analysis
- Other, Autostart : To be enabled for sure to start detection as soon as app is launched
- Other, Notification : To be enabled for sure, for motion detector to be constantly active
What about image quality ? It’s in par with embedded camera quality. Here is what I have using an extra wide angle viewing lens and image quality put to low.
Imperihome also have a motion detection feature by using the camera. A single app can have access to camera at a time so we have to deactivate that feature in Imperihome.
Firstly Tasker have to react to a motion detection message. A new profile is to be created which is sensible to intent message “org.motion.detector.ACTION_GLOBAL_BROADCAST”
I’ve adde a second condition about application in use to react differently depending on it but this is optional.
Let’s have a look to the task “Mouvement Imperihome” that is launched. This one is integrating those action :
- (re)start Imperihome
- Forcer active mode during 5 minutes.
This feature is available if installing free Tasker Extension “Secure Settings” available here
- Put the backlight to maximum luminosity
- Keep Imperihome active during 1mn40
- Then stard slideshow app
- Slideshow is going on during 3 minutes
- then reducing luminosity of backlight
- when screen is off restart imperihome to be sure to have vocal alerts to work correctly
The task must have to be correctly configured also to have it stopped then restarted when a new motion detector message is received. Configuration is accessed through icon available on bottom right of the task screen. “Abort existing Task” mode have to be selected.
The way of working of motion detection is perfect : pictures are correctly recorded, reactivity of tablet when motion detected is good, and scripts is doing fully its job.
Image quality is only average with my tablet, but that’s enough for me. It lacks however a night vision mode like the one on security camera. There is no infrared led lighting on a tablet, then pictures are not usable during the night, nor twilight. We can imagine however using the screen as an extra light source by displaying a white zone. It will the subject of a future post.
Super…. comme d’habitude 🙂
Merci pour le partage 😉