VOLTTRON Central Demo¶
VOLTTRON Central is a platform management web application that allows platforms to communicate and to be managed from a centralized server. This agent alleviates the need to ssh into independent nodes in order to manage them. The demo will start up three different instances of VOLTTRON with three historians and different agents on each host. The following entries will help to navigate around the VOLTTRON Central interface.
- Getting Started
- Remote Platform Configuration
- Starting the Demo
- Stopping the Demo
- Log In
- Log Out
- Platforms Tree
- Loading the Tree
- Health Status
- Filter the Tree
- Platforms Screen
- Register New Platform
- Deregister Platform
- Platform View
- Add Charts
- Dashboard Charts
- Remove Charts
After building VOLTTRON, open three shells with the current directory the root of the VOLTTRON repository. Then activate the VOLTTRON environment and export the VOLTTRON_HOME variable. The home variable needs to be different for each instance.
If you are using Terminator you can right click and select “Split Vertically”. This helps us keep from losing terminal windows or duplicating work.
$ source env/bin/activate $ export VOLTTRON_HOME=~/.volttron1
One of our instances will have a VOLTTRON Central agent. We will install a platform agent and a historian on all three platforms.
Run vcfg in the first shell. This command will ask how the instance should be set up. Many of the options have defaults that will be sufficient. When asked if this instance is a VOLTTRON Central enter y. Read through the options and use the enter key to accept default options. There are no default credentials for VOLTTRON Central. You can have it install the agents at this time. Below is an example configuration. In this case, username is user and localhost is volttron-pc.
(volttron)user@volttron-pc:~/volttron$ vcfg Your VOLTTRON_HOME currently set to: /home/user/.volttron1 Is this the volttron you are attempting to setup? [Y]: What type of message bus (rmq/zmq)? [zmq]: What is the vip address? [tcp://127.0.0.1]: What is the port for the vip address? : Is this instance web enabled? [N]: y What is the protocol for this instance? [https]: Web address set to: https://volttron-pc What is the port for this instance? : Would you like to generate a new web certificate? [Y]: WARNING! CA certificate does not exist. Create new root CA? [Y]: Please enter the following details for web server certificate: Country: [US]: State: WA Location: Richland Organization: PNNL Organization Unit: VOLTTRON Created CA cert Creating new web server certificate. Is this an instance of volttron central? [N]: y Configuring /home/user/volttron/services/core/VolttronCentral. Enter volttron central admin user name: <your volttron central admin username here> Enter volttron central admin password: <your volttron central admin password here> Retype password: <retype your volttron central admin password here> Installing volttron central. Should the agent autostart? [N]: y Will this instance be controlled by volttron central? [Y]: y Configuring /home/user/volttron/services/core/VolttronCentralPlatform. What is the name of this instance? [volttron1]: Volttron central address set to https://volttron-pc:8443 Should the agent autostart? [N]: y Would you like to install a platform historian? [N]: y Configuring /home/user/volttron/services/core/SQLHistorian. Should the agent autostart? [N]: y Would you like to install a master driver? [N]: y Configuring /home/user/volttron/services/core/MasterDriverAgent. Would you like to install a fake device on the master driver? [N]: y Should the agent autostart? [N]: y Would you like to install a listener agent? [N]: y Configuring examples/ListenerAgent. Should the agent autostart? [N]: y Finished configuration! You can now start the volttron instance. If you need to change the instance configuration you can edit the config file is at /home/user/.volttron1/config (volttron)user@volttron-pc:~/volttron$
VOLTTRON Central needs to accept the connecting instances’ public keys. For this example we’ll allow any CURVE credentials to be accepted. After starting, the command vctl auth add will prompt the user for information about how the credentials should be used. We can simply hit Enter to select defaults on all fields except credentials, where we will type /.*/
$ vctl auth add --credentials "/.*/" added entry domain=None, address=None, mechanism='CURVE', credentials=u'/.*/', user_id='63b126a7-2941-4ebe-8588-711d1e6c70d1'
For more information on authorization see authentication.
Remote Platform Configuration¶
The next step is to configure the instances that will connect to VOLTTRON Central. In the second and third terminal windows run vcfg. Like the VOLTTRON_HOME variable, these instances need to have unique addresses.
Install a platform agent and a historian as before. Since we used the default options when configuring VOLTTRON Central, we can use the default options when configuring these platform agents as well. The configuration will be a little different.
(volttron)user@volttron-pc:~/volttron$ vcfg Your VOLTTRON_HOME currently set to: /home/user/.volttron2 Is this the volttron you are attempting to setup? [Y]: What type of message bus (rmq/zmq)? [zmq]: What is the vip address? [tcp://127.0.0.1]: tcp://127.0.0.2 What is the port for the vip address? : Is this instance web enabled? [N]: Is this an instance of volttron central? [N]: Will this instance be controlled by volttron central? [Y]: y Configuring /home/user/volttron/services/core/VolttronCentralPlatform. What is the name of this instance? [volttron1]: What is the hostname for volttron central? [https://volttron-pc]: What is the port for volttron central? : Should the agent autostart? [N]: y Would you like to install a platform historian? [N]: y Configuring /home/user/volttron/services/core/SQLHistorian. Should the agent autostart? [N]: y Would you like to install a master driver? [N]: Would you like to install a listener agent? [N]: Finished configuration! You can now start the volttron instance. If you need to change the instance configuration you can edit the config file is at /home/user/.volttron2/config (volttron)user@volttron-pc:~/volttron$
Starting the Demo¶
Start each Volttron instance after configuration. The “-l” option in the following command tells volttron to log to a file. The file name should be different for each instance.
$ volttron -l log1&
If you choose to not start your agents with their platforms they will need to be started by hand.
List the installed agents with
$ vctl status
A portion of each agent’s uuid makes up the leftmost column of the status output. This is all that is needed to start or stop the agent. If any installed agents share a common prefix then more of the uuid will be needed to identify it.
$ vctl start uuid
$ vctl start --tag tag
In each of the above examples one could use * suffix to match more than one agent.
Open your browser to localhost:8443/vc/index.hmtl and and log in with the credentials you provided. The platform agents should be automatically register with VOLTTRON central.
localhost is the local host of your machine. In the above examples, this was volttron-pc.
Stopping the Demo¶
Once you have completed your walk through of the different elements of the VOLTTRON Central demo you can stop the demos by executing the following command in each terminal window.
$ vctl shutdown --platform
Once the demo is complete you may wish to see the VOLTTRON Central Management Agent page for more details on how to configure the agent for your specific use case.
To log in to VOLTTRON Central, navigate in a browser to localhost:8443/vc/index.html, and enter the user name and password on the login screen.
To log out of VOLTTRON Central, click the link at the top right of the screen.
The side panel on the left of the screen can be extended to reveal the tree view of registered platforms.
Top-level nodes in the tree are platforms. Platforms can be expanded in the tree to reveal installed agents, devices on buildings, and performance statistics about the platform instances.
Loading the Tree¶
The initial state of the tree is not loaded. The first time a top-level node is expanded is when the items for that platform are loaded.
After a platform has been loaded in the tree, all the items under a node can be quickly expanded by double-clicking on the node.
The health status of an item in the tree is indicated by the color and shape next to it. A green triangle means healthy, a red circle means there’s a problem, and a gray rectangle means the status can’t be determined.
Information about the health status also may be found by hovering the cursor over the item.
Filter the Tree¶
The tree can be filtered by typing in the search field at the top or clicking on a status button next to the search field.
Meta terms such as “status” can also be used as filter keys. Type the keyword “status” followed by a colon, and then the word “good,” “bad,” or “unknown.”
This screen lists the registered VOLTTRON platforms and allows new platforms to be registered by clicking the Register Platform button. Each platform is listed with its unique ID and the number and status of its agents. The platform’s name is a link that can be clicked on to go to the platform management view.
From the platforms screen, click on the name link of a platform to manage it. Managing a platform includes installing, starting, stopping, and removing its agents.
To install a new agent, all you need is the agent’s wheel file. Click on the button and choose the file to upload it and install the agent.
To start, stop, or remove an agent, click on the button next to the agent in the list. Buttons may be disabled if the user lacks the correct permission to perform the action or if the action can’t be performed on a specific type of agent. For instance, platform agents and VOLTTRON Central agents can’t be removed or stopped, but they can be restarted if they’ve been interrupted.
Performance statistics and device points can be added to charts either from the Charts page or from the platforms tree in the side panel.
Click the Charts link at the top-right corner of the screen to go to the Charts page.
From the Charts page, click the Add Chart button to open the Add Chart window.
Click in the topics input field to make the list of available chart topics appear.
Scroll and select from the list, or type in the field to filter the list, and then select.
Select a chart type and click the Load Chart button to close the window and load the chart.
To add charts from the side panel, check boxes next to items in the tree.
Choose points with the same name from multiple platforms or devices to plot more than one line in a chart.
Move the cursor arrow over the chart to inspect the graphs.
To change the chart’s type, click on the Chart Type button and choose a different option.
To pin a chart to the Dashboard, click the Pin Chart button to toggle it. When the pin image is black and upright, the chart is pinned; when the pin image is gray and diagonal, the chart is not pinned and won’t appear on the Dashboard.
Charts that have been pinned to the Dashboard are saved to the database and will automatically load when the user logs in to VOLTTRON Central. Different users can save their own configurations of dashboard charts.
To remove a chart, uncheck the box next to the item in the tree or click the X button next to the chart on the Charts page. Removing a chart removes it from the Charts page and the Dashboard.