Instances directory – Echelon LonBridg Server User Manual

Page 22

Advertising
background image

16

Configuring the LonBridge Server

To add a new device for the LonBridge Server to monitor or control, add an XML

file for the device to the Classes directory. See Chapter 5,

LonBridge Device

Class File

, on page 34, for information about the XML elements that describe

devices and for an example class file.
To modify which network variables the LonBridge Server monitors or controls for
a device, edit the appropriate device class file with any text editor.
You must stop and restart the LonBridge Server whenever you add or change a
device class file.

Instances Directory

The Instances directory contains a single file (devices.xml) that the LonBridge

Server maintains. This file contains all of the devices that the LonBridge Server
has ever discovered.
Devices remain in this file even if they are no longer available. Each device has

an active attribute which specifies whether the LonBridge Server has received
any updates from the device recently. Thus, you can name a device, add

attributes to the device, or take the device offline (for example, to relocate it), and

your user-added attributes remain persistent in the devices.xml file.

Example File:

<devices>
<device nid="050182DC6900" id="0" fblock="-1" type="dimmer"
name="Lamp Module" brand="Echelon" active="false"
brightness="44" state="off" power="0" energy_hi="8"
energy_lo="5260" />
<device nid="0500FA901E00" id="1" fblock="-1" type="switch"
name="Washing Machine" brand="Echelon" active="true"
state="on" power="0" energy="136" />
<device nid="050182D38600" id="2" fblock="-1" type="switch"
name="Appliance Module 1" brand="Echelon"
active="marginal" state="off" power="0"
energy_hi="0" energy_lo="7195" />
<device nid="050182D37D00" id="3" fblock="-1" type="dimmer"
name="Lamp Module1" brand="Echelon"
active="true" brightness="42" state="on" power="0"
energy_hi="1" energy_lo="4883" />
<device nid="0501452B9A00" id="4" fblock="-1"
type="unknown" name="NEEK 1" brand="LonWorks"
active="false" />
</devices>

For each device, the file includes:

• The device’s Neuron ID (the nid attribute), retrieved from the device.
• An ID number (the id attribute), sequentially assigned by the LonBridge

Server. The ID is used by the LonBridge Server and by LonBridge client

applications to identify a specific device for a LonBridge API command.

• The device’s type, name, and brand (the type, name, and brand

attributes), retrieved from the device class file; type is set to “unknown”

for devices that do not match any device class file.

Advertising