feat(plant): storage/mem/chipset temps — NVMe, DIMM jc42, PCH [#344]
8 new two-layer sensors from data already in lm-sensors extends: NVMe composite (tsys3/5), 4x jc42 DIMM temps anchored by i2c address (tsys4), PCH (tsys3/9). GPU/SATA/DRAC-DIMM temps need host-side work — ticketed. https://projects.knownelement.com/issues/344
This commit is contained in:
@@ -280,6 +280,106 @@ sensor:
|
|||||||
{% set m = value | regex_findall('output_amps ([0-9.]+)') %}
|
{% set m = value | regex_findall('output_amps ([0-9.]+)') %}
|
||||||
{{ m[0] | float if m | length > 0 }}
|
{{ m[0] | float if m | length > 0 }}
|
||||||
|
|
||||||
|
# --- Storage / memory / chipset temps (already in lm-sensors output) ---
|
||||||
|
# DIMM patterns anchor to the jc42 i2c address — a bare 'temp1:' regex
|
||||||
|
# would match the wrong chip (each host has several temp1 lines). The jc42
|
||||||
|
# ALARM flags are a limits-read artifact (limits read as 0.0C); values are good.
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys3 NVMe temperature raw"
|
||||||
|
host: pfv-tsys3.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys3_nvme_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('Composite:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys3 PCH temperature raw"
|
||||||
|
host: pfv-tsys3.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys3_pch_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('(?s)pch_skylake.*?temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys4 DIMM 18 temperature raw"
|
||||||
|
host: pfv-tsys4.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys4_dimm_18_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('(?s)jc42-i2c-0-18.*?temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys4 DIMM 19 temperature raw"
|
||||||
|
host: pfv-tsys4.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys4_dimm_19_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('(?s)jc42-i2c-0-19.*?temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys4 DIMM 1a temperature raw"
|
||||||
|
host: pfv-tsys4.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys4_dimm_1a_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('(?s)jc42-i2c-0-1a.*?temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys4 DIMM 1b temperature raw"
|
||||||
|
host: pfv-tsys4.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys4_dimm_1b_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('(?s)jc42-i2c-0-1b.*?temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys5 NVMe temperature raw"
|
||||||
|
host: pfv-tsys5.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys5_nvme_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('Composite:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
|
- platform: snmp
|
||||||
|
name: "PFV tsys9 PCH temperature raw"
|
||||||
|
host: pfv-tsys9.knel.net
|
||||||
|
version: 2c
|
||||||
|
community: kn3lmgmt
|
||||||
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
|
accept_errors: true
|
||||||
|
unique_id: pfv_tsys9_pch_temperature_raw
|
||||||
|
value_template: >-
|
||||||
|
{% set m = value | regex_findall('(?s)pch_cometlake.*?temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
|
{{ m | first | float if m }}
|
||||||
|
|
||||||
# --- Garage PDU energy (kWh) integrated from watts [#344] ---
|
# --- Garage PDU energy (kWh) integrated from watts [#344] ---
|
||||||
- platform: integration
|
- platform: integration
|
||||||
source: sensor.pfv_garage_pdu_power
|
source: sensor.pfv_garage_pdu_power
|
||||||
@@ -485,3 +585,59 @@ template:
|
|||||||
state: >-
|
state: >-
|
||||||
{% set a = states('sensor.pfv_garage_pdu_output_current') | float(-1) %}
|
{% set a = states('sensor.pfv_garage_pdu_output_current') | float(-1) %}
|
||||||
{{ (a * 120) | round(0) if a >= 0 }}
|
{{ (a * 120) | round(0) if a >= 0 }}
|
||||||
|
- name: "PFV tsys3 NVMe temperature"
|
||||||
|
unique_id: pfv_tsys3_nvme_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys3_nvme_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys3 PCH temperature"
|
||||||
|
unique_id: pfv_tsys3_pch_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys3_pch_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys4 DIMM 18 temperature"
|
||||||
|
unique_id: pfv_tsys4_dimm_18_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys4_dimm_18_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys4 DIMM 19 temperature"
|
||||||
|
unique_id: pfv_tsys4_dimm_19_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys4_dimm_19_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys4 DIMM 1a temperature"
|
||||||
|
unique_id: pfv_tsys4_dimm_1a_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys4_dimm_1a_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys4 DIMM 1b temperature"
|
||||||
|
unique_id: pfv_tsys4_dimm_1b_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys4_dimm_1b_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys5 NVMe temperature"
|
||||||
|
unique_id: pfv_tsys5_nvme_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys5_nvme_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
- name: "PFV tsys9 PCH temperature"
|
||||||
|
unique_id: pfv_tsys9_pch_temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit_of_measurement: "°F"
|
||||||
|
state: >-
|
||||||
|
{% set v = states('sensor.pfv_tsys9_pch_temperature_raw') %}
|
||||||
|
{{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }}
|
||||||
|
|||||||
Reference in New Issue
Block a user