Skip to content

ParamDeshpande/home-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Home Automation

Toggling appliances with less effort
Explore the docs »

View Demo · home-automationrt Bug · Request Feature

Table of Contents

About The Project

This is the 2nd version of my home automation project where appliances are simply toggled via an app, and the MCU serves as chat server and parses info . For the previous older version see arduino-oldversion, where appliances were automatically toggled based on motion sensors ( however cheap pir sensors are practically not so feasible ).

home-automation

Built With

Getting Started

The Ti's cc3200 is a overkill for this task, but I had it lying around hence I used it, the same stuff can be easliy achieved using any wifi supported board or ESP8266 and any arduino or bluepill or atmega ...etc.

Prerequisites

There's not much setup to do make sure you have the respective toolchain setup ( eg Energia here). For the app dev make sure you have kivy setup and running preferably in a virtual env.

Installation

  1. Clone the home-automation
git clone https://github.com/ParamDeshpande/home-automation.git
  1. Install python requirements ( preferably in a venv )
cd isntallationDir/home-automation
pip3 install -r ti_IOT/requirements.txt
  1. Find and install the app from here, on your android device. Make sure internet permissions are given to the app, ( it wont ask by itself ) else it will start stop and crash again and again.

Usage

The GUI for mobile application is plain and simple and serves the basic tasks for which the project was intended for.

I'm not really an app developer, so spare me the unfancy GUI.

while building new app from changes made in main.py make sure to enable internet and set other parametrs like app icon and stuff in buildozer.spec file.

See kivy installation docs for detailed steps to pack the application either google play or ios.

To get the code on the toolchain compiling for the MCU, just change your SSID and password and flash it on your respective board.

char ssid[] = "wifiname";
char password[] = "secret-or-not";

Since the board has 3 leds ( aint that nice ) , I made the red led denote offline or unconnected. Green LED connected to the wifi netowrk. Orange LED to blip away when parsing a message.

You may change the sleep freqeuncy sleep(1000); from 1Hz to whatever you like, if you find the response slow enough.

See the ti_chat.ino in ti_IOT. I have tweaked this file from the official examples that were provided for the chat server.

Roadmap

See the open issues for a list of proposed features (and known issues).

Few enhacements or bug fixes I may / may not make might/coud be made are ..

  • Ping server before hand when the app opens and not when the button is pressed.
  • Add timeout mechanisms for both MCU server and in app.
  • a connection notification in the app to tell if the mcu server received the msg, and other debug msgs.
  • Integrating motion sensors.
  • Adding a widget for home screen instead of opening the app and permission and auto permisions and stuff.
  • ...

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Param Deshpande - @https://twitter.com/ParamDeshpande - [email protected]

Project Link: https://github.com/ParamDeshpande/home-automation

Acknowledgements

  • Ti , well I got the MCU free of cost.