How to make home IoT easier

On the last post I covered basic Arduino IDE setup/use with electrodragon's relay board to get started for easy home automation. That was sometime ago, during this time it is true I have been busy with life's needs but also the fact that to setup a home automation that works end to end needs many steps and variety of technologies made me think about the problem a bit deeper.

So before I continue more, let me share the conclusion. As DIY community we need some standards and framework so that everyone who is interested in achieving some form of home automation will not have to redo from scratch every step. This is more than what one man can quickly achieve so I will end up asking for interested parties in the community to help build such a base/framework to make DIY home automation easier for all.

The project will summarize repeatable steps and offer the framework/standard code for basic wifi connected home automation that can be controlled from inside or outside your home by use of a smart phone or any web-browser capable device.

The solution will need to be:

  • inexpensive
  • extensible
  • minimum technology stack for easy setup
  • And both control devices and view status from connected devices

In my solution I decided to use a PI server ($20-$35) as the main internet exposed controller device and a wifi able micro-controller relay/sensor board specifically esp8266-relay-board ($6).

The high level flow diagram is as follows, let's look at what is happening.

  1. A PI server with a known IP or hostname is running a basic webserver such as apache and is exposed to internet via your home router. This PI will also become our IoT main console and will host the main page for our home automation UI. The project will offer the code for the PI to serve the console/main IoT control page.

  2. At any point you can introduce a new IoT device to your home that you will use to control a home appliance. The project will offer standard code, that will be loaded to these devices, and at initial power up the standard code will bring up devices in AP(Access Point) mode for you to enter your wifi SSID/password, PI servers address, and what this IoT device will service. You will be able to connect to the IoT device's Wifi and fill in the information via the project supplied page.

  3. The collected information is saved permanently on the device, and next the device tries to connect to your wifi, if successful it will introduce itself to the main console - the PI server. It will let the PI server know its IP address just assigned by the router, and the IoT services it offers.

  4. After this point on, you can control the home appliance from any where on the internet via the standard project software on the PI and on the IoT device. The software offers a main control page on the PI and CGI like services for reaching out to the individual IoT devices in the home network. The PI software can collect any registration information sent from the IoT devices or status data from these devices. PI also has DB storage facilities for anything that needs to saved just like any other web application. IoT devices also have the standard software that for offer basic "setting" and "getting" services capable of talking to the PI's interface.

I used C for esp8266 side of the code, python for PI server side code and javascript/jquery/css for the controller UI. So far I have the basic setup working as explained above.

I am hoping there will be some interest from community so that we can build a reliable IoT base framework for everyone. If that is achieved, new automation projects will not have to rediscover the basic plumbing can concentrate on making home automation more interesting with their own specific applications.

On the next post I can start sharing more details on the steps.

until later...

comments powered by Disqus