Cedalo-FirstStep-Teaser.jpg

How to set up Eclipse Mosquitto MQTT Broker and connect a client

KatjaX
Community Manager

In this How-to we will cover the first steps in connecting a client to your Mosquitto broker.

What you need
  • An installation of the Mosquitto Broker on your ctrlX CORE
  • A valid license
  • The MQTT Explorer

For a quick introduction to Mosquitto click here.

First steps

After your installation, Mosquitto is available over your Navigation Menu on the left side of your Browser. Click it and open the “Management Center”.

NavBar MosquittoNavBar Mosquitto

The Management Center (MMC) allows managing Mosquitto via a Browser UI.
Gather real time information of your broker and set up the dynamic security. If you are used to working with a terminal, there is one embedded in the MMC.

To get started with a connection, you first need to create a client. Use the left side navigation and click on “Clients”. As you can see, there are no existing clients. Create one and click “Save”.

ClientClient

Clients need permissions to operate. These are administered via “Roles”. Without any assigned role, a client is not able to perform any action on Mosquitto. There are a couple of prebuild roles, which you can choose from, or you can create your own.

For now, choose the role “client”, which allows full publish and subscribe capabilities. Now, we are already set to connect to Mosquitto.

Client Role SelectionClient Role Selection

Open the MQTT Explorer, use the IP of your CORE and the port 8883 to connect.
Choose TLS on and uncheck the “Validate certificate” option.
Don´t forget to use the username and password from the client you just created.

MQTT ExplorerMQTT Explorer

When the connection is established, you can now send data to a topic and see it arrive in your MMC topic tree. Use the right side of the MQTT Explorer to set a topic and a payload to be send. After sending it, you are able to see it in the topic tree of your MMC.

MMC ExplorerMMC Explorer

Related Links

The Company

Cedalo AG is an IoT start-up based in Freiburg, Germany, that is truly devoted to Open Source. Our products constitute of Eclipse Foundation projects. Eclipse Streamsheets, the first product, is a no-code application platform which can easily subscribe and publish to data streams like MQTT or Apache Kafka. Business process users can build stream processing applications using a spreadsheet GUI and cell functions. A variety of diagram types provides fast dashboarding. Eclipse Mosquitto, the second product, is the most downloaded MQTT broker worldwide. Brokers orchestrate the data flow in modern IoT publish/subscribe architectures. Mosquitto excels in big installs on servers due to a high efficiency to handle a large number of parallel connections. However, its resource-friendly programming makes it ideal for usage on small ARM-based edge devices like the Raspberry Pi, as well.
Cedalo_Logo.png

KatjaX
KatjaX
Hi, I am Katja a member of the ctrlX AUTOMATION Community team. Feel free to reach out if you need any support.

Must Read

Trending

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist