Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

The first step is to load the following four Cirrus Link modules :

  • MQTT Distributor
  • MQTT Engine
  • MQTT Transmission
  • Record Store

specified in the 'Prerequisites' section of this document. To load the modules, launch the Ignition Gateway and open HTTP connection to it.  If Ignition Gateway is running on your development machine, use http://localhost:8088 to connect.  You should see thisa screen shown below:

Click the "CONFIGURE" tab to go to the 'Configuration Section'. Ignition will ask you to sign in; use the admin/password as your credentials.

After signing in, you will see the screen shown below. Go to 'SYSTEM' on the left hand side of the screen and select 'Modules'. 

...

These modules can be configured by clicking 'Settings' on the left hand side below each module. Note that the 'MQTT Distributor' and MQTT Engine modules should not be touched; they will use default configuration. The 'Record Store' module should be configured to point for the datasource used for storage, but this should needs be done after configuring database connections. Finally, the 'MQTT Transmission' module needs to be configured to define custom records to be published. This will be described in subsequent sections of this document.


Configure Database Connections:

Before configuring Database Connections in Ignition, make sure that MySQL is installed and a test database is setup. If not, please install the following version of MySQL:

$ mysql --version
mysql  Ver 14.14 Distrib 5.7.12, for osx10.11 (x86_64) using  EditLine wrapper

Then configure user and setup a database as shown below:

$ mysql -u root -p

Enter password: 

mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

Query OK, 0 rows affected (0.01 sec)

mysql> CREATE DATABASE testdb;

Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON testdb.* TO 'user'@'localhost';

Query OK, 0 rows affected (0.01 sec)

When database is created, login as a user and switch to this database as shown below.

$ mysql -u user -p

Enter password: 

mysql> USE testdb;

Database changed

The database is now ready, and the next step is to configure Database Connection in Ignition. To do this, go to Ignition 'Configuration Section' as was shown above and click 'Connections' under 'DATABASES' on the left hand side of the screen.  This will bring you to the 'Database Connections' setup page:

Image Added

Now, click the "Create new Database Connection..." link and the following 'Choose Driver' screen will appear:

Image Added

Select the 'MySQL ConnectorJ' option and click 'Next' to configure new database connection as shown below:

Image Added

On the 'New Database Connection' configuration page shown above, configure the following fields:

  • Name - database connection name to be set in the 'Record Store' module.
  • Description - description of this database connection
  • Connect URL - connect URL to the 'testdb' database that was created earlier
  • Username and password - MySQL user credentials

The second step is to configure the Tag Provider in Ignition in a way that MQTT Transmission understands. The Tag Provider needs to be set up in Ignition via the Ignition Designer.  Here is how to do this...

...