Gambit's MIMIC Simulator is a rapid, multi-protocol simulation tool optimized for IoT. In a few steps, you can re-create a physical deployment, simulating real-world conditions such as GPS routes or sensor variables.
Table of Contents
MQTT Lab Setup
1. MQTT Lab Setup
Before starting, purchase the MQTT Lab of your preference, you will receive an email with the direct link to your lab when you finish the payment process.
Step 1: Click on the link you received via email, this link will open a tab in your browser with the lab view.
Step 2: Go to your Ubidots account and click on your profile, choose the API Credentials option, and copy your Default Token for the next steps.
Step 3: Back in the lab tab, click on
Step 1: Setup...
Step 4: Paste the token that you copied above, into the
Default Token field of the dialog. Then press
Step 5: Once you click OK, a new
Run Script Console tab will open with the output of the processing. If the
Task completed message appears, and there are no error messages, your lab is configured to work with your Ubidots account with the authentication parameters supplied.
2. Device Creation
The following steps will configure the devices to Publish data to Ubidots according to to Ubidots MQTT Documentation.
Step 1: In the MIMIC Ubidots MQTT Lab, click on
Ubidots Tutorial -> Step 2: Add Device...
Step 2: In the dialog window, type in the
Prefix field the label of the device to be created in your Ubidots account.
Step 3: Once you click the
OK button, a new
Run Script Console tab is opened in the browser with the output of the processing. If the
Task completed message appears, and there are no error messages, your new sensor device is configured in the MIMIC MQTT Lab, ready to connect to your Ubidots account. You can dismiss this tab, or switch back to the lab browser tab.
Step 4: Reload the MIMIC MQTT Lab window and the Device icon should have the label underneath.
Step 5: To start the device, select the icon(s) of the device(s) you want to start. Each selected device will have a blue indicator in the upper left. Then click on
Ubidots Tutorial -> Step 3: Start Device(s) -> Go!
Step 6: The selected icon(s) will turn green as if you had turned the power on.
Step 7: In your Ubidots cockpit
mimic-1 device page, to see the received telemetry you can click on the desired variable as shown below.
Now that it is running, you will see how the lab devices and your Ubidots are linked.
To check the configuration of the simulated device in MIMIC, select the device icon in the lab, then click on
Ubidots Tutorial -> Step 4: Investigate -> MQTT Configuration...
The MQTT configuration parameters for the devices are the following:
Config File - this defines the MIMIC simulation: what MQTT payload to send where and when. Here the publish is made every second.
The Light value changes randomly and the Temperature values can be dynamically controlled to achieve on-demand, consistent, real-time results.
Broker - Ubidots URL: industrial.api.ubidots.com
Port - 1883
ClientID - blank, meaning uses the default MIMIC client ID
Username - Ubidots Default Token
Password - not used
TLS - set to false to use insecure MQTT
These are configurable parameters you would need to set up in your real-world device to communicate with Ubidots, in case you want to change any of them, please contact Gambit communications for advanced settings.
To interactively change the temperature value to simulate a device overheating or any other critical case, please follow the next steps.
Step 8: In the MIMIC lab window, select the icon(s) of the device(s) you want to manipulate and start it. Each selected device will have a green icon and a blue indicator in the upper left. Then click on
Ubidots Tutorial -> Step 5: Change Telemetry...
Step 9: In the Change Telemetry dialog, change the Temperature value to the desired value. As soon as you slide the slider to a new value, the new temperature value is published. If you click OK, the value is preserved, if you click Cancel, the value goes back to what it was when you entered the dialog.
Finally, once you activate all the devices in the MIMIC MQTT lab, you will see in Ubidots the list of all the devices with the corresponding data.
3. Dashboard Creation
Now it’s time to build your own dashboard to start monitoring the data from your devices.
Go to the Dashboard (Data -> Dashboard) section of your Ubidots account.
Select the plus (+) icon located a the right-upper side of the page. Then select the widget types desired to display in your Ubidots’ Dashboard .
You can customize your Dashboards and application in just a few clicks, please refer to the following guides to learn how.