# vSolution Link Pro by WolfVision

Management tool for administrators to manage WolfVision devices

## General information
vSolution Link Pro is a .NET Core application, that can be run on different operating systems.
It is a web application which can be accessed through your web browser.

## Installation
Depending on your operating system, you need the corresponding archive or installer.
Other environments/configurations that are not described below may work but are not officially supported.

### Windows Desktop / MacOS

There is an installer called `vSolutionLinkPro.exe` for Windows and  `vSolutionLinkPro.pkg` for MacOS provided. The installation can be started by
executing the installer. The installation itself should be straight forward.
After installation, there should be a link on your desktop which opens vSolution Link Pro in your default web browser. 
Info: If port 80 is allready in use on your syystem please use the configuration file (appsettings.json) in order to change the port.

### Windows Server with Microsoft IIS

WolfVision provides a .zip archive of vSolution Link pro to host it on a Windows server.

Different versions of IIS may vary slightly.
vSolution Link Pro is delivered with a standard web.config, which, depending on your needs, can be adopted.

General information about how to host a .NET Core application on IIS can be found here:
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.0

#### Prerequisites

* Install the .NET Core Hosting Bundle (latest .net core 3.0.x)
  https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-3.0.0-windows-hosting-bundle-installer

#### Steps for deployment

* Extract the .zip to a folder accessible by the hosting IIS
* Execute steps from (Create the IIS site):
  https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.0#create-the-iis-site

## Update an existing installation

### Windows Desktop / MacOS
Simply run the update installer. It takes care of updating your vSolution Link Pro but preserves all your settings and data.

### Windows Server with Microsoft IIS

* Stop execution of vSolution Link Pro if it is currently running
* Make a copy of the `Data` folder from your current installation folder
* Extract the update .zip archive to your current installation folder
* Copy the content from your previously saved copy of `Data` to the current `Data` folder. Overwrite all files which are already present

## Configuration
All application specific settings are stored in a file called `appsettings.json`.
On Windows desktop installations, it can be found in the folder `C:\ProgramData\WolfVision\vSolution Link Pro`,
on a MacOS Installation, it can be found in the folder `/Library/Application Support/WolfVision/vSolution Link Pro`
otherwise it's located in `vSolutionLinkPro\Data`
It is devided into several sections:

- [ConnectionStrings](#connectionstrings)
- [DatabaseConfig](#databaseconfig)
- [DeviceManagement](#devicemanagement)
- [FirmwareManagement](#firmwaremanagement)
- [Hosting](#hosting)
- [Logging](#logging)
- [TokenConfig](#tokenconfig)
- [SettingsManagement](#settingsmanagement)
- [WolfProtCommunicator](#wolfprotcommunicator)
- [MailServer](#mailserver)

Each section contains one or more specific settings you may want to modify.
The most important settings are described below.
After changing a setting, a restart of vSolution Link Pro is required.

### ConnectionStrings
- `Default`: Connection string to the used database

### DatabaseConfig
_Do not change any settings in this area unless explicitely told by WolfVision_

### DeviceManagement
- `PollCycleSeconds`: Frequency in seconds, when device status in network is determined
- `UseMock`: Used for debugging purpose only. Do not activate.
- `StatusConnectedThreshold`: If a device was not seen on the network for this amount of time in seconds, it's considered to be _Offline_
Must be greater than `PollCycleSeconds`
- `AllowedSecondsForRestart`: Maximum amount of seconds what a device restart normally takes. Exceeding this threshold results in _Offline_ state for the corresponding device
- `DeviceDiscoveryEnabled`: Enables or disables automatic cyclic device discovery in the network
- `CommunicationTimeout`: Default timeout value in milliseconds for communication with WolfVision devices
- `WakeOnLanActive`: Enables or disables Wake On LAN functionality
- `WakeOnLanPort`: Port to be used to send Wake on LAN packet
- `WakeOnLanWaitSeconds`: Maximum amount of seconds to wait for a device to become _Online_. If device is not _Online_ after this amount of time, the Wake On LAN action is considered to have failed

### FirmwareManagement
- `AutoDownload`: If new firmware files are found on the WolfVision serve, should they be downloaded automatically?
- `LocalDirectory`: Local firmware file repository
Note: If run as service: This must be a folder accessible with the same user credentials used by the service
- `ConfigXmlURL`: URL of the config file published by WolfVision that contains current firmware version infos
- `ConfigXmlLocal`: Path to the local copy of the firmware version config file (see `ConfigXmlURL`)
- `SyncFWFilesFrequencyInMin`: Interval in minutes, used to periodically check `ConfigXmlURL` for updates
- `ProgrammingFWTimeoutInSec`: Do not change this setting unless explicitely told by WolfVision

### Hosting
- `Port`: HTTP port on which vSolution Link Pro is hosted
- `HttpsPort`: HTTPS port on which vSolution Link Pro is hosted
- `UseHttps`: see [SSL](#your-own-certificate)
- `CertificatePath`: see [SSL](#your-own-certificate)
- `CertificateKey`: see [SSL](#your-own-certificate)

### Logging
- `LogLevel/Default`: Change this value to change the log level.
Possible values are: `Trace`, `Debug`, `Info`, `Warn`, `Error` and `Fatal`

### TokenConfig
_Do not change any settings in this area unless explicitely told by WolfVision_

### SettingsManagement
- `LocalDirectory`: Local folder to store settings backups and templates
Note: If run as service: This must be a folder accessible with the same user credentials used by the service

### WolfProtCommunicator
- `DefaultTimeout`: Maximum allowed milliseconds to wait for a response when communicating with a WolfVision device
- `CleanupCycleSeconds`: Cleanup cycle in seconds, which checks for unused device connections. If such connections are found, they are automatically closed
- `AllowedInactivitySeconds`: Amount of seconds until a device connection is considered _Unused_

### MailServer
- `MailServer`: URL of mail server (e.g. smtp.myMailServer.com)
- `MailPort`: Port to be used to communicate with mail server (e.g. 25)
- `SenderName`: Name to be used as sender of generated emails
- `Sender`: Mail address associated with the sender name. Will be used as sender mail address in generated emails
- `Password`: Password to authenticate with mail server if authentication is required
- `UseAuthentication`: Enables or disables authentication with sender mail address and password when connectiong with mail server
- `UseSSL`: Enables or disabled secure communication with mail server

## SSL
You have following options to host vSolution Link Pro under HTTPS:

* Self signed certificate
* Your own certificate
* Your own certificate configured at the reverse-proxy of your choice (e.g. IIS)

### Self signed certificate
Adjust configuration in `appsettings.json`: `"UseHttps": true`
Drawback of this option is the browser warning that notifies users about a missing trusted authority.

### Your own certificate
Adjust configuration in `appsettings.json`:
* `"UseHttps": true`
* `"CertificatePath": "pathToYourCertificate.pfx"`
* `"CertificateKey": "passwordOfYourCertificate"`

### Your own certificate configured at the reverse-proxy
This is probably the desired option if vSolution Link Pro is hosted on a web server where multiple users can access.

Adjust configuration in `appsettings.json`:
* `"UseHttps": false`
