Your personal assistant with sole purpose to make your home smarter and your life easy than ever before. It gives you the power to control your house with just a single touch or just a command of your voice. If your are feeling lazy enough to switch off the lights before going to sleep, worry not, homey will do that for you on your single command.
This Readme is divided into several parts
Homey can be broken down in 2 separate modules viz.
- Raspberry Pi Server
- Android App
Raspberry Pi is used as the controlling using for all the appliances in the house. There can be various ways with which you can connect your appliances with Pi like connecting a Relay Board using wires and then using that board to control the switch or adding a wireless layer between Pi and Relay or making your own custom device to control the appliances.
This is the real remote control that the user uses to control all the appliances. User can control the appliances using one of the three methods viz. touch or voice or text command.
This section enlists various technologies used in the project.
The server is a raspberry Pi setup that is connected to a router and running the server code. For the app to connect to server, both of them should be on same network.
The code is simple Python socket program that takes the command from Android app, analyze it and then provides the relevant output from GPIO pins towards the relay where it can switch on/off the appliance based on the output.
The app is simple Java based android application that acts as a medium between the server and user.
It opens a socket connection between server and send the command given by the user. As discussed earlier, It can take touch, voice or text command.
Touch command is directly analyzed converted to the server identified form.
Text command is analyzed using NLP based on Microsoft Luis and the results are then serialized and sent to server.
Voice commands are first converted to text using Speech to text API provided by Android and then analyzed further.
This is just a basic version of what I had in mind when its development began. This app has certain design and implementation flaws. Some of the knows bugs are listed below
- Supports only fixed no. of appliances and is hardcoded (both server and app)
- No authentication (both server and app)
- Server code is simple python without any standard protocol to follow (server)
- Minor design flaws in Android like unnecessary Toasts (app)
- No control over appliances/ server outside the home networking
There is always scope of improvement in anything we do. Some of the improvements/ fixes are suggested below
- Make the addition of appliances dynamic and use a secured Database to store it.
- Use a standard framework for standardization of protocol and enabling authentication. Major candidates include Django and Flask. Can also use Twisted for event driven programming.
- Enable port forwarding on server side.
- Improve the UI/UX.