ANNEX.

A DIY Garage Monitor

This was a project that I did for my forgetful parents. They would often leave home only to call home, hoping someone can confirm whether they had closed their garage door.

Issues with Video Feed

I got myself a Microsoft LifeCam 3000 as it was on sale. Unfortunately, it only outputs in two formats (.yuv and .mpg) that are both unviewable on mobile devices. With the limited resources on the Yun, it’s quite difficult to transcode and stream. I considered hosting a separate nodeJS server. Unfortunately, the configuration requires time-consuming processes (about 20+ min) to allocate the necessary resources and even worst, the set up is wiped whenever the Linux side reboots.

Instead, I am now opting to use Xiaomi's Xiaoyi camera. A friend had told me that it the firmware has APIs to access the camera’s streams. Worst case scenario, if the RTSP stream can’t be embedded/encoded for mobile, my parents will have to settle with installing the Xiaoyi app on their phone. Not the worst solution out there - at least they can view a live feed, speak through the camera and receive motion notifications.

Hindsight: Lessons Learned

Working around the two processors on the Yun became a pain at times. I had to make sure that the Arduino side was fairly robust. That meant minimizing any processing done on the Arduino side and sending the information for portal's JavaScript to handle. From a basic security point of view, this is far from ideal. Not only is the JavaScript for the portal unobfuscated, but the more processing logic that is exposed, the more the information can be manipulated for malicious intents. Granted, this is a DIY project, it should be emphasized that this is not an alternative to a home security system.

Another reason I had to minimize processing on the Arduino side was that any communication to the Linux side required going through the Arduino Bridge. This meant that anytime the Arduino side got stuck, the entire board was useless until a reboot could be done. This is an issue since even a remote reboot on the portal couldn't get around this.

Another issue was the limited computing and memory resources available to the Yun. As mentioned earlier, I was unable to get the video feed working since transcoding video stream occupies a significant amount of resources. In addition to this, the availability of packages offered for Open-WRT and Linino distributions are fairly limited.

I decided that I will continue to tinker with what I have now. If I could revamp the project, there would be a couple things I would do differently. First of all, I would do this on a Raspberry Pi. I would be able to do all the processing (and in Python!) on the board and only provide the required information to the web portal. In addition to the improved security, the Raspberry Pi is much more powerful than the Yun's Linux processor. This means more packages and more freedom in finding workarounds for any development issues that may be encountered.