OVERVIEW:

In a nutshell, the entire system is shown in the above block diagram.

In our daily lifestyle we hardly think about switching on lights, fans and other commonly used appliances. Often we blindly switch on a few specific appliances at certain times during the day, so any system deployed to carry out this task on behalf of us must know when to switch on which appliance as occupancy is detected.
Most home automation systems would provide a passive application which is capable of switching appliances remotely. These types of systems involves more thinking on the user's part instead of automation, also, most  systems have a poorly designed manual override in case the system fails. Normally one would carry out a single step as he/she enters or leaves the room, which is switching on or off certain appliances. With these existing systems a person undergoes several steps to switch on or off certain appliances, which includes getting hold of the phone, opening up the application, tap on a button and exit the application.

This system is designed to have a full manual override, which implies that one can toggle any connected appliance from off to on and vice versa manually from the switchboard. Most importantly, once this device is installed the user has to carry out zero steps to switch his/her appliances. In other words, your room will welcome you by switching on only those appliances which you generally switch on during that time and also take care of the lights and fans on your way out.

Along with manual override, remote appliance access is also provided via a companion android app. Appliances can be toggled from the opposite side of the globe If both the app as well as the hardware has internet access. Otherwise, if the hardware is deprived of any WiFi connection it sets up a local access point which the app can connect to for accessing the connected appliances.

This device is actually a room automation module so for every room you want to automate you need one such module. If some of the modules have WiFi access and some don't, one of the networked modules will act as the master and the unconnected modules will setup a local connection with the master for receiving commands from the app. Or to keep it simple we might hard-code the module nearest to the WiFi router as the master while installation and all others will act as slaves, we are yet to decide on this. 

HARDWARE:

The hardware is designed around a Wemos D1 mini, which is an ESP8266 ESP-12 dev board.

While installing such a device it can either be fitted inside the switchboard if space permits or attached outside the switchboard with all the proper wiring done as per the following diagram:-

To get a better understanding of the required wiring we have provided the following image showing the block diagram of a normal switchboard circuit:-

PROTOTYPE HARDWARE:

The ESP8266 present is flashed with a MicroPython firmware. MicroPython is a new and efficient implementation of python for embedded devices. It provides the flexibility of python yet being efficient to some extent. Programming with python is programming with less code and more readability. Micropython is becoming popular due to its ease of use.



Android Application:

The primary focus while designing the android app is being given to an intuitive, simple and visually appealing user interface. The main purpose of the app will be to control and monitor the state of various connected appliances in different rooms. As the device is installed, it needs to be configured via this app so that it talks to the home WiFi router, moreover the app needs to know which hardware is connected in which room.

Effort is being given to make this app as lightweight as possible, later we have plans to design home screen widgets so that users can access their appliances from their home screens of their smartphones.

When WiFi connection is absent, the hardware will set up a local access point with which the app connects for sending and receiving commands.

Below are some screenshots of how the app looks like [Beta]