automate-em

A framework for building automation and control.

Creating a control project

  1. Create a new rails project
    • Configure your database etc
  2. Add gem "automate-em" to your gem file
    • Also add gem 'login', :git => 'git://github.com/stakach/advanced-authenticator.git'
    • This dependency will be removed soon to allow for any authentication system to be utilised
  3. From a console type:
    1. bundle install
    2. rake railties:install:migrations FROM=login_engine
    3. rake railties:install:migrations FROM=automate
    4. rake db:migrate

You now have a blank control project

Generating module scaffolding

From a console

  1. type: rails g module module/scope/and_name
    • An example would be: rails g module NecCorp/Projectors/Np2000
    • This will create a file at app/modules/nec_corp/projectors/np2000.rb
  2. You will be asked what type of module you would like to generate
    • Type: device for a generic device module (a raw TCP or UDP protocol including telnet)
    • Type: service for any module that will be interfacing with a HTTP service
    • Type: logic to generate a controller/interfacing module

Note: The name space (NecCorp/Projectors in the example above) is optional and can be as deep or shallow as makes sense.

Writing Modules

Please see: writing modules

System Configuration

Please see: system configuration

Running

From a command console type: rake automate