IPMI using command line

Thanks to topic Read sensors through IPMI but I’ve got one last problem, i think.

After configuring IPMI-tools and setting up a command line sensor.

sensor:
  - platform: command_line
    name: CPU temp
    command: ipmitool -I lanplus -H 192.168.X.X -U User -P Passwd sdr entity 7.1
    unit_of_measurement: "°C"

The state is Unkown with the following log:

Command failed: ipmitool -I lanplus -H 192.168.X.X -U User -P Passwd sdr entity 7.1

I think it’s something with user permissions but I can’t get it to work.

My setup:

Running a VM with Ubuntu 18.04 and HASSIO on a docker container.

Can anyone help me out?

Did you setup ipmitools on the Ubuntu host?
If you’re using hass.io, the command runs inside the docker container.

Yes it runs on the Ubuntu host. How could I install and run it on the Hassio Docker?

You can’t! Or if it would be possible, lost after hassio update.
Hassio and command_line components don’t go well, only some built in commands work.
If you want to get some sensor data from the ubuntu host to HA you can try something like this.

Thanks! I’m going to try that out.