In this class, you will become familiar with the SmartServer CMS Planning widget and how IAP nodes are used.
...
Context Hierarchy Overview
A context is a digital representation of a real world region, area, or space. Defining a digital model of a physical world allows for easier navigation, control, and management of devices that are installed in a building or campus facility. A context can be linked to one or more system entities, such as devices or device groups, and can be of the following types:
...
To begin working with the Mango HQ context, you can either:
- Download the sample context hierarchy file from the SmartServer GitHub Repository → Node-RED Tutorial folder and import it using the Planning widget. OR
- Create your own context as described in the section Step 2 - Define Contexts, and provision the devices on the campus as described in the section Defining Device Types. You will need to create a context that comprises one campus and two buildings, with each building containing two floors, and each floor having four rooms and two VAV areas.
...
To create this flow, perform the following steps:
- Download Exercise 2.1 from the SmartServer GitHub Repository → Node-RED Tutorial folder and import it into the Sequencing widget.
This downloaded flow will serve as a template for the flow that you will be creating in this exercise, and will look similar to the following in your workspace: - Click Deploy to save the flow.
- Click the Add Flow button ( ) to begin creating a new flow.
A new flow tab is added to the workspace. - Double-click the new tab on the workspace.
The Edit flow view appears. - Enter the flow name.
- Click Done.
- Create and provision the LON room sensor if you have not already done so:
- Import the Lon Channel.dtp.zip from the Starter Kit archive → LON Channel folder using the Device Types widget.
- Create a new device using the Devices widget (see Discovering, Defining, or Importing Devices).
- Name: DIO-01
- Integration method: Guided discovery
- Context: Mango HQ/Building 1/Floor 1/Office 1
- UID: leave empty (will be filled in by guided discovery)
- Driver: leave empty (will be filled in by guided discovery)
- Device type: leave empty (will be filled in by guided discovery)
- Press the service button located on the lower left portion of the SC 100-MP device.
- Provision the SC 100-MP device on your Starter Kit.
See SmartServer IoT's Starter Kit User's Guide → Setting up the LON Channel section for more information about creating and setting up this device.
- Create and provision the VAV controller (the DTP file that was previously imported also contains the VAV application and the XIF files).
- Create a new device using the Devices widget, and (see Discovering, Defining, or Importing Devices).
- Name: VAV sim
- Integration method: Guided discovery
- Context: Mango HQ/Building 1/Floor 1/Office 1
- UID: leave empty (will be filled in by guided discovery)
- Driver: leave empty (will be filled in by guided discovery)
- Device type: leave empty (will be filled in by guided discovery)
- Press the service button located on the upper right portion of the FT 6050 EVB board; doing so populates this field.
- Provision the FT 6050 EVB device on your Starter Kit using the Provisioning, Deprovisioning, and Replacing Devices.
See SmartServer IoT's Starter Kit User's Guide → Setting up the LON Channel section for more information about creating and setting up this device.
- Create a new device using the Devices widget, and (see Discovering, Defining, or Importing Devices).
- Drag the IAP Input node onto the workspace.
- Double-click the IAP Input node.
The Edit iap-input node view appears. - Enter SC100 nvoTempSensor in the Name field.
- Select the Fixed checkbox to indicate that a specific datapoint on a specific device is being selected.
Apply filters to select the datapoint nvoTempSensor (the reading from the temperature sensor in the SC 100-MP device) for the DIO-01 device.
Note NOTE: You may need to deselect the View all datapoints checkbox. - Click Done.
- Click Deploy.
- Drag the debug node and connect it to the SC100 nvoTempSensor node in order to log the datapoint value in the console.
- Double-click the debug node.
The Edit debug node view appears. - Set the Output field as msg.payload.data and select the node status checkbox.
- Click Done.
- Click Deploy to save your changes.
Datapoint values will appear in the debug console as they are updated.
To switch to the console view, click the Debug button ().
To deactivate debugging, click the end of the node, and then click Deploy to save your changes. Try setting different values in the Properties → Polling interval field on the Edit iap-input node view to see how often the data gets updated in the debug node. Polling interval specifies the time in seconds that you want to see the data updated from the device on-demand.
Note Note: The polling rate is always determined by the polling setting in the Datapoint Properties widget. The interval setting in the IAP Input node allows you to specify a shorter interval. Specifying a longer interval in the IAP Input node will have no effect.
For example:If IAP Input node polling interval = 1 second and Datapoint Properties widget polling interval = 10 seconds, the datapoint will be polled every 1 second (set by the IAP Input node polling interval).
If IAP Input node polling interval = 10 seconds and Datapoint Properties widget polling interval = 1 second, the datapoint will be polled every 1 second (set by the Datapoint Properties polling interval).
- Drag another IAP Input node onto the workspace.
- Double-click the IAP Input node.
The Edit iap-input node view appears. - Enter SC100 0/nvoDI (Occ) in the Name field.
- Select the Fixed checkbox to indicate that a specific datapoint on a specific device is being selected.
Apply filters to select the datapoint nvoDI (the reading for occupancy in the SC 100-MP device) for the DIO-01 device.
Note NOTE: With multiple nvoDI datapoints, be sure to select [SC100-MP/Digital Input/0/nvoDI]. You may also need to deselect the View all datapoints checkbox.
- Click Done.
- Click Deploy to save your changes.
With the IAP Input nodes and debug node created in the flow, the steps that follow are to create the IAP Output nodes. - To write the datapoint in SmartServer IoT via IAP message broker, drag the IAP Output node onto the workspace.
- Double-click the IAP Output node.
The Edit iap-output node view appears. - Enter VAV_sim nviSpaceTemp in the Name field.
Apply filters to select the datapoint nviSpaceTemp (the reading from the temperature sensor in the FT 6050 EVB) for the VAV sim device.
- Click Done.
Click Deploy to save your changes.
The next set of steps will add and configure an inject node. This node will be used to inject some values into the IAP Output node (VAV_sim nviSpaceTemp) in order to demonstrate that it works.- Drag the inject node onto the workspace and connect it to the VAV_sim nviSpaceTemp node.
- Double-click the inject node.
The Edit inject node view appears. - Select {}JSON from the msg.payload dropdown list.
Enter {"data":25} in the msg.payload field.
- Enter ev/data in the msg.topic field.
- Click Done.
- Click Deploy to save your changes.
- Drag another IAP Output node onto the workspace.
- Double-click the IAP Output node.
The Edit iap-output node view appears. - Enter VAV_sim nviOccSensor in the Name field.
Apply filters to select the datapoint nviOccSensor (the reading for occupancy in the FT 6050 EVB device) for the VAV sim device.
- Click Done.
- Click Deploy to save your changes.
- Connect the SC100 nvoTempSensor and VAV_sim nviSpaceTemp nodes, and click Deploy.
With this connection, you should be able to observe temperature changes on the FT 6050 EVB LCD display by touching the LON sensor. - You can also observe temperature reading changes on the FT 6050 EVB LCD display by clicking the end of the inject node.
The FT 6050 EVB LCD display should show a temperature reading of 25 degrees Celsius.
...
Once you have completed the exercise in this section, continue with /wiki/spaces/TEMP/pages/1476791Class 3 - Dataflows.