Giter Site home page Giter Site logo

tuomas2 / automate Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 4.0 2.07 MB

A general purpose Python automatization library with nifty real-time web UI

Home Page: http://python-automate.readthedocs.org/

License: GNU General Public License v3.0

Python 89.98% CSS 0.72% JavaScript 5.44% HTML 3.86%
android raspberry-pi arduino virtualwire django web-ui python gpio home-automation

automate's Introduction

Travis CI Status

Coverage Status

Documentation Status

image

image

image

Automate

Screnshot from Automate Web UI

image

Introduction

Automate is a general purpose automatization library for Python. Its objective is to offer convenient and robust object-oriented programming framework for complex state machine systems. Automate can be used to design complex automation systems, yet it is easy to learn and fun to use. It was originally developed with home robotics/automatization projects in mind, but is quite general in nature and one could find applications from various fields that could take advantage of Automate. Automate can be embedded in other Python software as a component, which runs its operations in its own threads.

Highlights:

  • Supported hardware:
    • Raspberry Pi GPIO input/output ports
    • Arduino support for analog and digital input/output ports and VirtualWire wireless networking with AutomateFirmata.
    • Easy to write extensions to support other hardware
  • System state saving and restoring via serialization
  • Intelligent design:
    • Comprehensively tested via py.test unit/integration tests
    • Takes advantage of Traits library, especially its notification system.
    • IPython console to monitor, modify and control system on-the-fly
    • Versatile function/callable library to write state program logic
  • RPC and Websocket interfaces to connect between other applications or other Automate systems.
  • Comprehensive and customizable Web User Interface
  • UML graphs can be drawn automaticlaly of the system (as can be seen in the examples of this documentation)

Example

Let's take a look at a small Automate program as an example:

from automate import *

class MySystem(System):
    # HW swtich connected Raspberry Pi GPIO port 1
    hardware_switch = RpioSensor(port=1)
    # Switch that is controllable, for example, from WEB interface
    web_switch = UserBoolSensor()
    # Lamp relay that switches lamp on/off, connected to GPIO port 2
    lamp = RpioActuator(port=2)
    # Program that controls the system behaviour
    program = Program(
        active_condition=Or('web_switch', 'hardware_switch'),
        on_activate=SetStatus('lamp', True)
    )


my_system = MySystem()

This simple example has two sensors hardware_switch, web_switch, actuator (lamp) and a program that contains logic what to do and when. Here, lamp is switched on if either web_switch or hardware_switch has status True.

Installing Automate

Automate can be installed like ordinary python package. I recommend installation in within virtual environment (see virtualenv).

  1. (optional): Create and start using virtualenv:

    mkvirtualenv automate
    workon automate
  2. Install from pypi:

    pip install automate

Optionally, you can specify some of the extras, i.e. web, rpc, raspberrypi, arduino:

pip install automate[web,rpc,raspberrypi,arduino]

or if you want them all:

pip install automate[all]

License

Automate is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Automate is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Automate. If not, see http://www.gnu.org/licenses/.

automate's People

Contributors

tuomas2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

automate's Issues

New logo for Automate

I wanted to contribute to Automate. I designed a logo for Automate. If you like it, I'll send you the files.

automate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.