.. _activate:

Activate 
========

After deploying and starting of the Industrial Data Collector, it needs to be activated with activation code, following steps below:

1. Obtain activation key:

   * Open One-Way Automation Inc. online store page here: https://onewayautomation.com/online-store .

    .. raw:: html
    
      <br/>

    .. note:: For Academic Edition license keys please contact :ref:`support`.
  

   * Click on the link for checkout page for desired edition. This will redirect you to the online payment system web page.
     
    .. note:: Although it is called payment system, no credit card is required for free Community Edition.

   * On the online payment system web page, enter your contact information and click on ``Submit`` button. 

   * The system will generate activation code and send it to the e-mail address you provided. From that e-mail you will need activation key, which starts by letters VL:

.. thumbnail:: images/Activation-email.png


2. Activate Industrial Data Collector using its web configuration GUI which is by default available at http://localhost:4880. All license related activities can be done via ``License Information`` dialog window, opened by menu ``License/Status``.

  .. note:: You need first login in order to access the menu ``License``. Before starting of the application very first time, default login credentials should be set by using environment variables ``OVL_USER_ID`` and ``OVL_USER_PASSWORD``. If environment variables are not defined, then values ``admin`` / ``password`` will be used. After first login using these credentials, the application will display warning message and will force password change.

  In case if the machine where Industrial Data Collector is running has access to the Internet, activation can be done in online mode. If that machine has no access to the Internet, use offline activation mode. Steps to activate for these 2 cases are described in subsections below.

  * 2.1. Online activation.
 
    Screenshot below shows ``License Information`` dialog window to activate in on-line mode. Note that checkbox ``Activate off-line`` is off. 

    .. image:: images/activate-online.png

    * In the e-mail received in the previous step, find activation code (it is started by letters ``VL``) and copy it into clipboard.
    * Paste activation code into the ``Activation Code`` field. After entering the value, call to the backend is made, after that appearance / visibility of GUI controls might change. For example, if the activation key was already used before, label on the button ``Activate`` will change to ``Reactivate``.
    * In the ``Password`` field enter password, which will be used by online License Portal to access your activation code in the future, as well as that password is required to de-activate license and activate in other computer when such transfer is required. 
    * In the next field confirm password.
    * Enter email address, which will be used by online License Portal to restore your password in case if you forgot it.
    * Click on the ``Activate`` button to complete activation. Dialog window will popup asking to accept license terms. 
    * After accepting license terms, Industrial Data Collector will connect to the online licensing server and will be activated in case of success. After completion, notification message will appear displaying result of activation.
    * Refresh web page to display content which was not displayed in non-licensed state.

    .. raw:: html
    
      <br/>

  * 2.2. Offlie activation.
    
    If Industrial Data Collector cannot connect to the Internet, then turn on checkbox ``Activate offline``.
    
    * Paste activation code into the ``Activation Code`` field;
    * Click on the ``Activate`` button.
    * In the popup dialog window accept licensing terms.
    * In case of success, intermediate offline activation file ``ogamma-logger.lic`` will be created by the backend, and become available to download by link ``Download offline activation file``. Download it.

    .. raw:: html
    
      <br/>

    .. image:: images/activate-offline-1.png


    .. raw:: html
    
     <br/>


    * Open offline activation portal by the next link ``Upload file to the offline activation page ...``, chose previously downloaded file ``ogamma-logger.lic`` and upload it. 

      .. raw:: html
    
        <br/>

      .. image:: images/offline-activate-page.png


      .. raw:: html
    
        <br/>

    * Enter new password and email.
    * Cick on ``Activate`` button.

      .. image:: images/offline-activate-page-2.png


      .. raw:: html
    
        <br/>

    * Download generated license file ``ogamma-logger.cdm``.

      .. image:: images/offline-activate-page-3.png


      .. raw:: html
    
        <br/>

      .. raw:: html
    
        <br/>

    * Return to the ``License Status`` dialog window
    * By clicking on the button ``Select offline license activation file`` select file ``ogamma-logger.cdm`` and upload it by clicking on the button ``Upload``.
    * The license activation file will be uploaded, and dialog window will show current status as licensed.

      .. image:: images/licensed-status.png


      .. raw:: html
    
        <br/>

      .. raw:: html
    
        <br/>

    .. note:: License file `ogamma-logger.cdm` is expected to be located always in the  folder ``./data/[InstanceId]/`` (relative to the work directory) where ``[InstanceId]`` is unique identifier of the applicaion instance. The folder is created at the very first startup of the application. If you change location of the application installation folder or work directory, make sure to move license file accordingly too.

    .. raw:: html
  
      <br/>

.. note:: To manage your licenses, you can login to the License Portal, which is accessible via `License/My License Portal` menu.

.. _uploadamul:

Upload Annual Maintenance and Upgrades License.
==================================================

Starting from version 2.2.0 valid ``Annual Maintenance and Upgrades License`` is required. For details about this license please refer to this section:  :ref:`amul`

After obtaining the AMU license file from the vendor, to install it, open the dialog window by menu command ``License / Status``, and click on the button ``Upload AMU License file``. A new dialog window will be opened. Select the license file from the filesystem, and click on the button ``Upload``. 

To view the current status of the AMU License, open the ``License Information`` dialog window by menu command ``License / Status``. The current status of the AMU License and its expiration date will be displayed in the section ``Annual Maintenance and Upgrades License``.

One or more AMU license files can be uploaded. Also, if the same file is uploaded by mistake multiple times, that does not cause a problem. After uploading the AMUL file neither restart nor connection to the Internet is required to apply it. 

.. note:: AMU licenses are associated with the original license. You can figure out what the original license the AMU License file is associated with by its file name. The format of the file name is ``amu-XXXX-YYYYYYYYYYYYYYYY.lic``, where ``XXXX`` is the last 4 letters of the original license activation code.

.. image:: images/amul.png

.. raw:: html

	<br/>
				
Reactivate.
===========

If you need to move the instance of Industrial Data Collector to another machine, that instance can be de-activated. The password which was used at activation stage will be required.

To re-activate instance in another machine, repeat activation steps on that machine. In case if it fails with error message saying that re-activation is expected, button Re-activate will be enabled and after entering of **old password** and **new password** re-activation should succeed.

Upgrade product edition with a new key.
=======================================

In order to upgrade to commercial product edition:

* Deactivate existing license.
 
  * Via menu ``License/Status``, open the ``License Information`` dialog window.
  * Click on the button ``Deactivate``.

  .. note :: For de-activation it will ask you to enter the old password used at the activation. If you do not remember that password:

    * Copy existing license key into clipboard (from the ``License Information`` dialog window).
    * Close that window, open Licensing portal (via menu ``License / My license Portal``).
    *	In the ``Manage License Info / License Code`` field paste license key from clipboard.
    *	Click on the ``Recover Password`` button.
    
    An email will be sent to your address with your password.

* Activate with the new license key.