Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
|
Peripheral devices (external sensors and actuators) are handled by the PeripheralDeviceManager interface. The device manager has a fixed number of slots that discovered sensors can be associated with. Assigning sensors to slots defines the order in which sensors are listed in other client interfaces like SNMP.
The peripheral device manager can either be accessed via its well-known URI /model/peripheraldevicemanager
, or its reference can be retrieved by using the getPeripheralDeviceManager method of the Pdu interface.
Peripheral devices must be assigned to one of the device manager's slots in order to be used. A device associated with a slot can have settings (like name or location) and a reading.
Settings for a sensor slot can be retrieved with the getSettings method and written with setSettings. getDevice returns information about the device associated with the slot (or null
if the slot is unassigned), as well as a reference to the respective NumericSensor or StateSensor instance.
Sensors must be assigned to one of the deivce manager's slots in order to be used. By default, newly discovered sensors are automatically associated with the first available slot. The assignment can be manually overridden with the assign and unassign methods of the PeripheralDeviceSlot interface: