diff --git a/dashboards/server-room.yaml b/dashboards/server-room.yaml index 0db2125..5e24290 100644 --- a/dashboards/server-room.yaml +++ b/dashboards/server-room.yaml @@ -1,43 +1,152 @@ -# Server Room dashboard [#618] — git-deployed via KNEL/pfv-bms +# Server Room dashboard [#618/#344] — git-deployed via KNEL/pfv-bms title: Server Room views: - title: Overview - type: panel - cards: + type: sections + sections: + - type: grid + cards: + - type: markdown + content: > + ## At a glance + + + **UPS** {{ states('sensor.tsys1_ups_status') }} · + {{ states('sensor.tsys1_ups_battery_charge') }}% · + {{ states('sensor.pfv_ups_runtime_minutes') }} min runtime · + {{ states('sensor.tsys1_ups_battery_voltage') }} V battery + + + **PDU** {{ states('sensor.pfv_garage_pdu_output_current') }} A · + {{ states('sensor.pfv_garage_pdu_power') }} W · + {{ states('sensor.garage_pdu_daily_energy') | float(-1) | round(2) }} kWh today + + + {% set s = states.sensor | selectattr('entity_id','search','pfv_') + | selectattr('attributes.device_class','defined') + | selectattr('attributes.device_class','eq','temperature') + | rejectattr('state','in',['unavailable','unknown']) | list %} + **Fleet temps** {{ s | count }} reporting · + {% set ns = namespace(items=[]) %}{% for x in s %}{% set ns.items + = ns.items + [(x.state | float, x.name)] %}{% endfor %}{% for v,n + in ns.items | sort(reverse=true) | batch(3) | first %}**{{ n }}** + {{ v | round(1) }}°F {% endfor %} + + - type: entities + title: Power + entities: + - sensor.tsys1_ups_status + - sensor.tsys1_ups_battery_charge + - sensor.pfv_ups_runtime_minutes + - sensor.tsys1_ups_battery_voltage + - sensor.pfv_garage_pdu_output_current + - sensor.pfv_garage_pdu_power + - sensor.pfv_garage_pdu_energy + - sensor.garage_pdu_daily_energy + - sensor.pfv_tsys6_node_power + - sensor.pfv_tsys7_node_power + - sensor.pfv_power_meter + - type: grid + cards: + - type: history-graph + title: Key temps (24h) + entities: + - sensor.pfv_tsys1_rack_temperature + - sensor.pfv_tsys3_cpu_temperature + - sensor.pfv_tsys6_drac_ambient + - sensor.pfv_tsys7_drac_inlet + - sensor.pfv_tsys5_nvme_temperature + hours_to_show: 24 + + - title: UPS + type: sections + sections: - type: grid - columns: 2 - square: false cards: - type: gauge entity: sensor.tsys1_ups_battery_charge - name: tsys1 UPS battery - unit: "%" + name: Battery charge + min: 0 + max: 100 severity: green: 60 yellow: 40 red: 20 - - type: entity - entity: sensor.tsys1_ups_status - name: tsys1 UPS - icon: mdi:ups - - type: history-graph - title: tsys1 UPS battery - entities: - - sensor.tsys1_ups_battery_charge - hours_to_show: 24 + - type: gauge + entity: sensor.pfv_ups_runtime_minutes + name: Runtime (min) + min: 0 + max: 60 + severity: + green: 25 + yellow: 15 + red: 5 + - type: grid + cards: - type: entities - title: Plant automations + title: Status + entities: + - sensor.tsys1_ups_status + - sensor.tsys1_ups_status_data + - sensor.tsys1_ups_battery_charge + - sensor.pfv_ups_runtime_minutes + - sensor.tsys1_ups_battery_runtime + - sensor.tsys1_ups_battery_voltage + - sensor.tsys1_ups_nominal_battery_voltage + - sensor.tsys1_ups_low_battery_setpoint + - sensor.tsys1_ups_beeper_status + - type: markdown + content: > + **APC Smart-UPS C 1500** · serial AS1213210423 · mfr 2012-03 · + fw UPS 02.2 · PbAc, 24 V nominal · usbhid-ups via pfv-tsys1 + (NUT :3493). This unit reports no input/output voltage over + USB HID — battery-side metrics only. + - type: grid + cards: + - type: entities + title: UPS automations entities: - - automation.pfv_plant_high_temperature - automation.pfv_plant_ups_on_battery - automation.pfv_plant_ups_battery_low - automation.pfv_plant_ups_communication_lost - automation.pfv_plant_utility_power_restored - - type: markdown - content: > - **Server Room** — Proxmox hosts + Pis. Temperature sensors - populate here after the SNMP migration (#618). Minisplit - climate control lands with #614 (BTU loop Friday). + - type: grid + cards: + - type: history-graph + title: Charge (7 days) + entities: + - sensor.tsys1_ups_battery_charge + hours_to_show: 168 + - type: history-graph + title: Battery voltage · runtime (24h) + entities: + - sensor.tsys1_ups_battery_voltage + - sensor.pfv_ups_runtime_minutes + hours_to_show: 24 + + - title: Automations + type: sections + sections: + - type: grid + cards: + - type: entities + title: Plant automations + entities: + - automation.pfv_plant_high_temperature + - automation.pfv_plant_temperature_rising_fast_rate_of_change + - automation.pfv_plant_sensor_watchdog_unavailable_sensors + - automation.pfv_plant_ups_on_battery + - automation.pfv_plant_ups_battery_low + - automation.pfv_plant_ups_communication_lost + - automation.pfv_plant_utility_power_restored + - type: entities + title: Trend early-warning (rate-of-change, #682) + entities: + - binary_sensor.server_room_temp_rising + - binary_sensor.tsys6_ambient_rising + - binary_sensor.tsys7_inlet_rising + - binary_sensor.garage_temp_rising + - title: Temps type: sections sections: diff --git a/packages/plant_snmp.yaml b/packages/plant_snmp.yaml index 144f18d..c079c97 100644 --- a/packages/plant_snmp.yaml +++ b/packages/plant_snmp.yaml @@ -641,3 +641,10 @@ template: state: >- {% set v = states('sensor.pfv_tsys9_pch_temperature_raw') %} {{ ((v | float * 9 / 5) + 32) | round(1) if is_number(v) else none }} + - name: "PFV UPS runtime minutes" + unique_id: pfv_ups_runtime_minutes + device_class: duration + unit_of_measurement: "min" + state: >- + {% set v = states('sensor.tsys1_ups_battery_runtime') %} + {{ (v | float / 60) | round(0) if is_number(v) else none }}