ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
36 stars 8 forks source link

Feature Request: Fan Control for IPMI Integration in Home Assistant #48

Open FischLord opened 3 days ago

FischLord commented 3 days ago

I would like to propose a new feature for the IPMI integration in Home Assistant. This feature would allow users to control the fan speeds of their servers using IPMI commands. This functionality is particularly useful for users who want to manage the thermal and noise levels of their servers more effectively.

Background

Dell servers, such as the R710 and R720, support IPMI commands to manually set fan speeds. These commands can enable or disable automatic fan control, set fan speeds manually, and manage third-party PCIe card fan behavior. Adding this functionality to the IPMI integration in Home Assistant would greatly enhance its capabilities.

Proposed Commands

Here are the IPMI commands to control fan speeds on Dell R710 and R720 servers:

  1. Enable Automatic Fan Control

    ipmitool raw 0x30 0x30 0x01 0x01
  2. Disable Automatic Fan Control

    ipmitool raw 0x30 0x30 0x01 0x00
  3. Manually Set Fan Speed

    ipmitool raw 0x30 0x30 0x02 0xff 0x##

    Replace ## with the desired fan speed value in hexadecimal (e.g., 0x20 for 32%).

  4. Disable 3rd Party PCIe Card Fan Behavior (Full Thermal Load)

    ipmitool raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00
  5. Enable 3rd Party PCIe Card Fan Behavior

    ipmitool raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00
  6. Check 3rd Party PCIe Card Fan Behavior

    ipmitool raw 0x30 0xce 0x01 0x16 0x05 0x00 0x00 0x00

Implementation

To implement this feature, the following steps should be considered:

  1. Extend the IPMI Integration:

    • Add support for executing custom IPMI raw commands.
    • Provide a user-friendly interface in Home Assistant for sending these commands.
  2. UI Enhancements:

    • Add a section in the IPMI integration settings to control fan speeds.
    • Provide input fields for the user to specify the fan speed and other parameters.
  3. Logging and Monitoring:

    • Implement logging to track changes in fan speeds and other thermal management parameters.
    • Provide a monitoring interface to visualize fan speed changes and their effects.

Additional Resources

For further information on using these commands, refer to:

ateodorescu commented 3 days ago

@FischLord have a look at this closed issue https://github.com/ateodorescu/home-assistant-ipmi/issues/16 This is not something that could be implemented generic because not all servers support it but you will find examples of how to achieve it in that closed issue. ;) Hope this helps!