Alarm Clock Project Summary

Why I started this project

Last November in 2015, I started an IoT project which simulates a sunrise event at a scheduled time. I really wanted a practical project which I can use in my daily life to enhance the quality of my life.

While researching for viable solutions, Philips Hue smart LED bulb, LIFX LED bulb, and various choices were found. I did not choose either of these choices for few reasons.┬áTo use a Philips smart bulbs, you require a central hub which allows you to connect to it for controlling all the smart bulbs. LIFX has integrated wi-fi module built into the bulb. Both choices were too expensive to start with, and I didn’t want something that is already built out of the box. I wanted more hands on action which would give me a full control of my soon-to-be sunrise alarm.

Architecture

After few weeks of researching, I decided to use a Raspberry Pi as my web-server which controls a connected RGB LED light strip. Following technology were used for this project

  • Raspberry Pi: ARM based linux computer
  • Adafruit RGB LED strip: controllable via GPIO on Raspberry Pi
  • NGINX: web server
  • Gunicorn: WSGI proxy web server
  • Django: alarm web application
  • MySQL: record keeper
  • Bootstrap: UI design

The github repository for this code is provided here.

Preview

This youtube clip shows a sped-up version of the sunrise simulation for the demo purpose.

A simple authentication page is present to limit other users from triggering or scheduling my alarm.

screen-shot-2017-02-22-at-10-07-59-pm

Currently, it shows past scheduling history for a development purpose.

screen-shot-2017-02-22-at-10-08-19-pm

Simple alarm configuration page is displayed.

screen-shot-2017-02-22-at-10-08-28-pm

 

To be added

Even though this IoT is still usable, I would like to add few more features into the application.

  • For the user to configure multiple alarms.
  • Display only active alarms on the status page.
  • Allow the user to delete/deactivate selected alarm.
  • NGINX and Gunicorn to auto-start at an event of a crash.
  • Web scrap newsfeed and voice it out over a speaker when the alarm triggers.
Advertisements

Blogging migration from Jekyll to WordPress

Why I started Blogging

Over a year ago, I have decided to start a personal blogging website to keep a track of my development study. I needed a blogging platform which allows me to easily create new posts without any hassles of maintaining a blog. After few days of research, Github.io’s Jekyll and WordPress.com’s WordPress came to consideration.

Jekyll vs WordPress

Jekyll Pros

  • Github.io provides 1 free hosting of a Jekyll project.
  • You can easily clone other people’s github repository, and start using pre-made website as your website template.
  • Jekyll project is very straight forward in terms of the project structure.

Jekyll Cons

  • Posts are written in markdown text format. It is very versatile, yet, writing a post is troublesome when you have not yet memorized the markdown syntax.
  • Enabling tag categorization requires you to create a Liquid template page which can be annoying when you simply want to write a post.
  • Proper development setup requires working with command-line tools such as git, gem, jekyll and bundler. If you are not familiar with comman-line tools, Jekyll can have a high learning curve.

WordPress Pros

  • It is a true CMS (content management system). Once you have your desired theme and menu appearance set up, you only need to start writing your blog posts from then on.
  • WordPress.com allows free hosting of one web site. This eliminates the deployment step in a typical web development cycle.
  • You can search, manage and modify free themes from the GUI.
  • Dockerized WordPress is very easy to spin up your first WordPress website

WordPress Cons

  • Unless you are hosting your own WordPress website on your personal server, modifying your free theme is very limited.
  • When you are hosting it on your own server, SSL should be already setup prior to deploying the website. TLS encryption is required to secure your login step to hide the login password from the world.

Why I decided to migrate from Jekyll to WordPress after one year

After comparing between the two, I was really attracted to Github.io’s easiness in deployment. All I wanted back then was to simply write. I cloned an already existing template from other person’s github repository, and my new blog was ready to go right away.

About a year has been past, and my blogging requirement has changed a bit. I wanted to categorize and manage posts with more ease. Since I was planning on using the Amazon AWS, WordPress seemed to be a nice self-manageable blogging platform.

Future Plan

In the near future, I will deploy a self-maintained WordPress website on AWS. I have not yet set up proper SSL on my AWS EC2 instance, so I will be using the wordpress.com’s free hosting service as a temporary solution.

On the other hand, on my local environment, I used Docker to spin up my WordPress development environment. Dockerfile used for my blog can be found from my Github repository. Docker innately matches the development environment and the deployed environment, which means I can deploy my blog right away once the initial configuration is finished on my development environment.