ateodorescu / home-assistant-addons Goto Github PK
View Code? Open in Web Editor NEWipmi-server addon for Home Assistant
License: MIT License
ipmi-server addon for Home Assistant
License: MIT License
run HA in docker so HACS and addons are not an option. Can I just build the dockerfile run the container and use it?
When I sent command request it returns correct json response but when I try to send host or to configure IPMI connector it returns timeout error.
{"success":true,"output":"Device ID : 17\nDevice Revision : 1\nFirmware Revision : 2.32\nIPMI Version : 2.0\nManufacturer ID : 11\nManufacturer Name : Hewlett-Packard\nProduct ID : 8192 (0x2000)\nProduct Name : Unknown (0x2000)\nDevice Available : yes\nProvides Device SDRs : yes\nAdditional Device Support :\n Sensor Device\n SDR Repository Device\n SEL Device\n FRU Inventory Device\n"}
http://192.168.6.9:9595/?host=192.168.6.2&port=623&user=Administrator&password=95XGFGBC
2023/12/31 17:32:24 [error] 206#206: *34 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.6.11, server: _, request: "GET /?host=192.168.6.2&port=623&user=Administrator&password=95XGQTGC HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.6.9:9595"
fails to install with the following error:
The command '/bin/bash -o pipefail -c apk -U update && apk -U upgrade && apk -U add --no-cache ipmitool nginx=1.24.0-r6 php$PHPVERS php$PHPVERS-fpm php$PHPVERS-curl php$PHPVERS-dom php$PHPVERS-gettext php$PHPVERS-xml php$PHPVERS-simplexml php$PHPVERS-zip php$PHPVERS-zlib php$PHPVERS-gd php$PHPVERS-openssl php$PHPVERS-mysqli php$PHPVERS-pdo php$PHPVERS-pdo_mysql php$PHPVERS-pgsql php$PHPVERS-pdo_pgsql php$PHPVERS-sqlite3 php$PHPVERS-pdo_sqlite php$PHPVERS-json php$PHPVERS-mbstring php$PHPVERS-ctype php$PHPVERS-opcache php$PHPVERS-session php$PHPVERS-tokenizer && mkdir -p /app && mkdir /app/cache && mkdir /var/tmp/nginx' returned a non-zero code: 1
The ipmitool server seems to require ADMINISTRATOR privelages. It would be nice to be able to specify the level (such as USER) as connections fail when the IPMI user is restricted to anything other than USER
Hello,
is there a way to send ipmi commands?
I have on server, where I switched the default server fans to silent noctua. But these needs higher rpm. So on each server restart I have to send
ipmitool -I lanplus -H 192.168.2.2 -U root -P $pw raw 0x30 0x30 0x01 0x00
so activate the manual fan control
and
ipmitool -I lanplus -H 192.168.2.2 -U root -P $pw raw 0x30 0x30 0x02 0xff 0x64
to set all fans to 100%.
and my unraid server sometimes gets a kernel panic, where I have to send a
ipmitool -I lanplus -H 192.168.2.241 -U admin -P $pw power cycle
to reboot.
atm I have to do this manually. But it would be awesome to use these commands in HA automations.
Thanks in advance!
Greetz Stefan
Thanks for the integration and add-on!
I seem to be runing into a bug of some kind while adding the IPMI Connector to HA.
I have installed both the HACS integration IPMI Connector and the Add-on IPMItool server.
All supplied logs originates from my HA OS running in a VM.
Also tested on dedicated hardware (HA Yellow) with same results.
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to DEBUG
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
[16:07:31] INFO: Starting PHP-FPM...
s6-rc: info: service legacy-services successfully started
[16:07:32] INFO: Starting NGinx...
When adding the IPMI connector integration with known working connection details, I get an error:
IPMItool server Logs
2023/11/16 11:27:32 [error] 205#205: *17 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /?host=192.168.0.52&port=623&user=MyIPMIUsername&password=MyPassword HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "my-iot-url.duckdns.org"
Ingress when using the URL from the log
URL: https:// my-iot-url.duckdns.org/api/hassio_ingress/3aZ8iC0mb6JKifA0UIsATgsPFg5Y5ww7pnUHdEcZX8w/?host=192.168.0.52&port=623&user=MyIPMIUsername&password=MyPassword
When adding the integration with with known not working connection details (like a bad password or host), i get a different error:
IPMItool server Logs
2023/11/16 11:27:32 [error] 205#205: *17 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /?host=192.168.0.52&port=623&user=MyIPMIUsername&password=MyPassword HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "my-iot-url.duckdns.org"
Ingress when using the URL from the log
URL: https:// my-iot-url.duckdns.org/api/hassio_ingress/3aZ8iC0mb6JKifA0UIsATgsPFg5Y5ww7pnUHdEcZX8w/?host=192.168.0.52&port=623&user=MyIPMIUsername&password=MyPassword
{"success":false,"message":"Wrong connection data provided!","debug":"Error occurred when running \u0022ipmitool -H 192.168.0.52 -p 623 -U MyIPMIUsername -P MyPassword -I lanplus bmc info\u0022.\n
Unable to Get Channel Cipher Suites\nError: Unable to establish IPMI v2 \/ RMCP+ session\n\n
Error occurred when running \u0022ipmitool -H 192.168.0.52 -p 623 -U MyIPMIUsername -P MyPassword -I lan bmc info\u0022.\nAuthentication type NONE not supported\n
Error: Unable to establish LAN session\n
Error: Unable to establish IPMI v1.5 \/ RMCP session\n\n
Error occurred when running \u0022ipmitool -H 192.168.0.52 -p 623 -U MyIPMIUsername -P MyPassword -I imb bmc info\u0022.\n
Error loading interface imb\n\n
Error occurred when running \u0022ipmitool -H 192.168.0.52-p 623 -U MyIPMIUsername -P MyPassword -I open bmc info\u0022.\n
Could not open device at \/dev\/ipmi0 or \/dev\/ipmi\/0 or \/dev\/ipmidev\/0: No such file or directory\n
"}
(I added new lines for every \n to make it more readable)
When runing the ipmitool command from Failed to connect with the correct data
from the Unknown error occurred, I get this:
~$ ipmitool -H 192.168.0.52 -p 623 -U MyIPMIUsername -P MyPassword -I lanplus bmc info
Device ID : [Redacted]
Device Revision : [Redacted]
Firmware Revision : [Redacted]
IPMI Version : 2.0
Manufacturer ID : [Redacted]
Manufacturer Name : [Redacted]
Product ID : [Redacted]
Product Name : [Redacted]
Device Available : yes
Provides Device SDRs : no
Additional Device Support :
Sensor Device
SDR Repository Device
SEL Device
FRU Inventory Device
Chassis Device
(Tell me if you need any of the redacted info)
Appreciate if you have time to help me debug this.
I unfortunately don't have the skils to dig further by my self. Please tell me if there is anything I can do to assist :)
Hello,
I noticed that when a connection fails, the user password is displayed in plain text in the logs. Is it possible to remove or mask this?
Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session PHP message: Error occurred when running "ipmitool -H <redacted> -p 623 -U <redacted> -P <redacted> -I imb bmc info". Error loading interface imb PHP message: Error occurred when running "ipmitool -H <redacted> -p 623 -U <redacted> -P <redacted> -I open bmc info".
Hi all
{"success":false,"message":"Wrong connection data provided!","debug":"No hostname provided!\nNo hostname provided!\nNo hostname provided!\nNo hostname provided!"}
`
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
Add-on: IPMItool server
IPMItool server
Add-on version: 1.2.5
You are running the latest version of this add-on.
System: Home Assistant OS 12.1 (amd64 / qemux86-64)
Home Assistant Core: 2024.3.1
Home Assistant Supervisor: 2024.03.0
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to INFO
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
[19:45:53] INFO: Starting PHP-FPM...
s6-rc: info: service legacy-services successfully started
[19:45:53] INFO: Starting NGinx...
2024/03/15 19:45:57 [error] 205#205: *3 FastCGI sent in stderr: "PHP message: No hostname provided!PHP message: No hostname provided!PHP message: No hostname provided!PHP message: No hostname provided!" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomian.xx", referrer: "https://mydomian.xx/hassio"
2024/03/15 19:50:26 [error] 205#205: *15 FastCGI sent in stderr: "PHP message: No hostname provided!PHP message: No hostname provided!PHP message: No hostname provided!PHP message: No hostname provided!" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomian.xx", referrer:
`
where to set a hostname?
version is 1.2.5
thank you for support!
Hello,
On one of my servers, the ipmi command gets a lot of errors.
Despite this, I get the information I want, so the ipmi request works for some data.
But on each request I get these nasty error messages. Is there a way to ignore these messages?
Normally I would ignore this, but I send the logs to Loki and this mess up the log statistics.
I tried to set the loglevel to fatal, but this did not help.
thanks, greetz STefan
Hi there
once i was able to see all sensors, but after updating to ipmiserver 1.2.9 and HA
Core 2024.4.3
Supervisor 2024.04.0
Operating System 12.1
I can only see power on/off and state.
And i really need the Watt usage meter.
Currently having an issue where none of my servers are loading properly. Did the updates to the addon and the HACS integration and it doesn't work.
2024/03/14 07:20:18 [error] 205#205: *1 FastCGI sent in stderr: "PHP message: [critical] Uncaught PHP Exception Symfony\Component\Process\Exception\ProcessSignaledException: "The process has been signaled with signal "11"." at /app/vendor/symfony/process/Process.php line 436" while reading response header from upstream, client: 172.30.32.1, server: _, request: "GET /?host=192.168.1.21&port=623&user=root&password=calvin HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:9595"
trying to monitor Dell iDRAC.
Hi,
I use a Megarac BMC, when I try to configure the ipmi connector I get a timeout. The log shows:
2024/02/02 10:36:47 [error] 205#205: *38 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.168.5, server: _, request: "GET /?host=192.168.168.207&port=623&user=admin&password=xxx HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.168.5:9595"
ipmitool also throws error: No command provided!
which is what I think this addon parses as connection error. It is not. When I add ¨bmc info" either to command line or to the server url it succeeds:
cli output
Device ID : 32
Device Revision : 1
Firmware Revision : 12.61
IPMI Version : 2.0
Manufacturer ID : 15370
Manufacturer Name : GIGA-BYTE TECHNOLOGY CO., LTD
Product ID : 4106 (0x100a)
Product Name : Unknown (0x100A)
Device Available : yes
Provides Device SDRs : yes
Additional Device Support :
Sensor Device
SDR Repository Device
SEL Device
FRU Inventory Device
IPMB Event Receiver
IPMB Event Generator
Chassis Device
Aux Firmware Rev Info :
0x11
0x00
0x00
0x00
server output:
success true
output "Device ID : 32\nDevice Revision : 1\nFirmware Revision : 12.61\nIPMI Version : 2.0\nManufacturer ID : 15370\nManufacturer Name : GIGA-BYTE TECHNOLOGY CO., LTD\nProduct ID : 4106 (0x100a)\nProduct Name : Unknown (0x100A)\nDevice Available : yes\nProvides Device SDRs : yes\nAdditional Device Support :\n Sensor Device\n SDR Repository Device\n SEL Device\n FRU Inventory Device\n IPMB Event Receiver\n IPMB Event Generator\n Chassis Device\nAux Firmware Rev Info : \n 0x11\n 0x00\n 0x00\n 0x00\n"
Could you add an optional command line to the configuration dialogue to enter the (in my case necessary) command?
While debugging it I found the problem. This double negation prevents the sensors command to run, so, no sensor data.
I can make a PR, but I think it will be much faster if you push that little fix.
Cheers!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.