Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Mashup Data Services allow you to access IoT data so you can push data to the platform's backend as well as pull data into the Mashup itself. In the table below, we describe some common Mashup Data Services that enable that functionality:
Service Name | Description |
GetProperties | Pulls in a particular Thing's Properties, as well as the associated current values contained within those Properties. GetProperties has an option to automatically update the Mashup whenever a Property value changes. |
GetPropertyValues | Pulls in a particular Thing's Properties and their associated current values. However, it does so in an All Data grouping, opening the possibility of assigning all Properties to the same Widget. This can be helpful with some Widgets, such as the List Widget. |
SetProperties | Pushes a value from some Widget (Checkbox, TextBox, etc.) into the Property of a Thing. |
NOTE: Using a combination of a "Get" and "Set" Mashup Service establishes a bidirectional communication between the Mashup and the backend IoT data storage.
In order to focus on the Mashup Builder in this lesson, we have created a Thing for you to download and import. This Thing has predefined Properties and associated Values which will simplify the demonstration of binding data to Widgets in subsequent steps.
You now have a Thing called MBQSThing from which you can retrieve data. To demonstrate this, we'll use the GetPropertyValues Service.
8. Click Done.
9. At the top, click Save.
In the top-left of the Mashup Builder, click the Explorer tab, select the Mashup itself, and you can see the connections between the Mashup and the Data sources.
Mashup Builder Section | Description |
Data | Previously empty, now has a reference to the GetPropertyValues Service of the MBQSThing. |
GetPropertyValues | On the Data tab, click GetPropertyValues. The Connections window in the bottom-center will update. |
Bindings | Shows the logical flow of the Mashup. In this instance, it shows how GetPropertyValues is called from the Event triggered by the Mashup being Loaded in a web browser. This means that all Properties of the MBQSThing will be available to the Mashup as soon as your UI is opened. |
Bind Widget to Property
Follow the steps below to place a Widget in the Mashup and bind the Property named Gauge_Value (of MBQSThing) to it.
5. Drag-and-drop MBQSThing > GetPropertyValues > Returned Data > All Data > Gauge_Value onto the Gauge Widget in the central Canvas area.
6. On the Select Binding Target pop-up, select Data.
7. At the top, click Save.
8. Click View Mashup.
In your new Mashup, notice that the Gauge has been set to the Gauge_Value default value of 25. In a real-world scenario, you would likely utilize an IoT sensor that would report back to the Thing storing the value. When the Mashup loads, that value would be set to the real-world sensor data value.
In the next few steps, you will build a GUI using several different Widgets and Services.
Click here to view Part 3 of this guide.