Big Software Refactor; Motion Selected

A project log for Garage Security

A front-end to the Raspberry Pi that uses the NoIR camera & GPIO for remote residential door control

DeckerEgoDeckerEgo 08/22/2014 at 04:120 Comments

I'm in the middle of refactoring the entire software base... er... just because. The Python code was becoming a bit of a tangle, and I needed to sharpen my Reactive/Scala/Play skills. There is now a "PlayRefactor" branch in the GitHub repo that is a re-write of the web application that hosts the JavaScript webcam, Google Hangouts notifications and GPIO button presses.

I have re-introduced the Motion subsystem as well; in general it was more flexible and easier to deal with than streaming video to the webapp itself. HOWEVER - this means that nearly all the memory of a Model B Raspberry Pi is consumed between Apache 2, Java and Motion. In fact, you have to start the webapp before the motion subsystem otherwise motion's memory consumption crowds out the JVM bootstrap.

I don't want the JVM move to be a boat anchor however - I'm targeting support for running within 256 MB of RAM using a Model A. If that doesn't work... I may just have to move back to Python.