In this quickstart, you will use a Python script to simulate a connected lightbulb. You will then create a development dashboard within Murano where you have the ability to remotely turn the lightbulb on and off.
No hardware is required to complete this guide.
To complete this guide, you must first download and install Python 2.7 from the Python website.
In this section, you will create a new Product in Murano.
In your browser, navigate to the Murano Product tab.
To add a Product, click "NEW PRODUCT."
In the New Product popup:
Enter a name for the Product in the Name field.
Select Connected lightbulb example from the Choose starting point drop-down menu.
Once the Product has been created, navigate to the DEFINITION tab.
These are the resources your device will interact with. They were created automatically from the product template you selected in the previous step. In this example, the device will generally write data to the uptime, temperature, and humidity aliases, while watching the state alias for changes.
In this section, you will create and activate a device under your Product in Murano.
In Murano, navigate to the DEVICES tab and click "NEW DEVICE."
In the New Device popup:
Enter a name for the device in the Name field. This will only be used to help you distinguish between devices.
Enter a serial number or device identifier in the Identity field. For the purpose of this example, you can use
Once the device is created, you will see it in your device list with a status of "notactivated."
In this section, you will use the Python device simulator to activate the new device you created and start simulating data.
Open your OS terminal and clone the Python simulator repo by entering the commands below into the terminal window. Press Enter.
git clone https://github.com/exosite/murano_python_device_simulator_example.git
Run the device simulator by entering the command below into the terminal window. Press Enter.
If successful, the script will ask you to enter your Product ID.
Paste your Product ID into the terminal and press Enter.
To find your Product ID:
In Murano, navigate to the Products tab and select the product you just created.
On the INFO tab, locate the Product ID and copy it.
Press Enter again to use the default device identity (000001). This matches the identity of the device you added earlier, so it will activate correctly.
NOTE: If you have already added 000001 and simulated the device before, you may need to create a new device (e.g., 000002) and change the default identity on the simulator. This will activate a new device and simulate data for it.
If the Python Simulator is running correctly, the script should show the device has been activated and whether the lightbulb is on or off.
Back in Murano, make sure the device shows a status of "activated" on the DEVICES tab.
Click the device and navigate to the RESOURCES tab to ensure data is showing up on the platform.
Now you have a simulated device pumping data into Exosite. Keep the simulator running throughout the rest of this guide.
In this section, you will create a dashboard to view the data from the connected lightbulb and turn it on and off remotely.
From the RESOURCES tab for your device, open the DASHBOARD tab.
Click "ADD PANE" to house the widgets you will create.
In the pane that appears, click the plus sign "+" to add a widget.
In the WIDGET popup that appears, select Toggle Switch from the TYPE drop-down menu and complete the remaining fields (TITLE: "On / Off"; VALUE: "resources["state"]"; ON VALUE: "1"; OFF VALUE: "0"). Click "SAVE".
Turn the light on and off for the simulated device using the toggle switch on your dashboard.
Switch to the terminal (while the simulator is running), and you will see the simulator indicates that it has received the state changes.
Congratulations—you just remotely turned a simulated device sensor on and off.