GitXplorerGitXplorer
i

home-control-RPC

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
5211556c09340804c724ac70aefa592cb596f39e

working on project tests - added more AC.views tests

iitamaro committed 11 years ago
Unverified
c677e0848a1e7d34ebb849e7f734b2964acdd55c

working on project tests - added some AC.views tests

iitamaro committed 11 years ago
Unverified
e5dd17e2d9965dcda6965c06620441d4b04ace1e

added south command to dev-env docs

iitamaro committed 11 years ago
Unverified
337f1137fad1a681c0a4bef6c22ebd1bcfd0f7e1

working on project tests - covered AC.models 100%

iitamaro committed 11 years ago
Unverified
104d81728c4e8a9aaeefeb4fb8ab436663b5ed5a

re-enabled staticfiles app to bring back normal admin interface

iitamaro committed 11 years ago
Unverified
2c8c0f0e677afce23086f490bc8b93e94e6a5a8f

fix docs

iitamaro committed 11 years ago

README

The README file for this repository.

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:

Requirements

  • 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).

Installation

As a Django project & apps, installation and deployment are not different than other Django projects.

  1. Clone the repository to the computer that will run the RPC app(s).
  2. Optionally, create a local_settings.py file in HomeControlRPC/HomeControlRPC to override settings from the generic settings file (feel free to use local_settings.py.sample as a suggestion).
  3. Run manage.py syncdb to initialize the DB (and create a super user).
  4. Set up your web server of choice to serve the Django site.
  5. 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).
  6. Celebrate.

Available RPC Apps

Deployment Examples and Development Setup

Web Server Agnostic Deployment on Ubuntu 12.04

(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:

  1. cd ~
  2. git clone https://github.com/itamaro/home-control-RPC.git
  3. cd home-control-RPC/HomeControlRPC/HomeControlRPC
  4. cp local_settings.py.sample local_settings.py
    • Edit local_settings.py till happy.
  5. cd ..
  6. 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

Soon

Local Development Setup in Windows

(my dev-env is Windows 7 Professional SP1 x64)

  1. Install Python, setuptools, pip, Git client (e.g. Git Extensions)
  2. pip install Django south nose django-nose mock
  3. Clone https://github.com/itamaro/home-control-RPC.git to your local workspace (e.g. C:\Users\<name>\Workspaces\home-control\home-control-RPC.
  4. Copy local_settings.py.win-dev-sample to local_settings.py in the HomeControlRPC\HomeControlRPC directory.
    • Edit it until you're happy.
  5. In command prompt, cd to C:\Users\<name>\Workspaces\home-control\home-control-RPC\HomeControlRPC
  6. python manage.py syncdb
    • Create super user.
  7. 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
  8. 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!