HVAC Wiki

All things related to HVAC

User Tools

Site Tools


suppliers:hvac.io:vigilia:installation

This is an old revision of the document!


Vigilia Installation

For self-hosted version only. To use the HVAC.IO servers instead, create an account and jump to Loggers.

The installation is separated in 3 main components:

They can all be installed on the same machine, or on separate servers and devices, depending on your network architecture.

Once this is done, you might want to take a look at Adding Vigilia as a Service

Database

For the time being, Vigilia only supports TokuMX. It is a fork of MongoDB, which features mind boggling increase in performance and reduction in the database size. (The choice was not made lightly; we tried many databases before settling with this one.)

TokuMX is supported on 64-bit Linux only, but virtual image should work too.

We recommend to use SSD drives, as their increased speed directly translate in how fast Vigilia will react. 250 to 500 Go should be plenty of space to store many years of data for networks composed of hundreds of thousands of objects. (Tokumx compression is really useful for this!)

Download and install by following the instructions on this page.

Once the database is installed, make sure everything works as intended by running the command mongo in the shell.

The command should be recognized AND it should connect successfully.

You can stop the process by pressing Ctrl-C in the shell.

Vigilia Server

For maximum speed, we recommend you install the Vigilia server on the same machine as the database.

Vigilia server runs on Java, meaning it can work on Linux, Windows and Mac.

Java

Make sure you have Java on your machine. (preferably 8 or higher)

To do so, open a command window and type

 java -version 

You should see the current Java installed, if any:

vigilia-server.jar

The entire Vigilia server is contained within a single .jar file.

This makes it surprisingly easy to update: just download the latest compiled version and overwrite the .jar file. (Your license and configurations are stored separately and will continue to work as expected.)

The application can be started with the following command:

 java -jar vigilia-server.jar <port number> 

(where <port number> is the port you want to use. If you don't know which one to take, use 47900.)

After a few seconds, the server should be up and running. You can now take your browser and go to:

 http://localhost:<port number> 

Create Admin Account

If Vigilia is able to connect to the database, you will be invited to create an account. The first account created will have the administrator rights.

Load License

Now that you have the administrator rights, you should load the license files. Go to Administration and then License. Select the license files and click upload.

You should see something similar to this:

Create an Organization

Organizations can have multiple members and contain many projects. A member will see all the organization projects.

Most will not need more than a single organization, so you can just use your own enterprise name.

In the administration page, click on “Organizations” (or go to your account page). Click on the “Create organization” button and create it.

Once the organization is created, click on its link.

Create a Project

Projects are what contains the recorded data. Inside a project, all BACnet device IDs must be unique.

In your organization page, click on “Create project” and create it.

Next, click on the configuration button.

This will bring you to a page with the project-id and the logger-key. You will need both to configure the logger(s).

Configure Service (optional)

If you want the application to start automatically when your server boot up, you should make sure to create a service, or configure your web server (like Tomcat) to use vigilia-server.jar.

Loggers

Loggers are software able to scan a BACnet network and send the data back to a Vigilia server.

The only publicly available logger is Wacnet (min version 1.8).

To start logging a network, begin by running Wacnet. Then go and configure a few things in the Vigilia Configs page :

Step 1: Connect to a Vigilia server

The first thing to configure is a Vigilia API URL. This will tell Wacnet where it should send its data.

It should have the following form:

http://<vigilia-IP-or-address>/api/v1

If you are using a port other than 80 or 443, you need to include it into the URL:

http://<vigilia-IP-or-address:47900>/api/v1

(Where 47900 is your port number)

Make sure Wacnet can see the provided URL!

Step 2: Project credentials

You have to provide a project ID and a logging key/password. Both are available through the project configurations on the Vigilia server.

Here's an example :

  • Project-id : 5371147be4b0222b740851a2
  • Logging key: asdi34h5ha

Make sure Wacnet has access to the project :

Start Logging

When Wacnet starts, it searches for Vigilia configurations. If it finds some, it will start logging automatically.

To start the logging without restarting Wacnet, expand the details part of the page and click on “Start”.

Adding Vigilia as a Service

You might want to make sure the Vigilia server always starts as soon as the server boots, or that it restores itself in case of a crash.

For this, you'll have to add Vigilia as a service.

Start by creating a file named “vigilia.conf”.

Open it and paste the following:

description "Vigilia Server"
author "Christian Fortin, HVAC.IO"
 
start on runlevel [2345]
stop on runlevel [!2345]
 
 
#Respawn the process if it crashes
#If it respawns more than 10 times in 60 seconds stop
respawn
respawn limit 10 60
 
expect fork
 
#replace PATH-TO-THE-JAR with something like /home/hvacio/vigilia
#replace PORT with the desired port number
script
    cd PATH-TO-THE-JAR
    java -jar vigilia-server.jar PORT &
end script

Now, once you replaced PATH-TO-THE-JAR and PORT with their correct values, move the file to /etc/init:

sudo mv vigilia.conf /etc/init/vigilia.conf

That's it! Now reboot and Vigilia should start automatically.

To get more info about Upstart and services, see http://upstart.ubuntu.com/cookbook/.

suppliers/hvac.io/vigilia/installation.1443380564.txt.gz · Last modified: 2015/09/27 15:02 (external edit)