Switching on IPMI devices using Home Assistant

One of the systems on my home network can be switched on/off using IPMI. Since Home Assistant is running 24/7, it would be useful to be able to power toggle this system straight from Home Assistant.

There is currently no add-on or integration that can perform this task. In the meantime, the following hack provides a workaround.

configuration.yaml

shell_command:
  ipmi_install_and_trigger: "which ipmitool >/dev/null 2>&1 || (apk update && apk add ipmitool); ipmitool -H <INTERNAL_IP_ADDRESS> -U admin -P <PASSWORD> chassis power on"

Lovelace

[...]
    cards:
[...]
      - name: 'install ipmitool and trigger <SERVER_NAME>'
        type: button
        tap_action:
          action: call-service
          service: shell_command.ipmi_install_and_trigger
        show_icon: true
        show_name: true

You can install this lovelace card in your existing dashboard by using the raw configuration editor and pasting the above in the respective section.

no responses for Switching on IPMI devices using Home Assistant

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.