System information

Table Of Contents
i.LON SmartServer 2.0 Programmer’s Reference
14-26
14.3.3
Using the Set Function on a LONWORKS Device
You can use the Set function to overwrite the configuration of a device, or to create a new device. The
input parameters you supply to the function will include one or more <Item> elements. Each <Item>
element includes a <UCPTname> property that specifies a unique device to be created or modified.
Each <Item> element may also include a series of properties that define the configuration of the new
(or modified) device. This set of properties is the same whether you are creating a new device or
modifying an existing device.
If you are creating a new device, you only need to specify the <UCPTtransceiverId> property; all
other properties are optional. You can commission the device and set the device application
online by providing the <UCPTcommissionStatus> and <UCPTapplicationStatus> properties and
setting them to COMMISSIONED and APP_RUNNING respectively. Otherwise, the device will
be decommissioned and/or set offline upon creation.
If you are modifying an existing device, you must specify the <UCPThandle> property. In
addition, all other properties should be filled; otherwise the values stored in them are erased. The
previous section,
Using the Get Function on a LONWORKS Device, details the properties you can
include in the Set function.
You can set multiple devices with a single Set message. However, you should not attempt to create or
write to more than 100 devices with a single call to the Set function. The following example
demonstrates how to create a new L
ONWORKS device. Note that in this example, the device interface
(XIF) file is also activated. This automatically creates the device’s functional blocks and data points
without having to explicitly add them using a Set command. See
Issuing Network Management
Commands for more information on using the GetTemplate network management command.
Request (create a new L
ONWORKS device on the SmartServer and activate the device interface)
<Set xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>
<Item xsi:type="LON_Device_Cfg">
<UCPTname>Net/LON/DIO-2</UCPTname>
<UCPTuniqueId>00a145784600</UCPTuniqueId>
<UCPTprogramId>80000105288a0403</UCPTprogramId>
<UCPTapplicationStatus LonFormat="UCPTapplicationStatus">APP_RUNNING</UCPTapplicationStatus>
<UCPTcommissionStatus LonFormat="UCPTcommissionStatus">COMMISSIONED</UCPTcommissionStatus>
<UCPTurlTemplate>/root/lonWorks/Import/Echelon/LonPoint/Version3/dio-10v3.xif</UCPTurlTemplat
e>
<Command>
<UCPTcommand>GetTemplate</UCPTcommand>
<UCPTstatus LonFormat="UCPTstatus">STATUS_REQUEST</UCPTstatus>
</Command>
</Item>
</iLonItem>
</Set>
Response
<SetResponse xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>
<Item>
<UCPTname>Net/LON/DIO-2</UCPTname>
</Item>
</iLonItem>
</SetResponse>
14.3.3.1 Issuing Network Management Commands
You can use the Set function to issue network management commands on LONWORKS devices. You
can use network management commands to commission/decommission devices, set device
applications online/offline, upgrade devices by downloading application images files (.apb extension)
to them, activate device templates, reset devices, wink devices, and fetch the program IDs of devices.