Sensor Polling

The CMSW application polls sensors from PDUs via SNMP and cooling system via Modbus.

PDU Sensor Polling

PDUs are polled asynchronously using SNMP. Configuration is defined in config.yaml:

cmsw:
  polling_intervals:
    sensor_polling: 5  # seconds between polling cycles
  pdu:
    device_definition: drivers/pdu/device_definitions/enlogic.yaml
    community: public
    pdus:
      - id: PDU1
        host: 10.0.11.11
        port: 161
      ## Uncomment if 2 PDUs present
      # - id: PDU2
      #   host: 10.0.11.12
      #   port: 162

Sensor Names

Sensor names are defined in device definition YAML files located in drivers/pdu/device_definitions/. Common sensors include:

  • pduTemperature - PDU temperature in Celsius

  • pduHumidity - PDU humidity as percentage

  • pduPort{}Current - Port current in hundredths of Amps (e.g., pduPort1Current)

  • pduPort{}ActivePower - Port active power (e.g., pduPort1ActivePower)

  • pduPhase{}Voltage - Phase voltage in Volts (e.g., pduPhase1Voltage)

API Access

Sensor readings are accessible via the REST API interface.

To retrieve all sensor readings at once, run this:

curl -s <host>:<port>/readings

To retrieve a specific PDU reading, e.g. current in port 1 of PDU1, run this:

curl -s <host>:<port>/readings/pdus/PDU1/pduPort1Current

Cooling System Sensors Polling

To be implemented.