sth3133
(Stephan)
June 8, 2019, 4:00pm
1
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.
sth3133
(Stephan)
June 8, 2019, 4:55pm
3
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.
I’m using mqtt sensors for this.
Install mosquitto clients on your remote pi
run the command or a script with crontab every 2 minutes
publish the values to mqtt topic
create mqtt sensor in ha
Example script:
#!/bin/bash
MQTT='192.168.123.123'
TOPIC='home/sensors/minibian/i2c_bus'
PAYLOAD=$(/usr/sbin/i2cdetect -y 1 | egrep '^20' | cut -d' ' -f2-9)
/usr/bin/mosquitto_pub -r -t "$TOPIC" -m "$PAYLOAD" -h "$MQTT"
sth3133
(Stephan)
June 8, 2019, 5:37pm
5
Thanks! I’m going to try that out.