OpenADR VTN Server: Installation and Configuration

The OpenADR VTN server is a partial implementation of the OpenADR VTN specification developed by Kisensum for interoperability with the VOLTTRON core VEN agent implementation. The VTN server resides in the VOLTTRON applications repository, and is not supported by the VOLTTRON core team.

Known issues: The Kisensum implementation of the VTN server does not currently include support for registration, including QueryRegistration requests, create and cancel party requests, etc. Additionally, it does not implement opt-in behavior as specified by OpenADR. Finally, it has been found that requests containing empty basic authentication will be served a 403 error, while requests with no authentication will proceed to the correct endpoint normally.

The Kisensum VTN server is a Django application written in Python 3 and utilizing a Postgres database.


If you are planning to install your VTN server on the same system that contains your VOLTTRON instance and you are using RabbitMQ with VOLTTRON, you will need to set up a new instance of RabbitMQ for VTN. In production, the VTN server should be on a different device than VOLTTRON, and as such it is recommended that your VTN server is in it’s own VM or on it’s own machine. If you still wish to set up two instances of RabbitMQ on the same system, please refer to for further details.

Get Source Code

To install the VTN server, first get the code by cloning volttron-applications from github and checking out the openadr software.

$ cd ~/repos
$ git clone
$ cd volttron-applications
$ git checkout master

Install Python 3

After installing Python3 on the server, configure an openadr virtual environment:

$ sudo pip install virtualenvwrapper
$ mkdir ~/.virtualenvs (if it doesn’t exist already)

Edit ~/.bashrc and add these lines:

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/repos/volttron-applications/kisensum/openadr

Create the openadr project’s virtual environment:

$ source ~/.bashrc
$ mkvirtualenv -p /usr/bin/python3 openadr
$ setvirtualenvproject openadr ~/repos/volttron-applications/kisensum/openadr
$ workon openadr

From this point on, use workon openadr to operate within the openadr virtual environment.

Create a local site override for Django’s base settings file as follows. First, create ~/.virtualenvs/openadr/.settings in a text editor, adding the following line to it:

Then, edit ~/.virtualenvs/openadr/postactivate, adding the following lines:


# Load the default DJANGO_SETTINGS_MODULE from a .settings
# file in the django project root directory.

Finally, create $PROJECT_HOME/openadr/openadr/openadr/settings/, which holds overrides to, the Django base settings file. At a minimum, this file should contain the following:

from .base import *

A more restrictive ALLOWED_HOSTS setting (e.g. ‘’) should be used in place of ‘*’ if it is known.

Use Pip to Install Third-Party Software

$ workon openadr
$ pip install -r requirements.txt

Set up a Postgres Database

Install postgres.

Create a postgres user.

Create a postgres database named openadr.

(The user name, user password, and database name must match what is in $PROJECT_HOME/openadr/openadr/settings/ or the override settings in $PROJECT_HOME/openadr/openadr/settings/

You may have to edit /etc/postgresql/9.5/main/pg_hba.conf to be ‘md5’ authorization for ‘local’.

Migrate the Database and Create an Initial Superuser

$ workon openadr
$ cd openadr
$ python migrate
$ python createsuperuser

This is the user that will be used to login to the VTN application for the first time, and will be able to create other users and groups.

Configure Rabbitmq

rabbitmq is used by celery, which manages the openadr server’s periodic tasks.

Install and run rabbitmq as follows (for further information, see

$ sudo apt-get install rabbitmq-server

Start the rabbitmq server if it isn’t already running:

$ sudo rabbitmq-server -detached (note the single dash)

Start the VTN Server

$ workon openadr
$ cd openadr
$ python runserver

Start Celery

$ workon openadr
$ cd openadr
$ celery -A openadr worker -B

Configuration Parameters

The VTN supports the following configuration parameters, which can be found in and overriden in






OpenADR ID of this virtual top node. Virtual end nodes must know this VTN_ID to be able to communicate with the VTN.



The amount of time, in minutes, that determines how long the VTN will wait until displaying a given VEN offline. In other words, if the VTN does not receive any communication from a given VEN within ONLINE_INTERVAL_MINUTES minutes, the VTN will display said VEN as offline.



The VTN displays DR Event graph data by averaging individual VENs’ telemetry by GRAPH_TIMECHUNK_SECONDS seconds. This value should be adjusted according to how often VENs are sending the VTN telemetry.