https://www.hivemq.com/public-mqtt-broker/
This test is free and uses a public broker. The data could be seen by individuals outside of the organization so we recommend using our free data generation tool to test the connection. In this instance the broker is HiveMQ. This test can work with a number of public brokers. The data generation tool is available upon request and comes with some installs.
- The first step is to install the data generation tool (if it is not already present). This can be installed in any location on the machine.
- A config file will need created to send the data generated to the broker instance. In this instance we created the config file using notepad++. The config file will need to reside in the C:\ProgramData\Canary Labs\Data Generation folder. A copy of this file can be sent upon request that can be modified to the unique instance.
HOST: The host field is where the broker is located.
PORT: The next field specifies the port. 1883 is an anonymous port that the Hive broker is using.
CLIENTID: This must be a unique name to the broker. In this example we are just using a string of random letters.
USERNAME: Is left blank because we have not created a username.
PASSWORD: Is left blank because we have not created a password.
GROUPID: Can be anything for this example.
NODEID: Can be anything for this example.
DEVICEID: Can be anything for this example.
- Next the data generation tags will need defined and sent to the broker. This is done by opening the data generation exe. A list of about 20 tags with different data types should populate. The interface will allow you to define data ranges, create more tags, cycle values at different rates, and create different data patterns. Data generation can also be used to write and test scenarios on a local machine. The xml file above was created to allow us to target the generated data to the MQTT broker. This option will now be displayed as the first field under values as in the picture below. To start sending the data flow click on the logging tab and hit the start button.
Setting up the MQTT configuration
Reference this link to set up the MQTT collector.
https://help.canarylabs.com/hc/en-us/articles/360046916793-Configuring-the-MQTT-collector
Below I will list a few helpful notes to assist with the set up process.
- When configuring the servers tab portion, the broker is an anonymous connection not using security or security protocols. The username and password will need a space put in the field or it will throw an error.
- In the subscriptions field the topic path will need to specify the sparkplugB protocol/groupid/wildcard/nodeid/multilevel wildcard in the topic path to pick up the tags.
Comments
0 comments
Article is closed for comments.