Control your house via Internet using your Android phone with Python and Arduino!
This is a project in which you can control a cooler velocity via Internet. But with this code-base you can control any machine you have using your Android phone, via Internet.
The code is splitted in 3 parts:
See the next sections to know how to run the project.
To do (Tatiana will, of course ;-).
Arduino needs to get information about which should be the statuses of the machines you are controlling. It can be made in two methods:
You need to have a computer connected via USB with Arduino and run
permanently the script arduino/update_status.py
, so the computer will get
the information in the Django website and pass it through USB to Arduino.
To run this method you need to:
arduino/update_status.py
;arduino/droiduino.ino
;arduino/droiduino.ino
to your Arduino;arduino/update_status.py
(it was tested on GNU/Linux only, but isObviously, you need also the Django Web application running in the configured URL.
With this method Arduino talks directly with the Django Web application and gets the statuses. Note: Arduino code for this method is not finished yet since my Ethernet Shield is not working. Sorry :-(
To run the Web application you need to install
Django. The code available here (at django/
) is
for a Django project (called myproject
) with only one Django app (called
droiduino
).
You can use virtualenv and virtualenvwrapper if don't need to install Django in your system:
mkvirtualenv droiduino
cdvirtualenv
pip install django
cp -r /path/to/this/repository/django/myproject .
You can run the Web application tests with these commands:
cd django/myproject
./manage.py test
To run this Web application you need a Web server that supports WSGI. I'm using the hosting company WebFaction and am very happy with the service (but you can use any company you choose).
This project was presented by Tatiana Al-Chueyr and Álvaro Justen at PythonBrasil[7] in the talk "Controlando de LEDs a eletrodomésticos com Python, Android e Arduino" (Portuguese for "Controlling from LEDs to appliances with Python, Android and Arduino").
The talk was made on 2011-10-01 and we showed an example controlling our Coding Dojo traffic light (it was supposed to be a fan but some electronic components of the relay-drive circuit was not working).
This project is licensed under the GNU General Public License (aka GPL).
Copyright © Tatiana Al-Chueyr and Álvaro Justen 2011.