ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
39 stars 10 forks source link

Feature request: implement a service in the integration for sending custom ipmitool commands #36

Closed 35gh closed 4 months ago

35gh commented 5 months ago

I know it's possible to send custom ipmitool commands using the IPMItool server module: _Yes, you can run any custom command you want. For example 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 YOURPASSWORD 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.

It will be useful to have the integration implementing a service that could do the same, leveraging server IP, login and password, for creating friendly automations (such as raise the server fan speed with temperature). That could also work for setups that do no use the IPMItool server module.

Thanks!

flipper commented 4 months ago

I needed this so i added the feature in my fork: https://github.com/flipper/home-assistant-ipmi/commit/93f518c1eb0d02355b8500a946c32ba751ced663

Hope this helps you as well! :)

ateodorescu commented 4 months ago

@flipper Why don't you make a PR?

ateodorescu commented 4 months ago

fixed in https://github.com/ateodorescu/home-assistant-ipmi/pull/43