Django project & apps that implement RPC services for the Home Control system.
See my blog post for extended description and design.
Additional Home-Control projects:
- Django (developed and tested with v1.5).
- For live audio recording, the A/C RPC app requires PyAlsaAudio library for Linux (not supported in Windows).
- For signal energy graphing, the mic module requires matplotlib library (version >= 3.0).
- For schema management and migrations (for development) - Django South (developed with v0.8).
As a Django project & apps, installation and deployment are not different than other Django projects.
- Clone the repository to the computer that will run the RPC app(s).
- Optionally, create a
local_settings.py
file inHomeControlRPC/HomeControlRPC
to override settings from the generic settings file (feel free to use local_settings.py.sample as a suggestion). - Run
manage.py syncdb
to initialize the DB (and create a super user). - Set up your web server of choice to serve the Django site.
- Access the admin interface (e.g. at
http://your-deployed-host/admin/
) to configure the installed RPC apps (see the app-specific documentation for details on their configurations). - Celebrate.
(tested with Ubuntu-Desktop-12.04.2-x64)
Install requirements:
- Python and various dependencies:
sudo apt-get install libexpat1 python-pip build-essential python-imaging python-pythonmagick python-markdown python-textile python-docutils
- WARNING: Do not install python-django via apt-get on 12.04 - the default repositories has an old version...
- Django:
sudo pip install Django
Clone and configure the home-control-RPC project:
cd ~
git clone https://github.com/itamaro/home-control-RPC.git
cd home-control-RPC/HomeControlRPC/HomeControlRPC
-
cp local_settings.py.sample local_settings.py
- Edit
local_settings.py
till happy.
- Edit
cd ..
-
python manage.py syncdb
- Create a super user
After setting up a web server to serve the Django site (see web-server-specific examples below),
access the Django admin interface (e.g. http://localhost:8008/admin/
) to configure the installed apps (see app-specific README's for further details).
Soon
(my dev-env is Windows 7 Professional SP1 x64)
- Install Python, setuptools, pip, Git client (e.g. Git Extensions)
pip install Django south nose django-nose mock
- Clone
https://github.com/itamaro/home-control-RPC.git
to your local workspace (e.g.C:\Users\<name>\Workspaces\home-control\home-control-RPC
. - Copy
local_settings.py.win-dev-sample
tolocal_settings.py
in theHomeControlRPC\HomeControlRPC
directory.- Edit it until you're happy.
- In command prompt, cd to
C:\Users\<name>\Workspaces\home-control\home-control-RPC\HomeControlRPC
-
python manage.py syncdb
- Create super user.
- If you're using South:
a.
python manage.py schemamigration AC --initial
b.python manage.py migrate AC
c.python manage.py schemamigration cam --initial
d.python manage.py migrate cam
python manage.py runserver 8008
The home-control-RPC site is now available on http://localhost:8008/
-
access /admin/
to configure app-settings, and hack away at the project.
You would probably also want to set up a local development environment of the home-control-web project in order to have a fully functional setup.
Please share interesting stuff you do!