Interacting with Devices Using IAP/MQ

In this section we will explore using the IAP/MQ API to interact with Lon Devices.  To prepare for this section, you will need to have at least one FT 5000/6050 EVB loaded with the image located in ...apps\Example Support Files\Multisensor_ImageFiles.zip  (this path is relative to where you cloned the izot/smartserver-iot github repo on your computer).   Use nodetuil to load the application image.  This version of the application defaults to support external network management, and includes a visual response to the Wink command by flashing the blue LEDs at the bottom of the board. 

Prior to starting this exercise, you should use nodeutil to load the appropriate NDL file based on the target EVB board you have.  

The following steps setup this program example and should be done first.

Provisioning the Multi Sensor Example

If you have a SmartServer IoT in factory fresh condition, you can skip this section.  If you are unsure, take the time to run these steps.

  1. Open the SmartServer Configuration page as described in Accessing the SmartServer IoT Configuration Page.

  2. Clear the SmartServer databases

  3. Click the Firewall tab (prior to SmartServer 4.2, this tab is called Features) to enable features that were enabled before resetting the databases to defaults.

  4. Optionally, to use the RNI interface with Nodeutil, click the LON tab and enable the RNI feature, and then setup the RNI using the OpenLDV Lonworks Interfaces control panel applet. Use Nodeutil to load one or more FT 6050 EVB targets with the NDL images contained in the the Mutisensor_ImageFiles.zip archive referenced above.

  5. Click the CMS tab. Login to the SmartServer CMS as user apollo.

  6. Import the Multisensor_Example.dtp file found in the folder ..apps\Example Support Files\.

  7. Create a device using the Devices widget as follows:
    1. Name = MS-01
    2. Driver = LON
    3. Device Type = FT 6000 EVB Multisensor
    4. Integration method = Manual assignment or Guided discovery
    5. UID = The UID field must match the value of your target FT 6050 EVB.  As an option, set the UID to 000000000000, and when you provision the device (next step), press the service pin of your EVB.  

  8. Provision the device using the Devices widget. You should observe a burst of TX/RX activity on the U60, and after a short while, the service LED on the FT 6050 EVB should be off to indicate the device has been provisioned.  You will also see the icon for the device change color from blue to green.

  9. Test the device using the Devices widget Wink action. You should observe the blue LEDs on the bottom edge of the board flashing in response to the Wink message.

You have now used the CMS to provision a device that has code to implement a response to a wink command.  

Next Step

In the next section, you will learn how to write an application that will discover a provisioned device, and issue a wink command using the IAP/MQ API.  Continue with IAP/MQ Device Interaction Example.