Toggling appliances with less effort
Explore the docs »
View Demo
·
home-automationrt Bug
·
Request Feature
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 ).
- Energia IDE
- Kivy ( App dev )
- TI CC3200
- relays and a bunch of wires
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.
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.
- Clone the home-automation
git clone https://github.com/ParamDeshpande/home-automation.git
- Install python requirements ( preferably in a venv )
cd isntallationDir/home-automation
pip3 install -r ti_IOT/requirements.txt
- 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.
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.
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.
- ...
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Param Deshpande - @https://twitter.com/ParamDeshpande - deshpandeparam10@gmail.com
Project Link: https://github.com/ParamDeshpande/home-automation
- Ti , well I got the MCU free of cost.