skip to navigation
skip to content

Not Logged In

phase 0.1.17

Python Home Automation project

Latest Version: 0.3.9

/!This project is in alpha version and it is not supposed to work properly on every machine. A beta version more stable and more tested will be available as soon as possible. /!

This project is the main installer of phase project. In this version, it just proposes to install phase.currentcost and phase.timeserieslogger to collect consumption information from a CurrentCost EnviR 128. It also deploy supervisor conf file and start each process with supervisor. It also prepare MongDB to accept data conversion from currentcost to according variables series.

In the next release, this project propose to configure all this parameters and add a graphical interface.

Installation

Requirements:

  • Platform: Unix (only tested on Ubuntu 12.04)
  • Python 2.7
  • Pip (last version)
  • RabbitMQ (last version)
  • MongoDB (last version)
  • Supervisor (last version)

To install this software, you need to install python 2.7 and pip

sudo apt-get install python python-pip
sudo pip install --upgrade pip

Then, you have to install and configure RabbitMQ (change “admin” and “password” by your credential)

USERNAME="admin"
PASSWORD="password"
echo "deb http://www.rabbitmq.com/debian/ testing main" > sudo /etc/apt/sources.list.d/rabbitmq.list
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
sudo apt-get update
sudo apt-get install rabbitmq-server -y
sudo service rabbitmq-server start
sudo rabbitmq-plugins enable rabbitmq_management
# If you get a 'command not found' error for this line, use:
# sudo /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
# sudo /usr/lib/rabbitmq/bin/rabbitmq-activate-plugins enable rabbitmq_management
sudo rabbitmqctl add_user $USERNAME $PASSWORD
sudo rabbitmqctl set_permissions -p / $USERNAME ".*" ".*" ".*"
sudo rabbitmqctl delete_user guest
sudo service rabbitmq-server restart

Then, you have to install mongoDB

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-10gen

Then, you have to install supervisor and config it

sudo apt-get install supervisor

Finally, you can install phase

sudo pip install phase

To verify version of phase installed package

pip show phase
  • Python and Pip
  • RabbitMQ + config
  • MongoDB
  • Supervisor + config
  • phase
  • phase start

Contribute

I am more than happy to accept external contributions like feedback, bug reports and pull requests.

Do not hesitate to post an issue if you have any problem to install or to use this software.

You can also use this way to ask for features request. I am also available to answer you on Stack Overflow

Here is the development process to test and validate your features.

  1. Prepare your development environment:

    $ sudo apt-get install vim git-core
    # Install virtualenv and virtualenvwrapper if it's not done.
    $ sudo pip install virtualenvwrapper
    $ mkdir ~/.virtualenvs
    $ vim ~/.bashrc
    # Modify your ~/.bashrc and add this 2 lines:
    # export WORKON_HOME=~/.virtualenvs
    # source /usr/local/bin/virtualenvwrapper.sh
    $ bash
    
  2. Go on github and fork this project.

  3. Clone it on your conputer:

    $ cd <your_workspace>
    $ git clone git@github.com:<username>/phase.integration.git
    $ git checkout develop
    
  4. Prepare your virtualenv

    $ mkvirtualenv phase
    (phase)$ pip install paver
    (phase)$ paver prepare
    
  5. Add functional or unit tests

  6. Code your features

  7. To validate your implementation, launch:

    (phase)$ paver validate
    
  8. Modify Todo, Changelog and update documentation

  9. Commit and push on github:

    (phase)$ git add .
    (phase)$ git commit -a -m "<your commit message>"
    (phase)$ git push origin develop
    
  10. Propose a pull request on github

License

The MIT License (MIT)

Copyright (c) 2014 Pierre Leray

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 
File Type Py Version Uploaded on Size
phase-0.1.17.tar.gz (md5) Source 2014-06-16 7KB
  • Downloads (All Versions):
  • 106 downloads in the last day
  • 834 downloads in the last week
  • 3019 downloads in the last month