HomeControl RPC Server and Apps
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
HomeControlRPC/HomeControlRPCto override settings from the generic settings file (feel free to use local_settings.py.sample as a suggestion).
manage.py syncdbto 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).
Available RPC Apps
Deployment Examples and Development Setup
Web Server Agnostic Deployment on Ubuntu 12.04
(tested with Ubuntu-Desktop-12.04.2-x64)
- 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...
sudo pip install Django
Clone and configure the home-control-RPC project:
git clone https://github.com/itamaro/home-control-RPC.git
cp local_settings.py.sample local_settings.py
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).
Nginx+Gunicorn on Ubuntu Deployment Example
Local Development Setup in Windows
(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
https://github.com/itamaro/home-control-RPC.gitto your local workspace (e.g.
- Edit it until you're happy.
- In command prompt, cd to
python manage.py syncdb
- Create super user.
- If you're using South:
python manage.py schemamigration AC --initialb.
python manage.py migrate ACc.
python manage.py schemamigration cam --initiald.
python manage.py migrate cam
python manage.py runserver 8008
The home-control-RPC site is now available on
/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!