diff --git a/kubernetes/apps/monitoring/dashboards/home-security.json b/kubernetes/apps/monitoring/dashboards/home-security.json index b97f80ab..bbcfbcff 100644 --- a/kubernetes/apps/monitoring/dashboards/home-security.json +++ b/kubernetes/apps/monitoring/dashboards/home-security.json @@ -30,8 +30,8 @@ "gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 }, "id": 1, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, - "targets": [{ "expr": "homeassistant_alarm_control_panel_state{state=\"disarmed\"} == 1", "legendFormat": "{{friendly_name}}", "refId": "A" }], - "title": "Disarmed", + "targets": [{ "expr": "min(homeassistant_alarm_control_panel_state{state=\"disarmed\"})", "instant": true, "range": false, "legendFormat": "Disarmed", "refId": "A" }], + "title": "Disarmed (all panels)", "type": "stat" }, { @@ -49,8 +49,8 @@ "gridPos": { "h": 4, "w": 6, "x": 6, "y": 1 }, "id": 2, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, - "targets": [{ "expr": "homeassistant_alarm_control_panel_state{state=\"armed_home\"} == 1", "legendFormat": "{{friendly_name}}", "refId": "A" }], - "title": "Armed Home", + "targets": [{ "expr": "max(homeassistant_alarm_control_panel_state{state=\"armed_home\"})", "instant": true, "range": false, "legendFormat": "Armed Home", "refId": "A" }], + "title": "Armed Home (any panel)", "type": "stat" }, { @@ -68,8 +68,8 @@ "gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 }, "id": 3, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, - "targets": [{ "expr": "homeassistant_alarm_control_panel_state{state=\"armed_away\"} == 1", "legendFormat": "{{friendly_name}}", "refId": "A" }], - "title": "Armed Away", + "targets": [{ "expr": "max(homeassistant_alarm_control_panel_state{state=\"armed_away\"})", "instant": true, "range": false, "legendFormat": "Armed Away", "refId": "A" }], + "title": "Armed Away (any panel)", "type": "stat" }, { @@ -87,8 +87,8 @@ "gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 }, "id": 4, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, - "targets": [{ "expr": "homeassistant_alarm_control_panel_state{state=\"triggered\"} == 1", "legendFormat": "{{friendly_name}}", "refId": "A" }], - "title": "Triggered", + "targets": [{ "expr": "max(homeassistant_alarm_control_panel_state{state=\"triggered\"})", "instant": true, "range": false, "legendFormat": "Triggered", "refId": "A" }], + "title": "Triggered (any panel)", "type": "stat" }, { @@ -114,10 +114,10 @@ "id": 10, "options": { "showHeader": true, "cellHeight": "sm", "footer": { "show": false }, "sortBy": [{ "desc": true, "displayName": "Status" }] }, "pluginVersion": "10.0.0", - "targets": [{ "expr": "homeassistant_binary_sensor_state{friendly_name=~\".*[Ff]enster.*|.*Window.*is open$\"}", "format": "table", "instant": true, "refId": "A" }], + "targets": [{ "expr": "max by (entity, friendly_name) (homeassistant_binary_sensor_state{entity=~\"binary_sensor.dg_buro_fenstersensor_nord_opening|binary_sensor.dg_buro_fenstersensor_sud_opening|binary_sensor.eg_bad_fenster_window|binary_sensor.eg_diele_fenster_window|binary_sensor.eg_galerie_fenster_window|binary_sensor.eg_garderobe_fenster_open|binary_sensor.eg_kuche_ost_fenster_window|binary_sensor.eg_kuche_sud_fenster_rechts_open|binary_sensor.eg_schlafzimmer_nordfenster_window|binary_sensor.eg_schlafzimmer_westfenster_window|binary_sensor.eg_toilette_fenster_open\"})", "format": "table", "instant": true, "refId": "A" }], "title": "All Windows", "transformations": [ - { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "domain": true, "entity": true, "instance": true, "job": true }, "renameByName": { "Value": "Status", "friendly_name": "Window" } } } + { "id": "organize", "options": { "excludeByName": { "Time": true }, "renameByName": { "Value": "Status", "entity": "Sensor", "friendly_name": "Window" } } } ], "type": "table" }, @@ -138,10 +138,10 @@ "id": 11, "options": { "showHeader": true, "cellHeight": "sm", "footer": { "show": false }, "sortBy": [{ "desc": true, "displayName": "Status" }] }, "pluginVersion": "10.0.0", - "targets": [{ "expr": "homeassistant_binary_sensor_state{friendly_name=~\".*[Tt](ü|u)r.*|.*[Dd]oor.*is open$|.*Terassen.*|.*Garten.*\"}", "format": "table", "instant": true, "refId": "A" }], + "targets": [{ "expr": "max by (entity, friendly_name) (homeassistant_binary_sensor_state{entity=~\"binary_sensor.dg_buro_tursensor_opening|binary_sensor.eg_bad_tur_door|binary_sensor.eg_garderobe_tursensor_opening|binary_sensor.eg_schlafzimmer_tur_door|binary_sensor.eg_wohnungstur_open|binary_sensor.eg_wohnzimmer_gartentur_open|binary_sensor.eg_wohnzimmer_terrassentur_open|binary_sensor.haustur|binary_sensor.kellertur_heizraum\"})", "format": "table", "instant": true, "refId": "A" }], "title": "All Doors", "transformations": [ - { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "domain": true, "entity": true, "instance": true, "job": true }, "renameByName": { "Value": "Status", "friendly_name": "Door" } } } + { "id": "organize", "options": { "excludeByName": { "Time": true }, "renameByName": { "Value": "Status", "entity": "Sensor", "friendly_name": "Door" } } } ], "type": "table" }, @@ -163,10 +163,10 @@ }, "overrides": [] }, - "gridPos": { "h": 4, "w": 24, "x": 0, "y": 17 }, + "gridPos": { "h": 5, "w": 24, "x": 0, "y": 17 }, "id": 20, - "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, - "targets": [{ "expr": "homeassistant_binary_sensor_state{friendly_name=~\".*[Bb]ewegungs.*[Oo]ccupancy.*\"}", "legendFormat": "{{friendly_name}}", "refId": "A" }], + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "value_and_name" }, + "targets": [{ "expr": "max by (entity, friendly_name) (homeassistant_binary_sensor_state{entity=~\"binary_sensor.eg_badezimmer_bewegungsmelder_occupancy|binary_sensor.eg_diele_bewegungsmelder_occupancy|binary_sensor.eg_eingang_bewegunsmelder_occupancy|binary_sensor.eg_galerie_bewegungsmelder_occupancy|binary_sensor.eg_garderobe_bewegungsmelder_occupancy|binary_sensor.og_treppenhaus_bewegungsmelder_occupancy|binary_sensor.treppenhaus_eg_bewegungsmelder_motion|binary_sensor.dg_treppenhaus_bewegungsmelder_motion|binary_sensor.dg_buro_prasenzmelder_occupancy|binary_sensor.eg_kuche_prasenzmelder_occupancy|binary_sensor.eg_schlafzimmer_wickelkommode_prasenzmelder_occupancy|binary_sensor.kg_werkstatt_prasenzmelder_occupancy|binary_sensor.haustur_entry_motion\"})", "instant": true, "range": false, "legendFormat": "{{friendly_name}}", "refId": "A" }], "title": "Current Motion Status", "type": "stat" }, @@ -182,15 +182,15 @@ }, "overrides": [] }, - "gridPos": { "h": 8, "w": 24, "x": 0, "y": 21 }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 22 }, "id": 21, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, - "targets": [{ "expr": "homeassistant_binary_sensor_state{friendly_name=~\".*[Bb]ewegungs.*[Oo]ccupancy.*\"} == 1", "legendFormat": "{{friendly_name}}", "refId": "A" }], + "targets": [{ "expr": "max by (entity, friendly_name) (homeassistant_binary_sensor_state{entity=~\"binary_sensor.eg_badezimmer_bewegungsmelder_occupancy|binary_sensor.eg_diele_bewegungsmelder_occupancy|binary_sensor.eg_eingang_bewegunsmelder_occupancy|binary_sensor.eg_galerie_bewegungsmelder_occupancy|binary_sensor.eg_garderobe_bewegungsmelder_occupancy|binary_sensor.og_treppenhaus_bewegungsmelder_occupancy|binary_sensor.treppenhaus_eg_bewegungsmelder_motion|binary_sensor.dg_treppenhaus_bewegungsmelder_motion|binary_sensor.dg_buro_prasenzmelder_occupancy|binary_sensor.eg_kuche_prasenzmelder_occupancy|binary_sensor.eg_schlafzimmer_wickelkommode_prasenzmelder_occupancy|binary_sensor.kg_werkstatt_prasenzmelder_occupancy|binary_sensor.haustur_entry_motion\"}) == 1", "legendFormat": "{{friendly_name}}", "refId": "A" }], "title": "Motion Detection History", "type": "timeseries" }, { - "gridPos": { "h": 1, "w": 24, "x": 0, "y": 29 }, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 30 }, "id": 103, "title": "Covers (Blinds)", "type": "row" @@ -208,15 +208,15 @@ }, "overrides": [] }, - "gridPos": { "h": 8, "w": 24, "x": 0, "y": 30 }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 31 }, "id": 30, "options": { "displayMode": "lcd", "minVizHeight": 10, "minVizWidth": 0, "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "showUnfilled": true, "valueMode": "color" }, - "targets": [{ "expr": "homeassistant_cover_position{friendly_name!~\".*Alle.*|.*Süd.*|.*[Nn]ord.*|.*[Oo]st.*|.*[Ww]est.*\"}", "legendFormat": "{{friendly_name}}", "refId": "A" }], + "targets": [{ "expr": "max by (entity, friendly_name) (homeassistant_cover_position{entity!~\"cover.alle_rollos|cover.ost_rollos|cover.sud_rollos|cover.eg_kuche_rollo|cover.eg_schlafzimmer_rollo\"})", "instant": true, "range": false, "legendFormat": "{{entity}}", "refId": "A" }], "title": "Blind Positions (0% = closed, 100% = open)", "type": "bargauge" }, { - "gridPos": { "h": 1, "w": 24, "x": 0, "y": 38 }, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 39 }, "id": 104, "title": "Batteries", "type": "row" @@ -234,11 +234,11 @@ }, "overrides": [] }, - "gridPos": { "h": 10, "w": 24, "x": 0, "y": 39 }, + "gridPos": { "h": 14, "w": 24, "x": 0, "y": 40 }, "id": 40, "options": { "displayMode": "lcd", "minVizHeight": 10, "minVizWidth": 0, "orientation": "horizontal", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "showUnfilled": true, "valueMode": "color" }, - "targets": [{ "expr": "sort_desc(homeassistant_sensor_battery_percent > 0)", "legendFormat": "{{friendly_name}}", "refId": "A" }], - "title": "All Battery Levels", + "targets": [{ "expr": "sort(max by (entity, friendly_name) (homeassistant_sensor_battery_percent{entity!~\".*_battery_plus.*|sensor.vitocharge.*\"}))", "instant": true, "range": false, "legendFormat": "{{friendly_name}}", "refId": "A" }], + "title": "All Battery Levels (lowest first)", "type": "bargauge" } ],