Metadata-Version: 1.1
Name: timevortex
Version: 0.4.5
Summary: Python Home Automation project
Home-page: https://github.com/liogen/timevortex
Author: Pierre Leray
Author-email: pierreleray64@gmail.com
License: MIT
Description: ==========
        TimeVortex
        ==========
        
        .. image:: http://img.shields.io/travis/timevortexproject/timevortex.png?branch=master
            :target: https://travis-ci.org/timevortexproject/timevortex
            :alt: Travis CI Build Status
        
        .. image:: http://img.shields.io/pypi/v/timevortex.png
            :target: https://pypi.python.org/pypi/timevortex
            :alt: Latest Version
        
        .. image:: http://img.shields.io/pypi/dm/timevortex.png
            :target: https://pypi.python.org/pypi/timevortex
            :alt: Downloads
        
        .. image:: http://img.shields.io/badge/license-MIT-red.png
            :target: https://github.com/timevortexproject/timevortex
            :alt: License
        
        Main package for TimeVortex open source data logging platform.
        
        This package is the main installer of timevortex project. In this version, it just installs timevortex.currentcost and timevortex.timeserieslogger to collect consumption information from a CurrentCost EnviR 128. It also deploy supervisor conf file and start each process with supervisor.
        
        Installation
        ------------
        
        Requirements:
        
          * Platform: Unix (only tested on Ubuntu 12.04)
          * Python 2.7
          * Pip (last version)
          * RabbitMQ (last version)
          * Supervisor (last version)
        
        To install this software, you need to install python 2.7 and pip
        
        .. code-block:: bash
          
          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)
        
        .. code-block:: bash
          
          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 supervisor and config it
        
        .. code-block:: bash
          
          sudo apt-get install supervisor
        
        Finally, you can install timevortex
        
        .. code-block:: bash
          
          sudo pip install timevortex
        
        To verify version of timevortex installed package
        
        .. code-block:: bash
          
          pip show timevortex
        
        TimeVortex update
        -----------------
        
        .. code-block:: bash
          
          sudo pip install -U timevortex
        
        Quickstart
        ----------
        
        Once you have install TimeVortex on your platform, you can connect your CurrentCost to your USB port and then configure your software entering some values on the config file located in /opt/timevortex/config.ini. For a better understanding of site and variable, please refer to the next section. Here is a example of config file:
        
        .. code-block:: ini
        
          [timevortex]
          activate_timevortex_currentcost = True
          activate_timevortex_timeserieslogger = True
          log_file = /opt/timevortex/timevortex.conf
        
          [timevortex_currentcost]
          site_id = my_home
          variable_id = main_cc
          ch1_w = 
          ch2_w =
          ch3_w = main_consumption
          tmpr = living_room_temperature
          tty_port = /dev/currentcost
          timeout_currentcost = 10
          usb_retry = 5
          log_file = /opt/timevortex/timevortex-currentcost.conf
        
          [timevortex_timeserieslogger]
          activate_daily_report = True
          daily_report_target = me@gmail.com
          daily_report_site = system,my_home
          log_file = /opt/timevortex/timevortex-timeserieslogger.conf
        
          [timevortex_messager]
          rabbitmq_username = admin
          rabbitmq_password = password
          rabbitmq_host = localhost
          gmail_username = timevortex
          gmail_password = timevortex
        
          [timevortex_filestorage]
          data_folder = /opt/timevortex/data
        
        Then you can start TimeVortex using:
        
        .. code-block:: bash
        
          $ timevortex start
        
        And if you want to stop your TimeVortex use:
        
          .. code-block:: bash
        
          $ timevortex stop
        
        Sites and Variables
        -------------------
        
        Following my Internet of Things experience, the main problem encountered by many companies is to define robust data model for representing Things, data collected by Things and physical measure mirorring by this data. To simplify this approach in this project, we split completely data collected by sensor and physical measure mirroring this data.
        
        So for our data model, we consider a top-down approach centered on user environment instead of focus on sensor deployment. Basicaly, a user live in a house. In this house, there is a lot of data than can be collected (global energy consumpion or per appliances, indoor or outdoor weather, temperature, ...). For now, we will just consider user's home as the center of his world, but maybe when we will update our system to store financial or car data we will also update our approach.
        
        So user live in home. In our system, we call that a Site. This site (appartment, house, ...) contains one or several buildings (main home, garage, ...). Every buildings contains one or several storeys. Each storey contains one or several rooms. This is how we represent user's home.
        
        To each level of this representation, there are timeseries that can be collected and reprensenting a user interaction with this site. For example, we can collect global energy consumption that affect the site root element and we can also collect living room temperature that affect only the living room of a specific storey of a specific building in the site. We call a timeseries of data a variable. A variable represents a physical measure with a specific meaning for a user like global electric consumption or living room temperature. We are not talking about sensor yet.
        
        When a user want to add a new sensor, he has to create a variable to store data send by sensor and create an algorithm to transform sensor data into meaningful variable timeseries. So this user won't be to check with sensor problem but with a clean variable timeseries.
        
        Connector plugins
        -----------------
        
        For now, this project only contains connector for my personal usage. But, I will be very happy if anybody want to add there own plugins. To create a plugins, you have to respect some conventions. First, to retrieve configuration options, you have to use timevortex.filetorage to read config file and retrieve usefull informations. Then, we have also to use timevortex.messager to send a message over RabbitMQ.
        
        A connector is a simple python process that connect to a sensor, retrieve a value and publish it on RabbitMQ. For now, we don't have the structure to connect this plugin to an administration interface that let user configure their connectors as well.
        
        Do not hesitate to ask me if you have any problem to create your plugins, to perform a pull-request for adding your connector on this project or to update information on this README.
        
        Contribute
        ----------
        
        I am more than happy to accept external contributions like feedback, bug reports and pull requests. 
        
        Do not hesitate to post an `issue <https://github.com/timevortexproject/timevortex/issues>`_ 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 <http://stackoverflow.com/questions/tagged/timevortex>`_
        
        Here is the development process to test and validate your features.
        
        1. Prepare your development environment:
        
            .. code-block:: bash
        
                $ 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 <https://github.com/liogen/timevortex.integration>`_ and fork this project.
        
        3. Clone it on your conputer:
        
            .. code-block:: bash
        
                $ cd <your_workspace>
                $ git clone git@github.com:<username>/timevortex.git
                $ git checkout develop
        
        4. Prepare your virtualenv
        
            .. code-block:: bash
        
                $ mkvirtualenv timevortex
                (timevortex)$ pip install paver
                (timevortex)$ paver prepare
        
        5. Add functional or unit tests
        
        6. Code your features
        
        7. To validate your implementation, launch:
        
            .. code-block:: bash
        
                (timevortex)$ paver validate
        
        8. Modify Todo, Changelog and update documentation
        
        9. Commit and push on github:
        
            .. code-block:: bash
        
                (timevortex)$ git add .
                (timevortex)$ git commit -a -m "<your commit message>"
                (timevortex)$ 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.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Home Automation
Classifier: License :: OSI Approved :: MIT License
