How to connect with Hive MQTT

Requirements

Procedures

Follow these steps to set up IoT connection between LOGO! BM and Hive MQTT.

  1. Sign up in HiveMQ Cloud.

  2. Sign in.

  3. Click to get the Cloud connection configuration information.

    Here you get the Cluster URL, Port information. Copy and paste these information in a text file for later use in LOGO!Soft Comfort Cloud connection configuration.

  4. Click to set up credentials for your IoT devices. Remember the credential you set, which will be used in LOGO!Soft Comfort configuration.

  5. Register Hive MQTT IoT thing through Tools -> Transfer -> Cloud Connection Settings in LOGO!Soft Comfort. Click Register Thing button to start the process.

  6. Select "MQTT" in Cloud Type and click "Next" button.

  7. Enter MQTT Broker URL, Port which you have gotten in step 3; enter User Name and Password which you have set in step 4; set MQTT Client ID. Then click"Next" button.

  8. Select "TLS without authentication" as the Authentication Type. Then click "Next" button.

  9. Enter "Publish Topic" and "Subscribe Topic". You can name them by yourself. Then click "Next" button. Remember these two topic names, which will be used later to subscribe or publish data on Hive MQTT client.

  10. The Register Status page shows you that your registration is successful. Click "Finish" button to close the registration dialog.

Subscribe data from LOGO!

To subscribe and read data from LOGO! BM on Hive MQTT web client, follow these steps:

  1. Open cloud data transfer settings window through Tools -> Transfer -> Cloud Data Transfer Settings.

  2. Add a data item. In this example, we use "Array Data Format". Click "Write to LOGO!" to finish the configuration.

  3. Click "WEB CLIENT" in Hive MQTT to configure client connection.

  4. Enter the Username and Password, then click "CONNECT CLIENT" button. You can use the credential you have created in "ACCESS MANAGEMENT". Or you can click "CONNECT WITH GENERATED CREDENTIALS" button to connect client.

    Note

    The credential for client connection in Hive MQTT should not be the same credential that you use to configure Cloud connection in LOGO!Soft Comfort. Otherwise, the Cloud connection might be interrupted.

  5. Browse to Topic Subscriptions part. Enter the Publish Topic you have configured in Cloud connection in LOGO!Soft Comfort. Then click "SUBSCRIBE" button to subscribe messages.

    Now you can see messages LOGO! BM sends to the web client.

Publish data to LOGO!

To write and publish data from Hive MQTT web client to LOGO! BM, follow these steps:

  1. Browse to Publish Message part in Hive MQTT web client after client connection completes.

  2. Enter the Subscribe Topic you have configured in Cloud connection in LOGO!Soft Comfort.

  3. Write the data in integer array format in the Message box, then click "PUBLISH" button. Later you can see the successfully published messages in the web client, and you can also see the data is successfully changed in LOGO! BM.