It's not unusual to see some daisy-chained PDUs, connected together in master-slave mode, to only consume 1 IP address for their communication interface (generally, network card exposing SNMP data) and expose only 1 point of communication to manage several devices.
This breaks the historical consideration of NUT that 1 driver provides data for 1 device.
However, there is a need and a smart approach can be considered to fulfill it while not breaking the standard scope (sort of compatibility).
Functional proposal
Specification
The daisychain support will use the device collection to extend the historical NUT scope (1 driver - 1 device) and provide data from the additional devices.
A new variable will be introduce to express the number of devices exposed: device.count:
- default to 1
- if higher than 1, enable daisychain support and access devices data through device.X.{...}
To ensure backward compatibility in NUT, the data of the various devices will be exposed the following way:
- A special case is "device.0", for the master device of the daisychain.
It is equivalent to "device" and root collections, and is omitted from the device subcollection
since all the numerous data are already exposed. As an example, to access
device.0.outlet.1.id, you use the normal "outlet.1.id".
- For the 1rst daisy chained device (slave) and subsequent ones, you then use device.1.outlet.1.id, device.2.outlet.1.id, ...
That way, client application that are unaware of the daisychain support, will only see the first device, and not nothing at all.
Moreover, this solution is generic, and not specific to the PDU use case currently considered. It thus support both the current NUT scope, along with potential evolutions, and technology change (hybrid chain with UPS and PDU for example).
Example
device.count: 3
device.mfr: EATON
device.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19
device.1.mfr: EATON
device.1.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19
device.2.mfr: EATON
device.2.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19
...
input.voltage: 237.75
device.1.input.voltage: 237.75
device.2.input.voltage: 237.75
...
outlet.1.status: on
device.1.outlet.1.status: on
device.2.outlet.1.status: off
...
Implementation
A branch is available to support the development of this new feature:
https://github.com/networkupstools/nut/tree/daisychain
Documentation
docs/nut-names.txt will be completed and details will be referring to docs/daisychain.txt
Driver
The first, and maybe the only one, implementation will happen in snmp-ups.
It's not unusual to see some daisy-chained PDUs, connected together in master-slave mode, to only consume 1 IP address for their communication interface (generally, network card exposing SNMP data) and expose only 1 point of communication to manage several devices.
This breaks the historical consideration of NUT that 1 driver provides data for 1 device.
However, there is a need and a smart approach can be considered to fulfill it while not breaking the standard scope (sort of compatibility).
Functional proposal
Specification
The daisychain support will use the device collection to extend the historical NUT scope (1 driver - 1 device) and provide data from the additional devices.
A new variable will be introduce to express the number of devices exposed: device.count:
To ensure backward compatibility in NUT, the data of the various devices will be exposed the following way:
It is equivalent to "device" and root collections, and is omitted from the device subcollection
since all the numerous data are already exposed. As an example, to access
device.0.outlet.1.id, you use the normal "outlet.1.id".
That way, client application that are unaware of the daisychain support, will only see the first device, and not nothing at all.
Moreover, this solution is generic, and not specific to the PDU use case currently considered. It thus support both the current NUT scope, along with potential evolutions, and technology change (hybrid chain with UPS and PDU for example).
Example
device.count: 3
device.mfr: EATON
device.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19
device.1.mfr: EATON
device.1.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19
device.2.mfr: EATON
device.2.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19
...
input.voltage: 237.75
device.1.input.voltage: 237.75
device.2.input.voltage: 237.75
...
outlet.1.status: on
device.1.outlet.1.status: on
device.2.outlet.1.status: off
...
Implementation
A branch is available to support the development of this new feature:
https://github.com/networkupstools/nut/tree/daisychain
Documentation
docs/nut-names.txt will be completed and details will be referring to docs/daisychain.txt
Driver
The first, and maybe the only one, implementation will happen in snmp-ups.