UPDATED: I’ve done some follow-up work on this project and rather than keep pasting new additions and changes onto the existing content, I have decided to rewrite the series to better reflect the process from start to finish. If you have read the series before, you may fine some interesting new aspects added and others removed. Some of the old content was no longer applicable due to updates in Bluemix services. I also went a little off the deep end with an Apple Watch. 🙂
I am diving into a new project where my eventual goal is to have a mobile app on my phone communicate to a “thing” on the internet. Yes, those are pretty poorly defined requirements so right off the bat I did some research to decide what the “thing” should be, what amazing task it should perform and how I should make it talk to my phone.
Due to its popularity and just because I thought it sounded cool, I decided my “thing” would be a Raspberry Pi. These are cheap little single board computers that can run a number of open source operating systems and application packages. With that decided, I ordered my Raspberry Pi starter kit and anxiously waited at the curb by my mailbox.
But what cool task would it do? I wanted something related to home automation that was more than pressing a button and lighting a lamp, but I also wanted to keep it reasonably scoped. I decided on a doorbell interface that would take a picture when the button is pressed and make that picture available to the mobile app. Ok, for that I would need a camera module so I ordered that and went back to the curb by the mailbox to wait.
Now I knew what the thing would be and what task it would perform. But how would it communicate to the mobile app? After a little more research, I decided to leverage the IBM Bluemix platform and services it provides. Hey! What a coincidence: I work for IBM! Ok, maybe it isn’t such a coincidence. My plan all along was to demonstrate how I could use Bluemix and the IBM MobileFirst Services to build this app. But in this process, I have learned a ton about non-IBM technology as well so this adventure is not at all just an IBM sales pitch. But it will demonstrate how you can build applications leveraging cloud-based services and the Internet of Things.
While I was still waiting at the mailbox, I sketched out this architecture diagram for the eventual system:
Yes, this does look overly complicated for a doorbell. But my not-so-hidden agenda here is to demonstrate how all these cloud and IoT components can come together to provide services for a mobile application. There is lots to learn here, even if you don’t want to get into the whole system, so feel free to cherry pick whatever helps.
There are four main pieces of functionality in this project:
- Push Notifications
- Picture capture
- Video capture
- Apple Watch
I ended up doing a LOT of iterating. I am going to spare you some of that and present the tasks in a more sequential fashion so you may find there are steps that don’t seem obvious at first, but hopefully you will see why I had to do them later.
- Raspberry Pi Setup
- Bluemix Setup