『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
12
返回列表 发新帖
楼主: coffee_java

[技术探讨] hass读取服务器ipmi信息问题咨询

[复制链接]

0

主题

562

帖子

2187

积分

金牌会员

Rank: 6Rank: 6

积分
2187
金钱
1625
HASS币
0
发表于 2023-4-4 08:58:32 | 显示全部楼层
gubx 发表于 2023-4-4 08:55
问题解决了,Home Assistant Core升级到2022.12以后,插件之间的文件映射关系发生了变化,不再执行Terminal ...

楼主,能否出下详细教程呀,小白求指导,
回复

使用道具 举报

0

主题

29

帖子

1201

积分

金牌会员

Rank: 6Rank: 6

积分
1201
金钱
1172
HASS币
0
发表于 2023-4-4 12:04:22 | 显示全部楼层
我的是HASSOS,以此为例
1、安装portainer管理DOCKER
2、找到homeassistant这个容器,连接Console
3、在命令提示符输入:apk add ipmitool安装ipmitool,安装完后重启
4、重启后command_line里面用ipmitool就可以正常获得数据了


configuration.yaml示例
  - platform: command_line
    name: 'CPU Temp'
    unit_of_measurement: '°C'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.xxx.xxx -U xxx -P xxx sdr entity 3.1 |cut -d '|' -f5|awk '{print $1}'"
回复

使用道具 举报

0

主题

29

帖子

1201

积分

金牌会员

Rank: 6Rank: 6

积分
1201
金钱
1172
HASS币
0
发表于 2023-4-4 12:11:38 | 显示全部楼层
超微主板IPMI数据读取示例
###Server IPMI Sensors
  - platform: command_line
    name: 'CPU Temp'
    unit_of_measurement: '°C'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 3.1 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'PCH Temp'
    unit_of_measurement: '°C'
    scan_interval: 60
    command: "/usr/sbin/ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 7.3 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'System Temp'
    unit_of_measurement: '°C'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 7.1 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'VRM Temp'
    unit_of_measurement: '°C'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 8.1 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'Fan1 Speed'
    unit_of_measurement: 'RPM'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 29.1 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'Fan2 Speed'
    unit_of_measurement: 'RPM'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 29.2 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'Fan3 Speed'
    unit_of_measurement: 'RPM'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 29.3 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'Fan4 Speed'
    unit_of_measurement: 'RPM'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 29.4 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'Fan5 Speed'
    unit_of_measurement: 'RPM'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 29.5 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'FanA Speed'
    unit_of_measurement: 'RPM'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX sdr entity 29.7 |cut -d '|' -f5|awk '{print $1}'"
  - platform: command_line
    name: 'Server Instantaneous Power'
    unit_of_measurement: 'W'
    scan_interval: 15
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX dcmi  power reading | grep Instantaneous |awk '{print $4}'"
  - platform: command_line
    name: 'Server Average Power'
    unit_of_measurement: 'W'
    scan_interval: 60
    command: "ipmitool -I lanplus -H 192.168.X.XXX -U XXXXX -P XXXXX dcmi  power reading | grep Average |awk '{print $7}'"
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-2 08:02 , Processed in 0.062326 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表