Exposing Data via MQTT
Overview
The MQTT protocol allows devices to send and receive data through a broker. With MQTT Explorer, you can easily view and test the data being transmitted to and from your NBnano devices. This guide will walk you through the process of setting up MQTT on the NBnano platform, creating a new user, and using MQTT Explorer to connect to your MQTT broker.
Setup MQTT on NBnano
Log in to Your NBnano Platform
- Log in as Admin:
- Use your personal credentials.
- Navigate to MQTT Settings:
- From the sidebar navigation pane, go to Project -> Network
- Access the MQTT Tab:
- Click on MQTT in the Network header.
- You will be taken to the MQTT Network page where you can view your MQTT network settings.
- Create a New User:
- To generate access to the MQTT broker, click on ‘Create User’ and make sure to save these details for later.
- Note: Usernames are autogenerated, and we do not display the password again after it has been generated.
- Be sure not to share your password or expose it in browser or client-side code to ensure the security of your account.
Once you have created your user, click on Apply to save your changes.
Testing MQTT with MQTT Explorer
To test the functionality of MQTT and ensure that everything is set up correctly on the NBnano, we recommend using MQTT Explorer. This is an easy-to-use tool that allows you to view and interact with MQTT topics and device data.
- Install MQTT Explorer:
- You can download and install MQTT Explorer from here.
- Connect MQTT Explorer to the Broker:
- Open MQTT Explorer and create a new connection.
- Configure MQTT Explorer Connection:
- Name your connection: Choose a name for your connection (e.g., “NBnano MQTT”).
- Host: Enter your NBnano IP address as the Host.
- Port: Enter the correct Port number (The port should always be set to 2883).
- Username and Password: Use the autogenerated username and password you created in the MQTT settings of your NBnano platform.
- Connect and View Topics:
- Once connected, MQTT Explorer will display the topics published by your devices.
- You can now view the data from your devices in real-time and troubleshoot or test different topics.
For further details on how to use MQTT Explorer, including advanced features and settings, visit their official website at https://mqtt-explorer.com/.
Need Assistance?
If you encounter any issues, please Contact Us for assistance.