ateodorescu/home-assistant-ipmi

Feature Request: ability to control fan speeds.

Adumbbird opened this issue · 7 comments

Hello! Using the home-assistant-ipmi and ipmi-server, I'm able to pull infromation from idrac 8 on my dell r730xd.

I'm looking for a way to control the fan speeds as it's tooo loud. I know the commands to use, I'm just wanting a way to use hassio to manage the speeds manually.

  • Thirdparty/non-dell cooling profile:
    • Disables
      • .\ipmitool -I lanplus -H ipaddress -U username-P password raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00
    • Enables
      • .\ipmitool -I lanplus -H ipaddress -U username -P password raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00
  • Running fans at specified rpm
    • to enable
      • .\ipmitool.exe -I lanplus -H 192.168.0.120 -U username -P password raw 0x30 0x30 0x01 0x00
    • Once enabled, use this to set speed as percentage. Last hex bit is percentage of max
      • 0x50=80%
        • .\ipmitool.exe -I lanplus -H 192.168.0.120 -U username -P password raw 0x30 0x30 0x02 0xff 0x50
      • 0x32=50%
        • .\ipmitool.exe -I lanplus -H 192.168.0.120 -U username -P password raw 0x30 0x30 0x02 0xff 0x32
      • 0x1E=30%
        • .\ipmitool.exe -I lanplus -H 192.168.0.120 -U username -P password raw 0x30 0x30 0x02 0xff 0x1E
      • 0xA=10%
        • .\ipmitool.exe -I lanplus -H 192.168.0.120 -U username -P password raw 0x30 0x30 0x02 0xff 0xA

source: https://www.dell.com/community/en/conversations/poweredge-hardware-general/how-to-quiet-r730xd-fans-lower-idle-fan-speed/647fa279f4ccf8a8de7fd4ad

Hi! I could change the ipmi-server addon to allow running any ipmitool commands. This way you could just create your own entities in hass (ie rest entities) that would run those commands. Would that help you out?

That would be perfect!

So, if you use the latest code of the ipmi-server then you will be able to run such queries on the webserver:
http://YOUR_HASS_SERVER_IP:9595/command?params=-I%20lanplus%20-H%20YOUR_IPMI_SERVER_IP%20-U%20ADMIN%20-P%20YOUR_PASSWORD%20bmc%20info which translates to ipmitool -I lanplus -H YOUR_IPMI_SERVER_IP -U YOUR_USER -P YOUR_PASSWORD bmc info. %20 stands for space (url encoding). You get back a json with success and output keys.
Basically you can provide any params you want to ipmitool. Hope this helps you. Let me know if it works for you.

perfect! just so its in this thread, I utilized the rest_command to use the queries and put this in my config.yaml

rest_command:
  disable_dell_cooling:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200xce%200x00%200x16%200x05%200x00%200x00%200x00%200x05%200x00%200x01%200x00%200x00"
  enable_rpm_cooling:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x01%200x00"
  set_rpm_eighty:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x50"
  set_rpm_fifty:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x32"
  set_rpm_thirty:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x1E"
  set_rpm_twentyfive:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x19"
  set_rpm_twenty:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x14"
  set_rpm_seventeen:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x11"
  set_rpm_fifteen:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200xF"
  set_rpm_twelve:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200xC"
  set_rpm_ten:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200xA"
  set_rpm_seven:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20raw%200x30%200x30%200x02%200xff%200x7"
  set_rpm_five:
    url: "http://{hassip}:9595/command?params=-I%20lanplus%20-H%20{idracip}%20-U%20{idracadmin}%20-P%20{idracpwinurlencoded}%20%20raw%200x30%200x30%200x02%200xff%200x5"

{hassip} {idracip} {idracadmin}

are these built in variables, taken from he integration or need to e added someplace?
I have several dell devices than all respond to these commands

{hassip} {idracip} {idracadmin}

are these built in variables, taken from he integration or need to e added someplace? I have several dell devices than all respond to these commands

In order to control your server's fans you need to create your own rest commands which you can attach to switches. @Adumbbird has shown us how to define those rest commands and if you want to use that then you need to replace {hassip}, {idracip} and {idracadmin} with your own values.

In order to control your server's fans you need to create your own rest commands which you can attach to switches. @Adumbbird has shown us how to define those rest commands and if you want to use that then you need to replace {hassip}, {idracip} and {idracadmin} with your own values.

OK, So they need to be duplicated for each dell server I add...