GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - EnerNOC/oadr2-vtn-new: Re-write of the open source VTN for OpenADR 2.0

BranchesTags
Open more actions menu

Latest commit

 

History

277 Commits
277 Commits

Folders and files

NameName
Last commit message
Last commit date
.settings
.settings
 
 
grails-app
grails-app
 
 
oadrTemplates/EiEvent
oadrTemplates/EiEvent
 
 
src
src
 
 
test
test
 
 
web-app
web-app
 
 
xmpp-http-tests
xmpp-http-tests
 
 
.classpath
.classpath
 
 
.gitignore
.gitignore
 
 
.project
.project
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
application.properties
application.properties
 
 
pom.xml
pom.xml
 
 

Repository files navigation

EnerNOC OpenADR 2.0 VTN

EnerNOC's open source VTN (server) for OpenADR 2.0. You can find more documentation on the project wiki.

This app supercedes the first version of oadr2-vtn, the major difference being the underlying web framework was migrated from Play 2 to Grails. Grails is a much more mature web framework while Play 2 had some missing features. The original Play app required work-arounds for common features such as services and dependency injection, which Grails provides out of the box.

Configuration

Most application settings are found in grails-app/conf/Config.groovy. Set the xmppSvc settings in order to enable XMPP functionality. Note that if using OpenFire as the XMPP server, jid should be just the 'username,' not [email protected]

AMQP configuration can be found at the bottom of Config.groovy in the rabbitmq section. See the plugin documentation for more details.

Development

Prerequisites

The VTN depends on the oadr2-ven code found here: https://github.com/enernoc/oadr2-ven

Clone and install oadr2-ven by running

git clone https://github.com/EnerNOC/oadr2-ven.git
cd oadr2-ven
mvn install -Dmaven.test.skip=true

You also need an AMQP server to handle push operations. The easiest solution is RabbitMQ. If you're on a Mac with Homeberw or most Linux distros, you can easily install Rabbit via your package manager.

Running Locally

The app can be run from the command line with Apache Maven or the Grails command line tools.

If you have Grails installed: grails run-app

If you use Maven:

export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256"
maven grails:run-app

For more info, see: http://grails.org/doc/latest/guide/commandLine.html#4.5%20Ant%20and%20Maven

Running an external server with HTTPS

You can use the embedded server and make it accessible externally like so

grails run-app -https -grails.server.host 192.168.56.102

Database

Edit grails-app/conf/DataSrouce.groovy. By default when running with grails run-app, it runs with an in-memory database that is wiped when the app shuts down. If you want to use a simple, file-based database that persists betwen shutdowns, you can remove the mem: from the url parameter and change dbCreate='update'.

Testing

Unit Testing

You can unit test classes by using Grails' built-in testing features:

grails test-app -echoOut # runs all tests, with console output

grails test-app -unit Ven # runs only test/unit/VenTests.groovy

Functional Testing

You can use curl to execute OpenADR requests on the server like so:

curl -vd @xmpp-http-tests/httpRequest1.xml -H "Content-Type: application/xml" \
   http://localhost:8080/oadr2-vtn-groovy/OpenADR2/Simple/EiEvent

Or use the test console located at http://localhost:8080/oadr2-vtn-groovy/OADRTest/index

Packaging

Using grails command line: grails war

or with Maven: mvn package

Developer References

If you want to extend this project, here are several resources that will be helpful:

  • Grails Reference
  • Groovy API
  • Groovy JDK (extensions to Java classes)
  • Spring Framework Reference
  • Java EE API
  • Java SE API

TODO

  • Filter on OpenADR services to handle certificate auth
  • Web app auth

Credits

Much of the original code is based on a Play 2.0 app written by our 2012 summer intern Jeff Lajoie. It was then converted to Grails by one of our 2013 interns, Yang Xiang, with help from Thom Nichols.

This project also relies on the following open source frameworks and libraries to help make it awesome:

  • Twitter Bootstrap
  • JQuery
  • Font Awesome

About

Re-write of the open source VTN for OpenADR 2.0

open.enernoc.com/code

Resources

Readme
License
Activity
Custom properties

Stars

24 stars

Watchers

14 watching

Forks

42 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.