HVAC Wiki

All things related to HVAC

Sidebar

suppliers:hvac.io:graphivac:installation

This is an old revision of the document!

Graphivac Server Installation

Graphivac 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:

Graphivac Server

The entire Graphivac 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 graphivac-server.jar

You can also provide a specific port number with the -p argument :

 java -jar graphivac-server.jar -p 3003

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

 http://localhost:3003

Adding Graphivac as a Service (Optional)

You might want to make sure the Graphivac 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 Graphivac as a service.

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

Open it and paste the following:

graphivac.conf
description "Graphivac 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/graphivac
#replace PORT with the desired port number
script
cd PATH-TO-THE-JAR
java -jar graphivac-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 graphivac.conf /etc/init/graphivac.conf

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