Tablet to control your smarthome with surveillance camera function
A main function in a home automation system is its user interface. Thanks to the low price and ease of use of tablets, they become the best for that. I would also like to dedicate a tablet to smarthome interface : this is for sure an added cost but it will remove a number of switches (with corresponding Zwave modules) and remotes to control heating, lighting and shutters. So I’m gaining money by buying a tablet (personal message 🙂 ).
This post will cover :
- the choice of the tablet
- Device configuration
- and a small conclusion
Beforehand let’s have a look to a video showing the result :
Choice of the tablet
I have selected an Archos 101Xs model (without keyboard) because of several criterias :
|At least 8” tablet
|Branded tablet : warranty, robustness, technical information availability||Archos. Procedure to root available|
|Very good price. We will use it 50th of time a day but only 10 seconds.||End of life of this modèle,very good price (149€)|
|No performance criteria.
Limited performance is limited for smarthome interface use
|TI OMAP 4470 dual core at 1.5 GHz. 1 GB of memory.
it’s too much ! 1GB is finally welcomed
|Good scree,in particular with wide viewing angles ( we will never be directly in front of it when tablet will be fixed on the wall at mid-height)||1280*800. Although it is not an IPS, viewing angles are correct|
|A correct front camera, with wide viewing angles, no back camera (to fix the wall ?)||No back camera. 1.3Mpixel front camera. Short viewing angle (~60 deg.)|
|A speaker not located at the rear, with sufficient loudness||Front speaker|
|Power supply through micro-USB connector, to use any kind of power adaptor||Ok|
|Bluetooth available, at least BT4.0 (Low power), maybe to have tablet acting as connected object hub in the future||Usb 4.0 inside|
|Available Options to keep tablet alive, although for wifi
A review of this tablet is available on Clubic. My feedback about the topics explained in this review are :
- screen sensitivity when pressed : actually you can have some halo if pushing hardly the screen. Now on if I wouldn’t have discovered the problem on Clubic, I would never have seen it …
- the housing is becoming quickly dirty , which does not bother me because once the tablet will be on the wall , we won’t touch it anymore
- camera quality : if brightness is sufficient quality is just OK . If light is lacking, quality becomes very poor ( horizontal stripes , colors disappear , lots of noise , etc …) . I will be obliged to turn the light on with home automation when using it … The viewing angle are narrow unfortunately, which is only correct for videoconference .
- speaker : the sound is actually pretty bad (saturation , limited bandwidth ) , which is not really a problem to provide automation alerts. Audio max volume is still too limited to be sure to hear alerts inside a house.
- weight : Tablet is heavy , maybe because of aluminum backplate . It will have to be correctly secured on the wall.
I mentioned it before, the viewing angles of the front camera are insufficient to see the whole room. One solution for that , is to find an old stocks of wide angle extender that can be adapted to the tablet. For example, this x0.5 cokin kit can be used on cameras, smarthpone and can be used on a tablet. The lens is magnetized, a washer is glued in front of the camera :
Be careful not to block a potential hole for the microphone that is located near the camera. Once mounted, the tablet looks like this:
This is your decision if this is acceptable or not. The magnetization is sufficient for the lens not to move, even vertically. It can still be removed, or drop on the ground if you strike it. The lens comes with a cover that can be put in place if you want to make sure noone will spy you without your acknowledgement.
With this lens the viewing angles are doubled, obtaining an approximate 120° viewing angle with this tablet :
Normal (60 deg)
With wide viewing lens (120 deg)
For home automation use it is necessary that the tablet remains lit as well as WiFi. For this we modify the tablet settings in “developers options” and wifi settings :
We will also need to activate a debug option when writing tasked scripts. This option displays superimpose on top left current tablet system settings: frequency of chips, temperature, etc …
This software covers almost all of my needs for a home automation interface. Some reviews in french are available on the internet regarding this application, here are the links:
- Imperihome: l’application domotique pour tout centraliser by maison-et-domotique
- Personnalisez votre domotique avec ImperiHome Pro by touteladomotique
Before talking about configuration, it is clear to me that the Pro version is well worth the price that is requested.
This pro version will allow for example to launch a scene from Tasker (see below) or removes restrictions about number of pages and their layout.
Regarding configuration, there is a feature I really like : this is screen wake up when motion in front tablet is detected. This features uses the camera, whenever you arrive in front of the camerao, the screen will wake-up. Therefore this function should be enabled.
Imperihome does not include a weather module, but you can insert a web page into an object, this is what I have done there. I’ve tested that integrating a web page is impacting stability imperihome, which can then be improved if activating option “Defer Loading of images”. Regarding the integration of weather information , I get the following result. You can click also on a day to have details on weather :
I used the website meteocity which, in mobile version, has a page layout that match correctly. The web link to configure looks like that (city reference to be changed) :
As you guessed, we will use Skype to do the bidirectionnal surveillance camera. This is an advantage of using a tablet : you see and hear what happens in your house, but if you activate the webcam and microphone on your computer or smartphone, they can also see and hear you.
It appears that Skype is having difficulties to take control of the tablet webcam if its main window is not active. This is at least the case in my setup. We will therefore ensure with Tasker that this window opens. We will see that later.
Regarding configuration SKYPE here’s what I recommend:
- Skype should automatically connect to the network at startup
- Skype should constantly appears in the tablet menu bar in order to be everytime active. It must be able to receive messages also
- Take care to confidentiality policies in order to limit access to contacts you have selected
- Here is the major function that will help us a lot : “Automatic answer to calls”
Tasker will enable the automation of a number of functions in the tablet:
- start or restart the main Imperihome interface after a certain delay depending on the active application (the application launcher also which is Android desktop)
- manage communication with Skype
Here are the different profiles and tasks I have at that moment :
Here is an example of a simple task that automatically restart Imperihome after a period of 30 seconds when another application is active (including the application launcher) :
Lastly the biggest part of the work : the script that enables surveillance camera function to work :
- Tasker detects when a skype window is opening , it launches then Skype application. The main skype page is then active, thereby taking control of the camera
- after a delay period, aa home automation scenario through Imperihome is launched to turn the light on
- It then waits for a condition on the CPU frequency of the processor to continue the script : if the frequency remains high it means videoconference is ongoing.
The frequency is dependent on the tablet used. The Android system option “Display hardware monitoring” will be very useful here to see the status of the CPU during and after the videoconference, and then set the threshold
- When the frequency have decreased, Skype application is killed
- Then we start a home automation scenario to turn the lamp off
- And finally Imperihome is restarted
I have discovered that the Skype app on tablet has some difficulty to answer to a call and activate the video every time . It may be necessary to initiate the call 2 or 3 times before everything works correctly. Bidirectionality of the video and sound gives some new ways to use it. Do you need to remind your children not to forget their appointment and make sure they really leave home ?
The video quality depends on the webcam tablet . This is in my case below a conventional IP camera . Nevertheless I don’t have the need nor the desire to buy an IP camera , given the amount of time I would use it.
Regarding the Imperihome smarthome interface, it is hardly happiness. Since I have added a web page for meteo, its stability has deteriorated a bit ( about 1 reboot every day) , but Tasker is there to ensure it restarts if necessary. Some features are still missing , but the developments are going very fast.
Tasker is finally a powerful tool , I think this post is an interesting example of what we can do with it. There is a short learning curve, but the effort will be rewarded.
ton installation impose une tablette toujours branchée au secteur. Cela va détruire à terme ta batterie. j’avais pensé brancher la tablette sur une prise connectée et de développer avec tasker un petit script qui permettrait de stopper la prise si le niveau de charge est supérieur a 98% et l’activer si inférieur a 10%. penses tu que cela sois utile ?
J’allais faire une réponse un peu longue, sur la gestion de la charge batterie, les PMIC (Power Management IC). Finalement ce sera plutôt court et ça pourra faire l’objet d’un futur article. Effectivement on disait auparavant que garder la tablette en charge a un impact sur la batterie. Il est aujourd’hui minime car les processus de charge de batterie dans les tablettes et smartphones sont très avancés et prévus pour éviter au maximum ce genre de phénomène. D’ailleurs je connais de nombreuses personnes qui gardent leur tablette en charge sauf quand ils s’en servent et cela n’entraîne pas de problème, cette contrainte est prise en compte par les fabricants. Quid des tablettes premier prix, pour celles-là je ne sais pas …
La réponse est ici (ou presque) : http://www.vrdigitalworld.com/electronique/les-batteries-li-ion-des-appareils-portables
Merci pour le tuto, je ne connaissais pas ce site pour la météo….
Pour la vidéo surveillance à la place de skype il y aurait peut-être une autre solution (l’application fonctionne très bien mais je n’ai pas testé avec Imperihome et tasker comme tu l’as fait avec skype). Tu as un article ici
J’avais lu l’article sur l’utilisation d’IP Webcam, j’avais fait quelques essais. Cette application permet effectivement de créer avec sa tablette un équivalent de caméra IP (mini serveur web, etc…). L’application active, celle affichée, doit être IP Webcam pour que la vidéo fonctionne. Sans parler de la caméra qui ne peut fonctionner, j’ai réessayé cet après midi : parfois le serveur web reste actif quand on ferme l’application, parfois pas en fonction de l’état d’utilisation de la mémoire par Android. Skype s’en sort mieux, il reste actif car il est présent dans la barre de menu.
Mais avec la configuration Tasker adéquate on pourrait également faire fonctionner IP Webcam comme cela : j’envoie un email (ou autre chose) –> il est analysé par Tasker –> Tasker lance IP Webcam –> on peut alors accéder à ses fonctions.