Home Security System
Previous Next Table of Contents
A while back I started a Home Security project. After examining several different approaches, I settled on Beaglebone Black for the hardware, programming with Python and presentation using Kivy.
After much work on Kivy, and continuing issues with the Linux Angstrom that was on the Beaglebone, I came to the conclusion that it just wasn't ready for prime time, and I suspended my project waiting for the technology to catch up. This was easy to do, as I always have more to do on my plate than time to do it!
Recently, I decided it was time to take another look at this project. I purchased a new Rev C Beaglebone Black, then started working with it. This was a major improvement, as this version also moved from Linux Angstrom to Debian. I was unwilling to try and work with Angstrom again, so the move to Debain was great news.
I became convinced that the pyvenv development environment would work best, but that entailed moving to Debian release 8 or 8.1 instead of the current 7x version, and Python 3.4. So I quickly got well acquainted downloading and installing various test releases of Debian 8.1 for the Beagle.
Once the OS and Python versions issue was resolved, I set up the project on GitHub, and started moving forward, with the first task to set up do to builds on the Beaglebone while using pycharm as the IDE on my host Ubuntu system. I mounted a host directory onto the Beagle using sshfs, so that code changes I made within pycharm would be directly available for code running on the Beagle via the shared directory. I would edit in the IDE on my host, then use a terminal session that was logged into the Beagle to run and test the code. This worked really well, and all my source code was maintained on my host and pushed to github as well.
With those issues resolved, I began to look into the presentation layer. I really was concerned about trying to use Kivy after all the disappointment from a while back. Looking at the emails from the Kivy group - there were still a lot of issues.
All of my previous work in IT had primarily been devoted to development on the back end, with very little work on front end presentations. However, I had come across some articles regarding html5 and it's ability to work with websockets, so I wanted to take this opportunity to do a little deep dive into html5 to see how that might better fit my presentation layer problem.
The first thing was to take a look at the Beagle's onboard webserver. I had not really taken a look at that in the past, but now with all presentation options on the table, I did take a look.
Wow! What an insight that was! A little bit of nodejs code, and batta-bing, I was serving up simple web pages! And there was a direct ability to push data from the Beagle to the presentation via a web page. This really looked like the approach I had been seeking: a user has a web page up (a security monitor), the Beagle first supplies the current state of all sensor elements, then pushes any updates (sensor state change) to be displayed on the web page without the user having to refresh the web page.
So: this project has abandoned Python and Kivy!!!
I will be placing my detailed notes on setting up a development environment for the Beagle for Python here on this blog at a later date, as they may be of use to someone doing Python development for use on a Beagle for their project.