Compare commits
No commits in common. "26a68a8962bc9b98c9de86432cbb654ed2bca17a" and "d1634167581e239ebf68162808d14ae89ffe8abf" have entirely different histories.
26a68a8962
...
d163416758
|
|
@ -1,3 +0,0 @@
|
|||
# Wi-Fi credentials for ESPHome devices
|
||||
WIFI_SSID="your_wifi_ssid"
|
||||
WIFI_PASSWORD="your_wifi_password"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
.env
|
||||
.esphome/
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# AGENTS.md (ESPHome Workspace)
|
||||
|
||||
This directory is a self-contained ESPHome project space utilizing dynamic configuration loaders and an interactive flashing CLI.
|
||||
|
||||
## Rules & Design Standards
|
||||
|
||||
### Secret Management
|
||||
* **NEVER** write plaintext Wi-Fi passwords, tokens, or API keys directly in the YAML configurations.
|
||||
* **DO NOT** modify the `.gitignore` to allow checking in `.env` files.
|
||||
* Use ESPHome's `!env_var VAR_NAME` to inject environment variables at compile-time. Any new secrets must be declared in `.env.template` and configured locally in `.env`.
|
||||
|
||||
### Configuration Standards
|
||||
* Default board architecture is ESP32 (`nodemcu-32s` with `arduino` framework) unless specified.
|
||||
* Naming conventions for configurations: `esdisplay_<name>.yaml` or `sensor_<name>.yaml`.
|
||||
* All displays should use the `time` component with SNTP sync for accurate time rendering.
|
||||
* Prefer importing sensors from Home Assistant over Native API client integrations, as it decouples rendering layouts from automation scripts.
|
||||
|
||||
### Build and Run Tools
|
||||
* Use `uv run flash.py` to compile, validate, clean, or flash ESPHome configurations.
|
||||
* Avoid triggering direct `esphome` cli calls unless doing isolated validation tests.
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# ESPHome Use-Cases & e-Paper Display
|
||||
|
||||
This directory contains ESPHome configuration files for various IoT and monitoring devices, using environment variables to keep credentials local and gitignored.
|
||||
|
||||
## Get Started
|
||||
|
||||
### 1. Configure Credentials
|
||||
Copy `.env.template` to `.env` and fill in your Wi-Fi credentials:
|
||||
```bash
|
||||
cp .env.template .env
|
||||
```
|
||||
Inside `.env`, configure:
|
||||
- `WIFI_SSID`: Your local Wi-Fi Name.
|
||||
- `WIFI_PASSWORD`: Your local Wi-Fi Password.
|
||||
|
||||
### 2. Run the Flashing Wizard
|
||||
Use the interactive Python script to flash your microcontroller:
|
||||
```bash
|
||||
uv run flash.py
|
||||
```
|
||||
This wizard will prompt you to:
|
||||
1. Select which `.yaml` configuration file to use.
|
||||
2. Select the command to run (such as `Run`, `Compile`, `Upload`, `Logs`, `Validate`, or `Clean`).
|
||||
|
||||
*Note: `uv run` handles the required dependencies (`questionary` and `python-dotenv`) automatically inside an isolated ephemeral environment, so there is no need to manually manage virtualenvs or pip installs.*
|
||||
|
||||
---
|
||||
|
||||
## Home Assistant Integration
|
||||
|
||||
The configurations in this directory connect directly to Home Assistant using the **ESPHome Native API**.
|
||||
|
||||
### Dynamic Sensor Subscriptions
|
||||
Instead of pushing raw screens from Home Assistant, we pull the required entities dynamically into ESPHome's internal variables.
|
||||
|
||||
1. **Outdoor Temperature (`sensor.regensburg_regensburg_temperatur`)**:
|
||||
Pulled automatically via the `homeassistant` platform sensor.
|
||||
2. **Kitchen Temperature (`sensor.home_kuche_wandthermostat_temperature`)**:
|
||||
Pulled automatically from the kitchen wall thermostat.
|
||||
3. **Kitchen Message (`input_text.epaper_message`)**:
|
||||
A Home Assistant `input_text` helper. When the state changes, Home Assistant pushes the new text to the display.
|
||||
|
||||
### Sending Messages from Command Line
|
||||
You can push text warnings or messages directly to the display from the terminal using the helper script:
|
||||
```bash
|
||||
./send_message.sh "Your custom display message here"
|
||||
```
|
||||
This script reads the long-lived API token from the `k8s/home-assistant` secrets folder to authenticate against the Home Assistant API automatically.
|
||||
|
|
@ -1,271 +0,0 @@
|
|||
esphome:
|
||||
name: esdisplay-kitchen
|
||||
comment: "e-Paper display in the kitchen connected to Home Assistant"
|
||||
platformio_options:
|
||||
lib_deps:
|
||||
- bblanchon/ArduinoJson@7.4.2
|
||||
includes:
|
||||
- prometheus_client.h
|
||||
|
||||
globals:
|
||||
- id: prometheus_connected
|
||||
type: bool
|
||||
restore_value: no
|
||||
initial_value: 'true'
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API (auto-discovery)
|
||||
api:
|
||||
password: ""
|
||||
|
||||
# Over-The-Air updates
|
||||
ota:
|
||||
platform: esphome
|
||||
|
||||
wifi:
|
||||
ssid: !env_var WIFI_SSID
|
||||
password: !env_var WIFI_PASSWORD
|
||||
|
||||
# Enable fallback hotspot in case wifi fails
|
||||
ap:
|
||||
ssid: "Kitchen Display Fallback"
|
||||
password: "fallbackpassword"
|
||||
|
||||
captive_portal:
|
||||
|
||||
# Time synchronization to get current time on display
|
||||
time:
|
||||
- platform: sntp
|
||||
id: sntp_time
|
||||
timezone: "Europe/Berlin"
|
||||
|
||||
# Define local and imported sensors
|
||||
sensor:
|
||||
- platform: homeassistant
|
||||
id: ha_outdoor_temp
|
||||
entity_id: sensor.regensburg_regensburg_temperatur
|
||||
internal: true
|
||||
- platform: homeassistant
|
||||
id: ha_kitchen_temp
|
||||
entity_id: sensor.home_kuche_wandthermostat_temperature
|
||||
internal: true
|
||||
|
||||
# Local template sensors scraped from Prometheus
|
||||
- platform: template
|
||||
id: local_cellar_temp
|
||||
name: "Kitchen Display Cellar Temperature Indoor"
|
||||
unit_of_measurement: "°C"
|
||||
accuracy_decimals: 1
|
||||
- platform: template
|
||||
id: local_cellar_humi
|
||||
name: "Kitchen Display Cellar Humidity Indoor"
|
||||
unit_of_measurement: "%"
|
||||
accuracy_decimals: 0
|
||||
- platform: template
|
||||
id: local_cellar_dp
|
||||
name: "Kitchen Display Cellar Dewpoint Indoor"
|
||||
unit_of_measurement: "°C"
|
||||
accuracy_decimals: 1
|
||||
- platform: template
|
||||
id: local_cellar_out_temp
|
||||
name: "Kitchen Display Cellar Temperature Outdoor"
|
||||
unit_of_measurement: "°C"
|
||||
accuracy_decimals: 1
|
||||
- platform: template
|
||||
id: local_cellar_out_humi
|
||||
name: "Kitchen Display Cellar Humidity Outdoor"
|
||||
unit_of_measurement: "%"
|
||||
accuracy_decimals: 0
|
||||
- platform: template
|
||||
id: local_cellar_out_dp
|
||||
name: "Kitchen Display Cellar Dewpoint Outdoor"
|
||||
unit_of_measurement: "°C"
|
||||
accuracy_decimals: 1
|
||||
- platform: template
|
||||
id: local_fan_status
|
||||
name: "Kitchen Display Cellar Fan Status"
|
||||
accuracy_decimals: 0
|
||||
- platform: template
|
||||
id: local_mold_critical
|
||||
name: "Kitchen Display Cellar Mold Critical"
|
||||
accuracy_decimals: 0
|
||||
- platform: template
|
||||
id: local_fan_would_activate
|
||||
name: "Kitchen Display Cellar Fan Activation Criteria"
|
||||
accuracy_decimals: 0
|
||||
- platform: template
|
||||
id: local_mold_threshold
|
||||
name: "Kitchen Display Cellar Mold Threshold"
|
||||
unit_of_measurement: "%"
|
||||
accuracy_decimals: 0
|
||||
- platform: template
|
||||
id: local_shelly_online
|
||||
name: "Kitchen Display Cellar Shelly Online"
|
||||
accuracy_decimals: 0
|
||||
|
||||
# Interval to scrape metrics from Prometheus every 30 seconds
|
||||
interval:
|
||||
- interval: 30s
|
||||
then:
|
||||
- lambda: |-
|
||||
fetch_prometheus();
|
||||
|
||||
text_sensor:
|
||||
- platform: homeassistant
|
||||
id: ha_message
|
||||
entity_id: input_text.epaper_message
|
||||
internal: true
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
id: wifi_ip
|
||||
|
||||
# Font configuration (uses Google Fonts Roboto)
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: font_title
|
||||
size: 16
|
||||
- file: "gfonts://Roboto"
|
||||
id: font_body
|
||||
size: 12
|
||||
|
||||
# SPI bus configuration for e-Paper display
|
||||
spi:
|
||||
clk_pin: GPIO18
|
||||
mosi_pin: GPIO23
|
||||
|
||||
display:
|
||||
- platform: waveshare_epaper
|
||||
id: epaper_display
|
||||
model: 2.13inv3
|
||||
cs_pin: GPIO5
|
||||
dc_pin: GPIO17
|
||||
reset_pin: GPIO16
|
||||
busy_pin: GPIO4
|
||||
rotation: 90
|
||||
update_interval: 60s
|
||||
lambda: |-
|
||||
// Fill background with white
|
||||
it.fill(COLOR_OFF);
|
||||
|
||||
// Check if Prometheus is reachable
|
||||
if (!id(prometheus_connected)) {
|
||||
it.print(125, 20, id(font_title), TextAlign::CENTER, "PROMETHEUS ERROR");
|
||||
it.print(125, 55, id(font_body), TextAlign::CENTER, "Cannot reach server");
|
||||
it.print(125, 75, id(font_body), TextAlign::CENTER, "Check network or auth");
|
||||
|
||||
// Show time at the bottom if synced
|
||||
it.line(5, 96, 245, 96);
|
||||
char time_str[30];
|
||||
auto time_now = id(sntp_time).now();
|
||||
if (time_now.is_valid()) {
|
||||
it.strftime(5, 100, id(font_body), "Time: %a %H:%M", time_now);
|
||||
} else {
|
||||
it.print(5, 100, id(font_body), "Time: --:--");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// --- SECTION 1: HEADER ---
|
||||
it.print(5, 2, id(font_title), "Cellar Fan (TAUPI)");
|
||||
|
||||
// Time and weekday on the right
|
||||
auto time_now = id(sntp_time).now();
|
||||
if (time_now.is_valid()) {
|
||||
it.strftime(245, 2, id(font_body), TextAlign::TOP_RIGHT, "%a %H:%M", time_now);
|
||||
} else {
|
||||
it.print(245, 2, id(font_body), TextAlign::TOP_RIGHT, "Time: --:--");
|
||||
}
|
||||
|
||||
// Draw header divider
|
||||
it.line(5, 18, 245, 18);
|
||||
|
||||
// --- SECTION 2: CLIMATE CELLS ---
|
||||
// Vertical separator
|
||||
it.line(122, 22, 122, 82);
|
||||
|
||||
// CELLAR INDOOR (Left)
|
||||
it.print(5, 22, id(font_body), "CELLAR INDOOR");
|
||||
|
||||
if (!isnan(id(local_cellar_temp).state)) {
|
||||
it.printf(5, 36, id(font_body), "Temp: %.1f C", id(local_cellar_temp).state);
|
||||
} else {
|
||||
it.print(5, 36, id(font_body), "Temp: -- C");
|
||||
}
|
||||
|
||||
if (!isnan(id(local_cellar_humi).state)) {
|
||||
it.printf(5, 49, id(font_body), "Humi: %.0f%%", id(local_cellar_humi).state);
|
||||
} else {
|
||||
it.print(5, 49, id(font_body), "Humi: --%%");
|
||||
}
|
||||
|
||||
if (!isnan(id(local_cellar_dp).state)) {
|
||||
it.printf(5, 62, id(font_body), "Dewp: %.1f C", id(local_cellar_dp).state);
|
||||
} else {
|
||||
it.print(5, 62, id(font_body), "Dewp: -- C");
|
||||
}
|
||||
|
||||
if (!isnan(id(local_mold_threshold).state)) {
|
||||
it.printf(5, 75, id(font_body), "Limit: %.0f%%", id(local_mold_threshold).state);
|
||||
} else {
|
||||
it.print(5, 75, id(font_body), "Limit: --%%");
|
||||
}
|
||||
|
||||
// CELLAR OUTDOOR (Right)
|
||||
it.print(128, 22, id(font_body), "CELLAR OUTDOOR");
|
||||
|
||||
if (!isnan(id(local_cellar_out_temp).state)) {
|
||||
it.printf(128, 36, id(font_body), "Temp: %.1f C", id(local_cellar_out_temp).state);
|
||||
} else {
|
||||
it.print(128, 36, id(font_body), "Temp: -- C");
|
||||
}
|
||||
|
||||
if (!isnan(id(local_cellar_out_humi).state)) {
|
||||
it.printf(128, 49, id(font_body), "Humi: %.0f%%", id(local_cellar_out_humi).state);
|
||||
} else {
|
||||
it.print(128, 49, id(font_body), "Humi: --%%");
|
||||
}
|
||||
|
||||
if (!isnan(id(local_cellar_out_dp).state)) {
|
||||
it.printf(128, 62, id(font_body), "Dewp: %.1f C", id(local_cellar_out_dp).state);
|
||||
} else {
|
||||
it.print(128, 62, id(font_body), "Dewp: -- C");
|
||||
}
|
||||
|
||||
// --- SECTION 3: STATUS BAR (Bottom) ---
|
||||
it.line(5, 86, 245, 86);
|
||||
|
||||
// Fan status
|
||||
const char* fan_state = "OFF";
|
||||
if (!isnan(id(local_fan_status).state) && id(local_fan_status).state > 0.5) {
|
||||
fan_state = "ON";
|
||||
}
|
||||
it.printf(5, 90, id(font_body), "Fan: %s", fan_state);
|
||||
|
||||
// Mold status
|
||||
const char* mold_state = "SAFE";
|
||||
if (!isnan(id(local_mold_critical).state) && id(local_mold_critical).state > 0.5) {
|
||||
mold_state = "CRITICAL";
|
||||
}
|
||||
it.printf(128, 90, id(font_body), "Mold: %s", mold_state);
|
||||
|
||||
// Criteria status
|
||||
const char* crit_state = "NO";
|
||||
if (!isnan(id(local_fan_would_activate).state) && id(local_fan_would_activate).state > 0.5) {
|
||||
crit_state = "YES";
|
||||
}
|
||||
it.printf(5, 104, id(font_body), "Criteria: %s", crit_state);
|
||||
|
||||
// Shelly Status
|
||||
const char* shelly_state = "OFFLINE";
|
||||
if (!isnan(id(local_shelly_online).state) && id(local_shelly_online).state > 0.5) {
|
||||
shelly_state = "ONLINE";
|
||||
}
|
||||
it.printf(128, 104, id(font_body), "Shelly: %s", shelly_state);
|
||||
142
esphome/flash.py
142
esphome/flash.py
|
|
@ -1,142 +0,0 @@
|
|||
# /// script
|
||||
# requires-python = ">=3.11"
|
||||
# dependencies = [
|
||||
# "python-dotenv",
|
||||
# "questionary",
|
||||
# ]
|
||||
# ///
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Ensure we run from the script's directory
|
||||
script_dir = Path(__file__).resolve().parent
|
||||
os.chdir(script_dir)
|
||||
|
||||
try:
|
||||
import questionary
|
||||
except ImportError:
|
||||
print("[Error] Failed to import questionary. Run this script using 'uv run flash.py'.")
|
||||
sys.exit(1)
|
||||
|
||||
def run_esphome(args, env):
|
||||
esphome_bin = shutil.which("esphome")
|
||||
if not esphome_bin:
|
||||
print("\n[Error] 'esphome' CLI not found on PATH.")
|
||||
print("Please install it (e.g. 'brew install esphome' or 'pip install esphome').\n")
|
||||
sys.exit(1)
|
||||
|
||||
cmd = [esphome_bin] + args
|
||||
print(f"\nExecuting: {' '.join(cmd)}\n")
|
||||
try:
|
||||
process = subprocess.Popen(
|
||||
cmd,
|
||||
env=env,
|
||||
stdout=sys.stdout,
|
||||
stderr=sys.stderr,
|
||||
text=True
|
||||
)
|
||||
process.wait()
|
||||
return process.returncode
|
||||
except KeyboardInterrupt:
|
||||
print("\n\nExecution interrupted.")
|
||||
return 1
|
||||
|
||||
def get_device_name(yaml_path):
|
||||
try:
|
||||
with open(yaml_path, "r") as f:
|
||||
in_esphome = False
|
||||
for line in f:
|
||||
stripped = line.strip()
|
||||
if stripped.startswith("esphome:"):
|
||||
in_esphome = True
|
||||
continue
|
||||
if in_esphome:
|
||||
if line.strip() and not line.startswith(" ") and not line.startswith("\t"):
|
||||
break
|
||||
if stripped.startswith("name:"):
|
||||
name = stripped.split(":", 1)[1].split("#", 1)[0].strip()
|
||||
return name.replace('"', '').replace("'", "")
|
||||
except Exception:
|
||||
pass
|
||||
return None
|
||||
|
||||
def main():
|
||||
env_file = script_dir / ".env"
|
||||
template_file = script_dir / ".env.template"
|
||||
|
||||
# Auto-copy template if .env is missing
|
||||
if not env_file.exists():
|
||||
if template_file.exists():
|
||||
print(f"'.env' not found. Copying '.env.template' to '.env'...")
|
||||
shutil.copy(template_file, env_file)
|
||||
print("\n[Action Required] Please open '.env' and fill in your Wi-Fi credentials.")
|
||||
sys.exit(0)
|
||||
else:
|
||||
print("[Error] Neither '.env' nor '.env.template' could be found.")
|
||||
sys.exit(1)
|
||||
|
||||
load_dotenv(env_file)
|
||||
|
||||
# 1. Select YAML Configuration
|
||||
yaml_files = sorted([f.name for f in script_dir.glob("*.yaml")])
|
||||
if not yaml_files:
|
||||
print("[Error] No ESPHome configuration files (*.yaml) found in this directory.")
|
||||
sys.exit(1)
|
||||
|
||||
selected_yaml = questionary.select(
|
||||
"Select the ESPHome configuration to compile/flash:",
|
||||
choices=yaml_files
|
||||
).ask()
|
||||
|
||||
if not selected_yaml:
|
||||
sys.exit(0)
|
||||
|
||||
# 2. Select Command Action
|
||||
commands = [
|
||||
questionary.Choice("Run (Validate, compile, upload, and start logs)", "run"),
|
||||
questionary.Choice("Compile (Build only)", "compile"),
|
||||
questionary.Choice("Upload (Flash compiled binary only)", "upload"),
|
||||
questionary.Choice("Logs (Stream device logs)", "logs"),
|
||||
questionary.Choice("Validate (Check syntax only)", "config"),
|
||||
questionary.Choice("Clean (Clear build artifacts)", "clean"),
|
||||
]
|
||||
|
||||
selected_cmd = questionary.select(
|
||||
"Select ESPHome action to perform:",
|
||||
choices=commands
|
||||
).ask()
|
||||
|
||||
if not selected_cmd:
|
||||
sys.exit(0)
|
||||
|
||||
# If upload is selected, verify build files exist
|
||||
if selected_cmd == "upload":
|
||||
device_name = get_device_name(script_dir / selected_yaml)
|
||||
if device_name:
|
||||
build_dir = script_dir / ".esphome" / "build" / device_name
|
||||
if not build_dir.exists():
|
||||
print(f"\n[Warning] Build directory for '{device_name}' does not exist.")
|
||||
print("You must compile the project before uploading it.")
|
||||
confirm = questionary.confirm(
|
||||
"Would you like to compile + upload the configuration now (Run)?",
|
||||
default=True
|
||||
).ask()
|
||||
if confirm:
|
||||
selected_cmd = "run"
|
||||
else:
|
||||
sys.exit(0)
|
||||
|
||||
# Prepare system environment
|
||||
env = os.environ.copy()
|
||||
|
||||
# Execute ESPHome command
|
||||
exit_code = run_esphome([selected_cmd, selected_yaml], env)
|
||||
sys.exit(exit_code)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <WiFiClient.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include "esphome.h"
|
||||
|
||||
// Forward declare the global variables/pointers defined in main.cpp
|
||||
extern template_::TemplateSensor *local_cellar_temp;
|
||||
extern template_::TemplateSensor *local_cellar_humi;
|
||||
extern template_::TemplateSensor *local_cellar_dp;
|
||||
extern template_::TemplateSensor *local_cellar_out_temp;
|
||||
extern template_::TemplateSensor *local_cellar_out_humi;
|
||||
extern template_::TemplateSensor *local_cellar_out_dp;
|
||||
extern template_::TemplateSensor *local_fan_status;
|
||||
extern template_::TemplateSensor *local_mold_critical;
|
||||
extern template_::TemplateSensor *local_fan_would_activate;
|
||||
extern template_::TemplateSensor *local_mold_threshold;
|
||||
extern template_::TemplateSensor *local_shelly_online;
|
||||
extern globals::GlobalsComponent<bool> *prometheus_connected;
|
||||
|
||||
inline void fetch_prometheus() {
|
||||
WiFiClient client;
|
||||
if (!client.connect("prometheus.haumdaucher.de", 80)) {
|
||||
prometheus_connected->value() = false;
|
||||
ESP_LOGW("taupi", "Failed to connect to Prometheus over HTTP");
|
||||
return;
|
||||
}
|
||||
|
||||
// Send HTTP/1.0 request to avoid chunked transfer encoding!
|
||||
client.println("GET /api/v1/query?query=%7B__name__%3D~%22taupi_.*%7Cup%22%2Cjob%3D%22taupi-fan%22%7D HTTP/1.0");
|
||||
client.println("Host: prometheus.haumdaucher.de");
|
||||
client.println("Authorization: Basic bW9yaXR6OlZhZWo2UXVpZXF1NHZvMGphZVJh");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
|
||||
// Read headers
|
||||
bool headers_ended = false;
|
||||
std::string body = "";
|
||||
while (client.connected() || client.available()) {
|
||||
if (client.available()) {
|
||||
if (!headers_ended) {
|
||||
String line = client.readStringUntil('\n');
|
||||
if (line == "\r" || line == "") {
|
||||
headers_ended = true;
|
||||
}
|
||||
} else {
|
||||
String data = client.readString();
|
||||
body += data.c_str();
|
||||
}
|
||||
}
|
||||
}
|
||||
client.stop();
|
||||
|
||||
if (body.length() == 0) {
|
||||
prometheus_connected->value() = false;
|
||||
ESP_LOGW("taupi", "Empty response body from Prometheus");
|
||||
return;
|
||||
}
|
||||
|
||||
prometheus_connected->value() = true;
|
||||
|
||||
// Parse body using ArduinoJson 7
|
||||
JsonDocument doc;
|
||||
DeserializationError error = deserializeJson(doc, body);
|
||||
if (!error) {
|
||||
JsonObject root = doc.as<JsonObject>();
|
||||
JsonObject data = root["data"];
|
||||
JsonArray result = data["result"];
|
||||
for (JsonObject item : result) {
|
||||
JsonObject metric = item["metric"];
|
||||
std::string name = metric["__name__"].as<std::string>();
|
||||
JsonArray value = item["value"];
|
||||
if (value.size() >= 2) {
|
||||
std::string val_str = value[1].as<std::string>();
|
||||
float val = atof(val_str.c_str());
|
||||
|
||||
if (name == "taupi_temperature_celsius_innen") local_cellar_temp->publish_state(val);
|
||||
else if (name == "taupi_humidity_percent_innen") local_cellar_humi->publish_state(val);
|
||||
else if (name == "taupi_dewpoint_celsius_innen") local_cellar_dp->publish_state(val);
|
||||
else if (name == "taupi_temperature_celsius_aussen") local_cellar_out_temp->publish_state(val);
|
||||
else if (name == "taupi_humidity_percent_aussen") local_cellar_out_humi->publish_state(val);
|
||||
else if (name == "taupi_dewpoint_celsius_aussen") local_cellar_out_dp->publish_state(val);
|
||||
else if (name == "taupi_relay_status") local_fan_status->publish_state(val);
|
||||
else if (name == "taupi_is_critical") local_mold_critical->publish_state(val);
|
||||
else if (name == "taupi_would_fan_activate") local_fan_would_activate->publish_state(val);
|
||||
else if (name == "taupi_critical_humidity_threshold_percent") local_mold_threshold->publish_state(val);
|
||||
else if (name == "up") {
|
||||
std::string job = metric["job"].as<std::string>();
|
||||
if (job == "taupi-fan") {
|
||||
local_shelly_online->publish_state(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ESP_LOGD("taupi", "Successfully parsed Taupi metrics from Prometheus");
|
||||
} else {
|
||||
ESP_LOGW("taupi", "JSON parsing failed: %s", error.c_str());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
CDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# Read the token from the home-assistant secrets folder
|
||||
TOKEN_FILE="${CDIR}/../k8s/home-assistant/tmp_long_lived_token.secret.yml"
|
||||
|
||||
if [ ! -f "$TOKEN_FILE" ]; then
|
||||
echo "Error: Home Assistant token file not found at $TOKEN_FILE."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract the token (grab the line that is not a comment)
|
||||
TOKEN=$(grep -v '^#' "$TOKEN_FILE" | tr -d '\n' | tr -d '\r' | xargs)
|
||||
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "Error: Token extracted from $TOKEN_FILE is empty."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the message from arguments
|
||||
MESSAGE="${1:-"Hello from command line!"}"
|
||||
|
||||
echo "Sending message: '$MESSAGE' to Home Assistant (https://hass.moritzgraf.de)..."
|
||||
|
||||
# Call the Home Assistant REST API to set the value of the input_text helper
|
||||
curl -s -X POST \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"entity_id\": \"input_text.epaper_message\", \"value\": \"$MESSAGE\"}" \
|
||||
https://hass.moritzgraf.de/api/services/input_text/set_value
|
||||
|
||||
echo -e "\nDone!"
|
||||
Binary file not shown.
|
|
@ -1,146 +1,92 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
energy-monitor.json: '{"uid": "energy-monitor", "title": "\u26a1 Energy Monitor",
|
||||
"tags": ["home", "energy", "solar", "power", "auto-generated"], "timezone": "browser",
|
||||
"schemaVersion": 39, "version": 1, "refresh": "5m", "editable": false, "graphTooltip":
|
||||
1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "\u26a1 Live
|
||||
Power", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "collapsed":
|
||||
false}, {"title": "\u2600\ufe0f Solar", "type": "stat", "datasource": {"type":
|
||||
"prometheus", "uid": "prometheus"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1},
|
||||
"fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode":
|
||||
"absolute", "steps": [{"color": "#555", "value": null}, {"color": "#FFD700", "value":
|
||||
100}, {"color": "#73BF69", "value": 500}, {"color": "#37872D", "value": 2000}]},
|
||||
"color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode":
|
||||
"background", "textMode": "auto", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_systemleistung\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udfe0 Self-Use", "type":
|
||||
"stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555",
|
||||
"value": null}, {"color": "#73BF69", "value": 100}, {"color": "#FFD700", "value":
|
||||
1000}, {"color": "#FF7383", "value": 3000}]}, "color": {"mode": "thresholds"}}},
|
||||
"options": {"graphMode": "area", "colorMode": "background", "textMode": "auto",
|
||||
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr":
|
||||
"homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_eigene_leistung\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd0c Grid Import",
|
||||
"type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69",
|
||||
"value": null}, {"color": "#FFD700", "value": 500}, {"color": "#FF7383", "value":
|
||||
2000}, {"color": "#C4162A", "value": 5000}]}, "color": {"mode": "thresholds"}}},
|
||||
"options": {"graphMode": "area", "colorMode": "background", "textMode": "auto",
|
||||
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr":
|
||||
"homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_bezugsleistung\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\u2197\ufe0f Grid Export",
|
||||
"type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555",
|
||||
"value": null}, {"color": "#5794F2", "value": 100}, {"color": "#1F60C4", "value":
|
||||
500}, {"color": "#3274D9", "value": 2000}]}, "color": {"mode": "thresholds"}}},
|
||||
"options": {"graphMode": "area", "colorMode": "background", "textMode": "auto",
|
||||
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr":
|
||||
"homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_einspeiseleistung\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd0b Battery SoC",
|
||||
"type": "gauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "#C4162A", "value": null}, {"color": "#FF7383", "value": 20}, {"color":
|
||||
"#FFD700", "value": 40}, {"color": "#73BF69", "value": 60}]}, "color": {"mode":
|
||||
"thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
|
||||
"orientation": "auto", "showThresholdLabels": true, "showThresholdMarkers": true},
|
||||
"targets": [{"expr": "homeassistant_sensor_battery_percent{entity=\"sensor.ladeaufstellung_soc\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udfe1 Total House",
|
||||
"type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555",
|
||||
"value": null}, {"color": "#73BF69", "value": 200}, {"color": "#FFD700", "value":
|
||||
1000}, {"color": "#FF7383", "value": 3000}, {"color": "#C4162A", "value": 5000}]},
|
||||
"color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode":
|
||||
"background", "textMode": "auto", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_power_w{entity=\"sensor.home_strommesserat_currentpowerconsumption\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udcc8 Power Flow",
|
||||
"type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, "collapsed": false},
|
||||
{"title": "Power Timeline", "type": "timeseries", "datasource": {"type": "prometheus",
|
||||
"uid": "prometheus"}, "gridPos": {"h": 10, "w": 24, "x": 0, "y": 6}, "fieldConfig":
|
||||
{"defaults": {"unit": "watt", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls":
|
||||
true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options":
|
||||
"Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode":
|
||||
"fixed"}}, {"id": "custom.fillOpacity", "value": 15}]}, {"matcher": {"id": "byName",
|
||||
"options": "Self-Use"}, "properties": [{"id": "color", "value": {"fixedColor":
|
||||
"#73BF69", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid
|
||||
Import"}, "properties": [{"id": "color", "value": {"fixedColor": "#FF7383", "mode":
|
||||
"fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Export"}, "properties":
|
||||
[{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}, {"id":
|
||||
"custom.lineStyle", "value": {"fill": "dash", "dash": [8, 4]}}]}, {"matcher":
|
||||
{"id": "byName", "options": "Local Load"}, "properties": [{"id": "color", "value":
|
||||
{"fixedColor": "#C4162A", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["max", "mean", "lastNotNull"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "SOLAR", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_systemleistung\"}",
|
||||
"format": "time_series"}, {"refId": "SELF", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_eigene_leistung\"}",
|
||||
"format": "time_series"}, {"refId": "IMPORT", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_bezugsleistung\"}",
|
||||
"format": "time_series"}, {"refId": "EXPORT", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_einspeiseleistung\"}",
|
||||
"format": "time_series"}, {"refId": "LOAD", "expr": "homeassistant_sensor_power_w{entity=\"sensor.garten_bzp3n7g1b0_lokale_lastleistung\"}",
|
||||
"format": "time_series"}]}, {"title": "\ud83d\udcca Energy Summary (Today)", "type":
|
||||
"row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 16}, "collapsed": false}, {"title":
|
||||
"\u2600\ufe0f Solar Produced", "type": "bargauge", "datasource": {"type": "prometheus",
|
||||
"uid": "prometheus"}, "gridPos": {"h": 4, "w": 6, "x": 0, "y": 17}, "fieldConfig":
|
||||
{"defaults": {"unit": "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode":
|
||||
"absolute", "steps": [{"color": "#555", "value": null}, {"color": "#FFD700", "value":
|
||||
5}, {"color": "#73BF69", "value": 15}, {"color": "#37872D", "value": 30}]}, "color":
|
||||
{"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}, "orientation": "horizontal", "displayMode": "basic", "showUnfilled":
|
||||
true}, "targets": [{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_systemerzeugung_heute\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udfe0 Self-Consumed",
|
||||
"type": "bargauge", "datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 6, "y": 17}, "fieldConfig": {"defaults": {"unit":
|
||||
"kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "#555", "value": null}, {"color": "#73BF69", "value": 5}, {"color":
|
||||
"#FFD700", "value": 15}, {"color": "#FF7383", "value": 30}]}, "color": {"mode":
|
||||
"thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
|
||||
"orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets":
|
||||
[{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_eigenverbrauch_heute\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd0c Grid Imported",
|
||||
"type": "bargauge", "datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 17}, "fieldConfig": {"defaults": {"unit":
|
||||
"kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "#73BF69", "value": null}, {"color": "#FFD700", "value": 2}, {"color":
|
||||
"#FF7383", "value": 10}, {"color": "#C4162A", "value": 20}]}, "color": {"mode":
|
||||
"thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
|
||||
"orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets":
|
||||
[{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_netzbezug_heute\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\u2197\ufe0f Grid Exported",
|
||||
"type": "bargauge", "datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 18, "y": 17}, "fieldConfig": {"defaults": {"unit":
|
||||
"kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "#555", "value": null}, {"color": "#5794F2", "value": 2}, {"color":
|
||||
"#1F60C4", "value": 10}, {"color": "#3274D9", "value": 20}]}, "color": {"mode":
|
||||
"thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
|
||||
"orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets":
|
||||
[{"expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.export_ins_netz_heute\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udcc8 Energy Trend",
|
||||
"type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 21}, "collapsed": false},
|
||||
{"title": "Daily Energy", "type": "timeseries", "datasource": {"type": "prometheus",
|
||||
"uid": "prometheus"}, "gridPos": {"h": 10, "w": 24, "x": 0, "y": 22}, "fieldConfig":
|
||||
{"defaults": {"unit": "kwatth", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls":
|
||||
true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options":
|
||||
"Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode":
|
||||
"fixed"}}]}, {"matcher": {"id": "byName", "options": "Self-Use"}, "properties":
|
||||
[{"id": "color", "value": {"fixedColor": "#73BF69", "mode": "fixed"}}]}, {"matcher":
|
||||
{"id": "byName", "options": "Grid Import"}, "properties": [{"id": "color", "value":
|
||||
{"fixedColor": "#FF7383", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options":
|
||||
"Grid Export"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2",
|
||||
"mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement":
|
||||
"bottom", "calcs": ["sum", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [{"refId": "SOLAR", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_systemerzeugung_heute\"}",
|
||||
"format": "time_series"}, {"refId": "SELF", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_eigenverbrauch_heute\"}",
|
||||
"format": "time_series"}, {"refId": "IMPORT", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.garten_bzp3n7g1b0_netzbezug_heute\"}",
|
||||
"format": "time_series"}, {"refId": "EXPORT", "expr": "homeassistant_sensor_energy_kwh{entity=\"sensor.export_ins_netz_heute\"}",
|
||||
"format": "time_series"}]}]}'
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
grafana_dashboard_folder: "\U0001F3E0 Home"
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
name: grafana-dashboard-energy-monitor
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
annotations:
|
||||
grafana_dashboard_folder: 🏠 Home
|
||||
data:
|
||||
energy-monitor.json: '{"uid": "energy-monitor", "title": "⚡ Energy Monitor", "tags": ["home", "energy", "solar", "power", "auto-generated"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh":
|
||||
"5m", "editable": false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "⚡ Live Power", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "collapsed": false},
|
||||
{"title": "☀️ Solar", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals":
|
||||
0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#FFD700", "value": 100}, {"color": "#73BF69", "value": 500}, {"color": "#37872D", "value": 2000}]}, "color":
|
||||
{"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket:
|
||||
\"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemleistung\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🏠 Self-Use", "type": "stat", "datasource": {"type": "influxdb",
|
||||
"uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value":
|
||||
null}, {"color": "#73BF69", "value": 100}, {"color": "#FFD700", "value": 1000}, {"color": "#FF7383", "value": 3000}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode":
|
||||
"background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_eigene_leistung\")\n |> aggregateWindow(every: v.windowPeriod,
|
||||
fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🔌 Grid Import", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#FFD700",
|
||||
"value": 500}, {"color": "#FF7383", "value": 2000}, {"color": "#C4162A", "value": 5000}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode":
|
||||
"auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r)
|
||||
=> r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_bezugsleistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty:
|
||||
false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "↗️ Grid Export", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4,
|
||||
"w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#5794F2", "value": 100},
|
||||
{"color": "#1F60C4", "value": 500}, {"color": "#3274D9", "value": 2000}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
|
||||
== \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_einspeiseleistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |>
|
||||
yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🔋 Battery SoC", "type": "gauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x":
|
||||
16, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps": [{"color": "#C4162A", "value": null}, {"color": "#FF7383",
|
||||
"value": 20}, {"color": "#FFD700", "value": 40}, {"color": "#73BF69", "value": 60}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation":
|
||||
"auto", "showThresholdLabels": true, "showThresholdMarkers": true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and
|
||||
r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"ladeaufstellung_soc\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🏡 Total House", "type":
|
||||
"stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "watt", "decimals": 0, "thresholds": {"mode":
|
||||
"absolute", "steps": [{"color": "#555", "value": null}, {"color": "#73BF69", "value": 200}, {"color": "#FFD700", "value": 1000}, {"color": "#FF7383", "value": 3000}, {"color": "#C4162A", "value": 5000}]},
|
||||
"color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query":
|
||||
"from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id
|
||||
== \"home_strommesserat_currentpowerconsumption\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title":
|
||||
"📈 Power Flow", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, {"title": "Power Timeline", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"},
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 6}, "fieldConfig": {"defaults": {"unit": "watt", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher":
|
||||
{"id": "byName", "options": "Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode": "fixed"}}, {"id": "custom.fillOpacity", "value": 15}]}, {"matcher": {"id": "byName", "options":
|
||||
"Self-Use"}, "properties": [{"id": "color", "value": {"fixedColor": "#73BF69", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Import"}, "properties": [{"id": "color", "value": {"fixedColor":
|
||||
"#FF7383", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Export"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}, {"id": "custom.lineStyle",
|
||||
"value": {"fill": "dash", "dash": [8, 4]}}]}, {"matcher": {"id": "byName", "options": "Local Load"}, "properties": [{"id": "color", "value": {"fixedColor": "#C4162A", "mode": "fixed"}}]}]}, "options":
|
||||
{"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["max", "mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "SOLAR", "query": "from(bucket:
|
||||
\"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemleistung\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Solar\")", "resultFormat": "time_series"}, {"refId": "SELF", "query":
|
||||
"from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id
|
||||
== \"garten_bzp3n7g1b0_eigene_leistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Self-Use\")", "resultFormat":
|
||||
"time_series"}, {"refId": "IMPORT", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"]
|
||||
== \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_bezugsleistung\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |>
|
||||
set(key: \"source\", value: \"Grid Import\")", "resultFormat": "time_series"}, {"refId": "EXPORT", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_einspeiseleistung\")\n |> aggregateWindow(every: v.windowPeriod,
|
||||
fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Grid Export\")", "resultFormat": "time_series"}, {"refId": "LOAD", "query": "from(bucket: \"default\")\n |>
|
||||
range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"W\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_lokale_lastleistung\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"source\", value: \"Local Load\")", "resultFormat": "time_series"}]}, {"title": "📊 Energy
|
||||
Summary (Today)", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 16}, "collapsed": false}, {"title": "☀️ Solar Produced", "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 0, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color":
|
||||
"#FFD700", "value": 5}, {"color": "#73BF69", "value": 15}, {"color": "#37872D", "value": 30}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
|
||||
"orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\"
|
||||
and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemerzeugung_heute\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title":
|
||||
"🏠 Self-Consumed", "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 6, "x": 6, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals":
|
||||
1, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#73BF69", "value": 5}, {"color": "#FFD700", "value": 15}, {"color": "#FF7383", "value": 30}]},
|
||||
"color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query":
|
||||
"from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_eigenverbrauch_heute\")\n |>
|
||||
last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "🔌 Grid Imported", "type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h":
|
||||
4, "w": 6, "x": 12, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": 1, "min": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#FFD700",
|
||||
"value": 2}, {"color": "#FF7383", "value": 10}, {"color": "#C4162A", "value": 20}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation":
|
||||
"horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"]
|
||||
== \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_netzbezug_heute\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "↗️ Grid Exported",
|
||||
"type": "bargauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 6, "x": 18, "y": 17}, "fieldConfig": {"defaults": {"unit": "kwatth", "decimals": 1, "min":
|
||||
0, "thresholds": {"mode": "absolute", "steps": [{"color": "#555", "value": null}, {"color": "#5794F2", "value": 2}, {"color": "#1F60C4", "value": 10}, {"color": "#3274D9", "value": 20}]}, "color": {"mode":
|
||||
"thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": "horizontal", "displayMode": "basic", "showUnfilled": true}, "targets": [{"query": "from(bucket:
|
||||
\"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"export_ins_netz_heute\")\n |> last()\n |>
|
||||
yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "📈 Energy Trend", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 21}, "collapsed": false}, {"title": "Daily Energy", "type":
|
||||
"timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 10, "w": 24, "x": 0, "y": 22}, "fieldConfig": {"defaults": {"unit": "kwatth", "custom": {"lineWidth": 2,
|
||||
"fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Solar"}, "properties": [{"id": "color", "value": {"fixedColor": "#FFD700", "mode":
|
||||
"fixed"}}]}, {"matcher": {"id": "byName", "options": "Self-Use"}, "properties": [{"id": "color", "value": {"fixedColor": "#73BF69", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid
|
||||
Import"}, "properties": [{"id": "color", "value": {"fixedColor": "#FF7383", "mode": "fixed"}}]}, {"matcher": {"id": "byName", "options": "Grid Export"}, "properties": [{"id": "color", "value": {"fixedColor":
|
||||
"#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["sum", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId":
|
||||
"SOLAR", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |>
|
||||
filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_systemerzeugung_heute\")\n |> aggregateWindow(every: 1d, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"type\", value:
|
||||
\"Solar\")", "resultFormat": "time_series"}, {"refId": "SELF", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
|
||||
== \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_eigenverbrauch_heute\")\n |> aggregateWindow(every: 1d, fn: mean, createEmpty: false)\n |> yield(name:
|
||||
\"mean\") |> set(key: \"type\", value: \"Self-Use\")", "resultFormat": "time_series"}, {"refId": "IMPORT", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"garten_bzp3n7g1b0_netzbezug_heute\")\n |> aggregateWindow(every: 1d, fn: mean,
|
||||
createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"type\", value: \"Grid Import\")", "resultFormat": "time_series"}, {"refId": "EXPORT", "query": "from(bucket: \"default\")\n |> range(start:
|
||||
v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"kWh\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"export_ins_netz_heute\")\n |>
|
||||
aggregateWindow(every: 1d, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"type\", value: \"Grid Export\")", "resultFormat": "time_series"}]}]}'
|
||||
|
|
|
|||
|
|
@ -1,200 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-dashboard-fritzbox-hosts
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
annotations:
|
||||
grafana_dashboard_folder: "🏠 Home"
|
||||
data:
|
||||
fritzbox-hosts.json: |-
|
||||
{
|
||||
"uid": "fritzbox-hosts",
|
||||
"title": "📶 FRITZ!Box Home Network",
|
||||
"tags": ["network", "fritzbox", "hosts", "prometheus"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "30s",
|
||||
"editable": false,
|
||||
"graphTooltip": 2,
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"to": "now"
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"title": "Device Status",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{
|
||||
"type": "value",
|
||||
"options": {
|
||||
"0": {
|
||||
"text": "OFFLINE",
|
||||
"color": "red"
|
||||
},
|
||||
"1": {
|
||||
"text": "ONLINE",
|
||||
"color": "green"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "background",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_host_active{hostname=\"$host\"}",
|
||||
"legendFormat": "Status",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Device Info",
|
||||
"type": "table",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 16,
|
||||
"x": 8,
|
||||
"y": 0
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_host_active{hostname=\"$host\"}",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"Time": true,
|
||||
"Value": true,
|
||||
"__name__": true,
|
||||
"gateway": true,
|
||||
"job": true,
|
||||
"instance": true,
|
||||
"hostname": true
|
||||
},
|
||||
"renameByName": {
|
||||
"ipaddress": "IP Address",
|
||||
"macaddress": "MAC Address",
|
||||
"interfacetype": "Connection Interface"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Connection History",
|
||||
"type": "state-timeline",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 5
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{
|
||||
"type": "value",
|
||||
"options": {
|
||||
"0": {
|
||||
"text": "OFFLINE",
|
||||
"color": "red"
|
||||
},
|
||||
"1": {
|
||||
"text": "ONLINE",
|
||||
"color": "green"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"showValue": "never",
|
||||
"align": "left",
|
||||
"mergeValues": true
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_host_active{hostname=\"$host\"}",
|
||||
"legendFormat": "{{hostname}}",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"definition": "label_values(gateway_host_active, hostname)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Select Local Device",
|
||||
"multi": false,
|
||||
"name": "host",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(gateway_host_active, hostname)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,651 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-dashboard-fritzbox
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
annotations:
|
||||
grafana_dashboard_folder: "🏠 Home"
|
||||
data:
|
||||
fritzbox.json: |-
|
||||
{
|
||||
"uid": "fritzbox",
|
||||
"title": "📶 FRITZ!Box Status",
|
||||
"tags": ["network", "fritzbox", "infrastructure", "prometheus"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "10s",
|
||||
"editable": false,
|
||||
"graphTooltip": 2,
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"to": "now"
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"title": "🌐 WAN Connectivity",
|
||||
"type": "row",
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"collapsed": false
|
||||
},
|
||||
{
|
||||
"title": "IP Connection Status",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 1
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{
|
||||
"type": "value",
|
||||
"options": {
|
||||
"0": {
|
||||
"text": "DISCONNECTED",
|
||||
"color": "red"
|
||||
},
|
||||
"1": {
|
||||
"text": "CONNECTED",
|
||||
"color": "green"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "background",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_connection_status{connection=\"IP\"}",
|
||||
"legendFormat": "IP Status",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "DSL Link Status",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 4,
|
||||
"x": 4,
|
||||
"y": 1
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{
|
||||
"type": "value",
|
||||
"options": {
|
||||
"0": {
|
||||
"text": "LINK DOWN",
|
||||
"color": "red"
|
||||
},
|
||||
"1": {
|
||||
"text": "LINK UP",
|
||||
"color": "green"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "background",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_connection_status{connection=\"Physical Link\"}",
|
||||
"legendFormat": "DSL Link",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Connection Uptime",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 4,
|
||||
"x": 8,
|
||||
"y": 1
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"color": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "blue"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "value",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_connection_uptime_seconds",
|
||||
"legendFormat": "Uptime",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Downstream DSL Sync",
|
||||
"type": "gauge",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 1
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bps",
|
||||
"min": 0,
|
||||
"max": 300000000,
|
||||
"color": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "green"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_max_bitrate{direction=\"Down\"}",
|
||||
"legendFormat": "Down Sync",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Upstream DSL Sync",
|
||||
"type": "gauge",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 1
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bps",
|
||||
"min": 0,
|
||||
"max": 50000000,
|
||||
"color": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "green"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_max_bitrate{direction=\"Up\"}",
|
||||
"legendFormat": "Up Sync",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "📈 Traffic & Speed",
|
||||
"type": "row",
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 5
|
||||
},
|
||||
"collapsed": false
|
||||
},
|
||||
{
|
||||
"title": "Real-time Traffic Rates",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 16,
|
||||
"x": 0,
|
||||
"y": 6
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "Bps",
|
||||
"custom": {
|
||||
"lineWidth": 2,
|
||||
"fillOpacity": 10,
|
||||
"spanNulls": true,
|
||||
"showPoints": "never"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Download (Rx)"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "#4CAF50",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Upload (Tx)"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "#2196F3",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"calcs": [
|
||||
"lastNotNull",
|
||||
"mean",
|
||||
"max"
|
||||
]
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "desc"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_traffic_rate{direction=\"Received\"}",
|
||||
"legendFormat": "Download (Rx)",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "gateway_traffic_rate{direction=\"Sent\"}",
|
||||
"legendFormat": "Upload (Tx)",
|
||||
"refId": "B"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Total Downloaded Data",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 6
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes",
|
||||
"color": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "green"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "value",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_traffic_64{direction=\"Received\", unit=\"Bytes\"}",
|
||||
"legendFormat": "Total Downloaded",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Total Uploaded Data",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 10
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes",
|
||||
"color": {
|
||||
"mode": "fixed",
|
||||
"fixedColor": "blue"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "value",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "gateway_traffic_64{direction=\"Sent\", unit=\"Bytes\"}",
|
||||
"legendFormat": "Total Uploaded",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "🛡️ WireGuard VPN Tunnel",
|
||||
"type": "row",
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 14
|
||||
},
|
||||
"collapsed": false
|
||||
},
|
||||
{
|
||||
"title": "VPN Connection Status",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{
|
||||
"type": "value",
|
||||
"options": {
|
||||
"0": {
|
||||
"text": "DISCONNECTED",
|
||||
"color": "red"
|
||||
},
|
||||
"1": {
|
||||
"text": "CONNECTED",
|
||||
"color": "green"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "background",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "(time() - wireguard_latest_handshake_seconds{interface=\"wg0\"} < 300) or on() vector(0)",
|
||||
"legendFormat": "VPN Status",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Last VPN Handshake",
|
||||
"type": "stat",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 15
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 300
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 600
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "value",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "time() - wireguard_latest_handshake_seconds{interface=\"wg0\"}",
|
||||
"legendFormat": "Handshake Delay",
|
||||
"refId": "A"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "VPN Traffic Rates",
|
||||
"type": "timeseries",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 15
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "Bps",
|
||||
"custom": {
|
||||
"lineWidth": 2,
|
||||
"fillOpacity": 10,
|
||||
"spanNulls": true,
|
||||
"showPoints": "never"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Received (Rx)"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "#4CAF50",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Sent (Tx)"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "#2196F3",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"calcs": [
|
||||
"lastNotNull",
|
||||
"mean",
|
||||
"max"
|
||||
]
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "desc"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(wireguard_received_bytes_total{interface=\"wg0\"}[5m])",
|
||||
"legendFormat": "Received (Rx)",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "rate(wireguard_sent_bytes_total{interface=\"wg0\"}[5m])",
|
||||
"legendFormat": "Sent (Tx)",
|
||||
"refId": "B"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,224 +1,98 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
home-climate.json: '{"uid": "home-climate", "title": "\ud83c\udfe0 Home Climate",
|
||||
"tags": ["home", "climate", "temperature", "humidity", "auto-generated", "prometheus"],
|
||||
"timezone": "browser", "schemaVersion": 39, "version": 2, "refresh": "5m", "editable":
|
||||
false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels":
|
||||
[{"type": "row", "title": "\ud83c\udf10 Overview Trends", "gridPos": {"x": 0,
|
||||
"y": 0, "w": 24, "h": 1}, "collapsed": false}, {"type": "timeseries", "title":
|
||||
"Indoor vs Outdoor Temperature", "datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"x": 0, "y": 1, "w": 12, "h": 8}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.regensburg_regensburg_temperatur\"}",
|
||||
"legendFormat": "Outdoor (Regensburg)"}, {"expr": "avg(homeassistant_sensor_temperature_celsius{entity=~\"sensor.home_.*_thermostat_temperature|sensor.home_wall_mounted_thermostat_pro_temperature\"})",
|
||||
"legendFormat": "Average Indoor"}], "fieldConfig": {"defaults": {"unit": "celsius",
|
||||
"custom": {"lineWidth": 2, "fillOpacity": 5}}, "overrides": [{"matcher": {"id":
|
||||
"byName", "options": "Outdoor (Regensburg)"}, "properties": [{"id": "color", "value":
|
||||
{"fixedColor": "light-blue", "mode": "fixed"}}, {"id": "custom.lineStyle", "value":
|
||||
{"fill": "dash", "dash": [10, 5]}}]}, {"matcher": {"id": "byName", "options":
|
||||
"Average Indoor"}, "properties": [{"id": "color", "value": {"fixedColor": "orange",
|
||||
"mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement":
|
||||
"bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort":
|
||||
"desc"}}}, {"type": "timeseries", "title": "Average Indoor Humidity", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 1, "w":
|
||||
12, "h": 8}, "targets": [{"expr": "avg(homeassistant_sensor_humidity_percent{entity=~\".*_humidity\"})",
|
||||
"legendFormat": "Average Humidity"}], "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"custom": {"lineWidth": 2, "fillOpacity": 20}, "color": {"mode": "fixed", "fixedColor":
|
||||
"blue"}}}, "options": {"legend": {"displayMode": "table", "placement": "bottom",
|
||||
"calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi"}}}, {"type": "row",
|
||||
"title": "\ud83d\udcca Room Details", "gridPos": {"x": 0, "y": 9, "w": 24, "h":
|
||||
1}, "collapsed": false}, {"type": "timeseries", "title": "Wohnzimmer", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 10, "w":
|
||||
12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_wohnzimmer\"}",
|
||||
"legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wall_mounted_thermostat_pro_temperature\"}",
|
||||
"legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_temperature\"}",
|
||||
"legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wall_mounted_thermostat_pro_humidity\"}",
|
||||
"legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit":
|
||||
"celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName",
|
||||
"options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value":
|
||||
{"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange",
|
||||
"mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth",
|
||||
"value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties":
|
||||
[{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id":
|
||||
"color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement",
|
||||
"value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity",
|
||||
"value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value":
|
||||
{"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "Wohnzimmer
|
||||
#2", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x":
|
||||
12, "y": 10, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_wohnzimmer_2_og\"}",
|
||||
"legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_2_thermostat_temperature\"}",
|
||||
"legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_2_temperature\"}",
|
||||
"legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wohnzimmer_2_thermostat_humidity\"}",
|
||||
"legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit":
|
||||
"celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName",
|
||||
"options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value":
|
||||
{"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange",
|
||||
"mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth",
|
||||
"value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties":
|
||||
[{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id":
|
||||
"color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement",
|
||||
"value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity",
|
||||
"value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value":
|
||||
{"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "Arbeitszimmer",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0,
|
||||
"y": 19, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_arbeitszimmer_og\"}",
|
||||
"legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_arbeitszimmer_thermostat_temperature\"}",
|
||||
"legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_arbeitszimmer_temperature\"}",
|
||||
"legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_arbeitszimmer_thermostat_humidity\"}",
|
||||
"legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit":
|
||||
"celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName",
|
||||
"options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value":
|
||||
{"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange",
|
||||
"mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth",
|
||||
"value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties":
|
||||
[{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id":
|
||||
"color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement",
|
||||
"value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity",
|
||||
"value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value":
|
||||
{"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "K\u00fcche",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12,
|
||||
"y": 19, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_kuche\"}",
|
||||
"legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_wandthermostat_temperature\"}",
|
||||
"legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_vorne_temperature\"}",
|
||||
"legendFormat": "\ud83d\udd25 Heater 1"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_bar_temperature\"}",
|
||||
"legendFormat": "\ud83d\udd25 Heater 2"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_kuche_wandthermostat_humidity\"}",
|
||||
"legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit":
|
||||
"celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName",
|
||||
"options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value":
|
||||
{"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange",
|
||||
"mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth",
|
||||
"value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties":
|
||||
[{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id":
|
||||
"color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement",
|
||||
"value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity",
|
||||
"value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value":
|
||||
{"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}}, {"type": "timeseries", "title": "Badezimmer",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0,
|
||||
"y": 28, "w": 12, "h": 9}, "targets": [{"expr": "homeassistant_climate_target_temperature_celsius{entity=\"climate.home_badezimmer\"}",
|
||||
"legendFormat": "\ud83c\udfaf Target"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wandthermostat_bad_temperature\"}",
|
||||
"legendFormat": "\ud83c\udf21\ufe0f Thermostat"}, {"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_badezimmer_thermostat_temperature\"}",
|
||||
"legendFormat": "\ud83d\udd25 Heater"}, {"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wandthermostat_bad_humidity\"}",
|
||||
"legendFormat": "\ud83d\udca7 Humidity"}], "fieldConfig": {"defaults": {"unit":
|
||||
"celsius", "custom": {"spanNulls": true}}, "overrides": [{"matcher": {"id": "byName",
|
||||
"options": "\ud83c\udfaf Target"}, "properties": [{"id": "custom.lineStyle", "value":
|
||||
{"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"fixedColor": "dark-orange",
|
||||
"mode": "fixed"}}, {"id": "custom.lineWidth", "value": 3}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83c\udf21\ufe0f Thermostat"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "orange", "mode": "fixed"}}, {"id": "custom.lineWidth",
|
||||
"value": 2}]}, {"matcher": {"id": "byRegexp", "options": ".*Heater.*"}, "properties":
|
||||
[{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [2, 5]}}, {"id":
|
||||
"color", "value": {"fixedColor": "red", "mode": "fixed"}}]}, {"matcher": {"id":
|
||||
"byName", "options": "\ud83d\udca7 Humidity"}, "properties": [{"id": "custom.axisPlacement",
|
||||
"value": "right"}, {"id": "unit", "value": "percent"}, {"id": "custom.fillOpacity",
|
||||
"value": 10}, {"id": "custom.lineWidth", "value": 1}, {"id": "color", "value":
|
||||
{"fixedColor": "blue", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}}, {"type": "row", "title": "\ud83c\udf21\ufe0f
|
||||
Current State", "gridPos": {"x": 0, "y": 37, "w": 24, "h": 1}, "collapsed": false},
|
||||
{"type": "stat", "title": "Wohnzimmer Temp", "datasource": {"type": "prometheus",
|
||||
"uid": "prometheus"}, "gridPos": {"x": 2, "y": 38, "w": 4, "h": 4}, "targets":
|
||||
[{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wall_mounted_thermostat_pro_temperature\"}",
|
||||
"legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals":
|
||||
1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color":
|
||||
"orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}}, {"type": "stat", "title": "Wohnzimmer #2 Temp", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 6, "y": 38, "w":
|
||||
4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wohnzimmer_2_thermostat_temperature\"}",
|
||||
"legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals":
|
||||
1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color":
|
||||
"orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}}, {"type": "stat", "title": "Arbeitszimmer Temp", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 10, "y": 38, "w":
|
||||
4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_arbeitszimmer_thermostat_temperature\"}",
|
||||
"legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals":
|
||||
1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color":
|
||||
"orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}}, {"type": "stat", "title": "K\u00fcche Temp", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 14, "y": 38, "w":
|
||||
4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_kuche_wandthermostat_temperature\"}",
|
||||
"legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals":
|
||||
1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color":
|
||||
"orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}}, {"type": "stat", "title": "Badezimmer Temp", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 18, "y": 38, "w":
|
||||
4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.home_wandthermostat_bad_temperature\"}",
|
||||
"legendFormat": "Temp"}], "fieldConfig": {"defaults": {"unit": "celsius", "decimals":
|
||||
1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color":
|
||||
"orange", "value": 22}, {"color": "red", "value": 26}]}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}}, {"type": "stat", "title": "Wohnzimmer Hum", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 2, "y": 42, "w":
|
||||
4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wall_mounted_thermostat_pro_humidity\"}",
|
||||
"legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute",
|
||||
"steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color":
|
||||
"green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value":
|
||||
70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "Wohnzimmer
|
||||
#2 Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"x": 6, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wohnzimmer_2_thermostat_humidity\"}",
|
||||
"legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute",
|
||||
"steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color":
|
||||
"green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value":
|
||||
70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "Arbeitszimmer
|
||||
Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x":
|
||||
10, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_arbeitszimmer_thermostat_humidity\"}",
|
||||
"legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute",
|
||||
"steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color":
|
||||
"green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value":
|
||||
70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "K\u00fcche
|
||||
Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x":
|
||||
14, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_kuche_wandthermostat_humidity\"}",
|
||||
"legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute",
|
||||
"steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color":
|
||||
"green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value":
|
||||
70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}}, {"type": "stat", "title": "Badezimmer
|
||||
Hum", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x":
|
||||
18, "y": 42, "w": 4, "h": 4}, "targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.home_wandthermostat_bad_humidity\"}",
|
||||
"legendFormat": "Humidity"}], "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute",
|
||||
"steps": [{"color": "red", "value": null}, {"color": "orange", "value": 30}, {"color":
|
||||
"green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value":
|
||||
70}]}}}, "options": {"graphMode": "area", "colorMode": "background", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}}]}'
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
grafana_dashboard_folder: "\U0001F3E0 Home"
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
name: grafana-dashboard-home-climate
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
annotations:
|
||||
grafana_dashboard_folder: 🏠 Home
|
||||
data:
|
||||
home-climate.json: '{"uid": "home-climate", "title": "🏠 Home Climate", "tags": ["home", "climate", "temperature", "humidity", "auto-generated"], "timezone": "browser", "schemaVersion": 39, "version":
|
||||
1, "refresh": "5m", "editable": false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "🌡️ Current Temperatures", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0,
|
||||
"y": 0}, "collapsed": false}, {"title": "Wohnzimmer", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults":
|
||||
{"unit": "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red",
|
||||
"value": 26}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets":
|
||||
[{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn:
|
||||
(r) => r.entity_id == \"home_wall_mounted_thermostat_pro_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]},
|
||||
{"title": "Wohnzimmer #2", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius",
|
||||
"decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color":
|
||||
{"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket:
|
||||
\"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id ==
|
||||
\"home_wohnzimmer_2_thermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Arbeitszimmer",
|
||||
"type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", "decimals": 1, "thresholds":
|
||||
{"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": {"mode": "thresholds"}}},
|
||||
"options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |>
|
||||
range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_arbeitszimmer_thermostat_temperature\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Küche", "type": "stat", "datasource": {"type": "influxdb",
|
||||
"uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue",
|
||||
"value": null}, {"color": "green", "value": 18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background",
|
||||
"textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod,
|
||||
fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Bad", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "blue", "value": null}, {"color": "green", "value":
|
||||
18}, {"color": "orange", "value": 22}, {"color": "red", "value": 26}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
|
||||
== \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |>
|
||||
yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "📈 Temperature Trends", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, {"title": "All Rooms Temperature",
|
||||
"type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 10, "w": 16, "x": 0, "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth":
|
||||
2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull", "min", "max"]}, "tooltip": {"mode":
|
||||
"multi", "sort": "desc"}}, "targets": [{"refId": "Wo", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] ==
|
||||
\"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |>
|
||||
set(key: \"room\", value: \"Wohnzimmer\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Wo2", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop:
|
||||
v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wohnzimmer_2_thermostat_temperature\")\n |> aggregateWindow(every:
|
||||
v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Wohnzimmer #2\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Ar", "query": "from(bucket:
|
||||
\"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id ==
|
||||
\"home_arbeitszimmer_thermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Arbeitszimmer\")\n |> yield(name: \"mean\")",
|
||||
"resultFormat": "time_series"}, {"refId": "Kü", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\"
|
||||
and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_temperature\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Küche\")\n |> yield(name:
|
||||
\"mean\")", "resultFormat": "time_series"}, {"refId": "Ba", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_temperature\")\n |> aggregateWindow(every: v.windowPeriod,
|
||||
fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Bad\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Indoor vs Outdoor", "type": "timeseries", "datasource":
|
||||
{"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 10, "w": 8, "x": 16, "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls":
|
||||
true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Outdoor"}, "properties": [{"id": "color", "value": {"fixedColor": "light-blue", "mode": "fixed"}}, {"id": "custom.lineStyle",
|
||||
"value": {"fill": "dash", "dash": [10, 5]}}]}, {"matcher": {"id": "byName", "options": "Indoor Avg"}, "properties": [{"id": "color", "value": {"fixedColor": "orange", "mode": "fixed"}}]}]}, "options":
|
||||
{"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "OUT", "query": "from(bucket: \"default\")\n |>
|
||||
range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_temperatur\")\n |>
|
||||
aggregateWindow(every: 1h, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")\n |> set(key: \"location\", value: \"Outdoor\")", "resultFormat": "time_series"}, {"refId": "IN", "query": "from(bucket:
|
||||
\"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id =~
|
||||
/^home_/)\n |> aggregateWindow(every: 1h, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")\n |> group()\n |> mean()\n |> set(key: \"location\", value: \"Indoor Avg\")", "resultFormat":
|
||||
"time_series"}]}, {"title": "💧 Humidity", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 16}, "collapsed": false}, {"title": "Wohnzimmer", "type": "stat", "datasource": {"type": "influxdb",
|
||||
"uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red",
|
||||
"value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart,
|
||||
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_humidity\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Arbeitszimmer", "type": "stat", "datasource": {"type":
|
||||
"influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color":
|
||||
"red", "value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options":
|
||||
{"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start:
|
||||
v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_arbeitszimmer_thermostat_humidity\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Wohnzimmer #2", "type": "stat", "datasource": {"type":
|
||||
"influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 8, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color":
|
||||
"red", "value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options":
|
||||
{"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start:
|
||||
v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wohnzimmer_2_thermostat_humidity\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Bad", "type": "stat", "datasource": {"type": "influxdb",
|
||||
"uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 12, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red",
|
||||
"value": null}, {"color": "orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode":
|
||||
"area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart,
|
||||
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_humidity\")\n |> aggregateWindow(every:
|
||||
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Küche", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 16, "y": 17}, "fieldConfig": {"defaults": {"unit": "percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color":
|
||||
"orange", "value": 30}, {"color": "green", "value": 40}, {"color": "orange", "value": 60}, {"color": "red", "value": 70}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode":
|
||||
"background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_humidity\")\n |> aggregateWindow(every: v.windowPeriod,
|
||||
fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "Humidity Trends", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"},
|
||||
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 20}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}}, "options": {"legend":
|
||||
{"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "Wo", "query": "from(bucket: \"default\")\n |>
|
||||
range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wall_mounted_thermostat_pro_humidity\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Wohnzimmer\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Ar", "query":
|
||||
"from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id
|
||||
== \"home_arbeitszimmer_thermostat_humidity\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Arbeitszimmer\")\n |> yield(name: \"mean\")",
|
||||
"resultFormat": "time_series"}, {"refId": "Wo2", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and
|
||||
r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wohnzimmer_2_thermostat_humidity\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Wohnzimmer #2\")\n |> yield(name:
|
||||
\"mean\")", "resultFormat": "time_series"}, {"refId": "Ba", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |>
|
||||
filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_wandthermostat_bad_humidity\")\n |> aggregateWindow(every: v.windowPeriod,
|
||||
fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Bad\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}, {"refId": "Kü", "query": "from(bucket: \"default\")\n |> range(start:
|
||||
v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"home_kuche_wandthermostat_humidity\")\n |>
|
||||
aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"room\", value: \"Küche\")\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}]}'
|
||||
|
|
|
|||
|
|
@ -1,125 +1,75 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
outdoor-weather.json: '{"uid": "outdoor-weather", "title": "\ud83c\udf21\ufe0f Outdoor
|
||||
& Weather", "tags": ["home", "weather", "outdoor", "auto-generated"], "timezone":
|
||||
"browser", "schemaVersion": 39, "version": 1, "refresh": "5m", "editable": false,
|
||||
"graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title":
|
||||
"\ud83c\udf24\ufe0f Current Conditions", "type": "row", "gridPos": {"h": 1, "w":
|
||||
24, "x": 0, "y": 0}, "collapsed": false}, {"title": "\ud83c\udf21\ufe0f Temperature",
|
||||
"type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": {"unit": "celsius",
|
||||
"decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "#5794F2",
|
||||
"value": null}, {"color": "#73BF69", "value": 0}, {"color": "#FFD700", "value":
|
||||
15}, {"color": "#FF7383", "value": 25}, {"color": "#C4162A", "value": 30}]}, "color":
|
||||
{"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background",
|
||||
"textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}},
|
||||
"targets": [{"expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.regensburg_regensburg_temperatur\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udca7 Humidity", "type":
|
||||
"stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383",
|
||||
"value": null}, {"color": "#FFD700", "value": 30}, {"color": "#73BF69", "value":
|
||||
40}, {"color": "#FFD700", "value": 70}, {"color": "#5794F2", "value": 90}]}, "color":
|
||||
{"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background",
|
||||
"textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}},
|
||||
"targets": [{"expr": "homeassistant_sensor_humidity_percent{entity=\"sensor.regensburg_regensburg_luftfeuchtigkeit\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udd35 Pressure", "type":
|
||||
"stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig": {"defaults": {"unit": "pressurehpa",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383",
|
||||
"value": null}, {"color": "#FFD700", "value": 990}, {"color": "#73BF69", "value":
|
||||
1010}, {"color": "#FFD700", "value": 1030}, {"color": "#FF7383", "value": 1040}]},
|
||||
"color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode":
|
||||
"background", "textMode": "auto", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_pressure_hpa{entity=\"sensor.regensburg_regensburg_druck\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udca8 Wind", "type":
|
||||
"stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig": {"defaults": {"unit": "velocitykmh",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69",
|
||||
"value": null}, {"color": "#FFD700", "value": 20}, {"color": "#FF7383", "value":
|
||||
40}, {"color": "#C4162A", "value": 60}]}, "color": {"mode": "thresholds"}}}, "options":
|
||||
{"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_wind_speed_km_per_h{entity=\"sensor.regensburg_regensburg_windgeschwindigkeit\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83c\udf27\ufe0f Rain",
|
||||
"type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults": {"unit": "mm/h",
|
||||
"decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69",
|
||||
"value": null}, {"color": "#5794F2", "value": 0.1}, {"color": "#1F60C4", "value":
|
||||
1}, {"color": "#3274D9", "value": 5}]}, "color": {"mode": "thresholds"}}}, "options":
|
||||
{"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions":
|
||||
{"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"expr": "homeassistant_sensor_precipitation_intensity_mm_per_h{entity=\"sensor.regensburg_regensburg_niederschlag\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\u2601\ufe0f Cloud Cover",
|
||||
"type": "gauge", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos":
|
||||
{"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps":
|
||||
[{"color": "#5794F2", "value": null}, {"color": "#73BF69", "value": 20}, {"color":
|
||||
"#FFD700", "value": 50}, {"color": "#808080", "value": 80}]}, "color": {"mode":
|
||||
"thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
|
||||
"orientation": "auto", "showThresholdLabels": true, "showThresholdMarkers": true},
|
||||
"targets": [{"expr": "homeassistant_sensor_unit_percent{entity=\"sensor.regensburg_regensburg_bewolkungsgrad\"}",
|
||||
"format": "time_series", "refId": "A"}]}, {"title": "\ud83d\udcc8 Temperature
|
||||
& Humidity Trend", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 5},
|
||||
"collapsed": false}, {"title": "Temperature", "type": "timeseries", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x":
|
||||
0, "y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth":
|
||||
2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides":
|
||||
[{"matcher": {"id": "byName", "options": "Temperature"}, "properties": [{"id":
|
||||
"color", "value": {"fixedColor": "#FF7383", "mode": "fixed"}}]}]}, "options":
|
||||
{"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max",
|
||||
"mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId":
|
||||
"T", "expr": "homeassistant_sensor_temperature_celsius{entity=\"sensor.regensburg_regensburg_temperatur\"}",
|
||||
"format": "time_series"}]}, {"title": "Humidity", "type": "timeseries", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x":
|
||||
12, "y": 6}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth":
|
||||
2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides":
|
||||
[{"matcher": {"id": "byName", "options": "Humidity"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend":
|
||||
{"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean"]},
|
||||
"tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "H", "expr":
|
||||
"homeassistant_sensor_humidity_percent{entity=\"sensor.regensburg_regensburg_luftfeuchtigkeit\"}",
|
||||
"format": "time_series"}]}, {"title": "\ud83d\udcca Pressure & Wind", "type":
|
||||
"row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 14}, "collapsed": false}, {"title":
|
||||
"Pressure", "type": "timeseries", "datasource": {"type": "prometheus", "uid":
|
||||
"prometheus"}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 15}, "fieldConfig": {"defaults":
|
||||
{"unit": "pressurehpa", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls":
|
||||
true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options":
|
||||
"Pressure"}, "properties": [{"id": "color", "value": {"fixedColor": "#8F3BB8",
|
||||
"mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement":
|
||||
"bottom", "calcs": ["min", "max", "mean"]}, "tooltip": {"mode": "multi", "sort":
|
||||
"desc"}}, "targets": [{"refId": "P", "expr": "homeassistant_sensor_pressure_hpa{entity=\"sensor.regensburg_regensburg_druck\"}",
|
||||
"format": "time_series"}]}, {"title": "Wind Speed", "type": "timeseries", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x":
|
||||
12, "y": 15}, "fieldConfig": {"defaults": {"unit": "velocitykmh", "custom": {"lineWidth":
|
||||
2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides":
|
||||
[{"matcher": {"id": "byName", "options": "Wind"}, "properties": [{"id": "color",
|
||||
"value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend":
|
||||
{"displayMode": "table", "placement": "bottom", "calcs": ["max", "mean"]}, "tooltip":
|
||||
{"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "W", "expr": "homeassistant_sensor_wind_speed_km_per_h{entity=\"sensor.regensburg_regensburg_windgeschwindigkeit\"}",
|
||||
"format": "time_series"}]}, {"title": "\ud83c\udf27\ufe0f Precipitation & Cloud",
|
||||
"type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 23}, "collapsed": false},
|
||||
{"title": "Rain", "type": "timeseries", "datasource": {"type": "prometheus", "uid":
|
||||
"prometheus"}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24}, "fieldConfig": {"defaults":
|
||||
{"unit": "mm/h", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true,
|
||||
"showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options":
|
||||
"Rain"}, "properties": [{"id": "color", "value": {"fixedColor": "#3274D9", "mode":
|
||||
"fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom",
|
||||
"calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||||
"targets": [{"refId": "R", "expr": "homeassistant_sensor_precipitation_intensity_mm_per_h{entity=\"sensor.regensburg_regensburg_niederschlag\"}",
|
||||
"format": "time_series"}]}, {"title": "Cloud Cover", "type": "timeseries", "datasource":
|
||||
{"type": "prometheus", "uid": "prometheus"}, "gridPos": {"h": 8, "w": 12, "x":
|
||||
12, "y": 24}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth":
|
||||
2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides":
|
||||
[{"matcher": {"id": "byName", "options": "Cloud Cover"}, "properties": [{"id":
|
||||
"color", "value": {"fixedColor": "#808080", "mode": "fixed"}}]}]}, "options":
|
||||
{"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean"]},
|
||||
"tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "C", "expr":
|
||||
"homeassistant_sensor_unit_percent{entity=\"sensor.regensburg_regensburg_bewolkungsgrad\"}",
|
||||
"format": "time_series"}]}]}'
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
grafana_dashboard_folder: "\U0001F3E0 Home"
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
name: grafana-dashboard-outdoor-weather
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: '1'
|
||||
annotations:
|
||||
grafana_dashboard_folder: 🏠 Home
|
||||
data:
|
||||
outdoor-weather.json: '{"uid": "outdoor-weather", "title": "🌡️ Outdoor & Weather", "tags": ["home", "weather", "outdoor", "auto-generated"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh":
|
||||
"5m", "editable": false, "graphTooltip": 1, "time": {"from": "now-24h", "to": "now"}, "panels": [{"title": "🌤️ Current Conditions", "type": "row", "gridPos": {"h": 1, "w": 24, "x": 0, "y": 0}, "collapsed":
|
||||
false}, {"title": "🌡️ Temperature", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 0, "y": 1}, "fieldConfig": {"defaults": {"unit":
|
||||
"celsius", "decimals": 1, "thresholds": {"mode": "absolute", "steps": [{"color": "#5794F2", "value": null}, {"color": "#73BF69", "value": 0}, {"color": "#FFD700", "value": 15}, {"color": "#FF7383",
|
||||
"value": 25}, {"color": "#C4162A", "value": 30}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false,
|
||||
"calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"°C\" and r[\"_field\"]
|
||||
== \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_temperatur\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat":
|
||||
"time_series"}]}, {"title": "💧 Humidity", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 4, "y": 1}, "fieldConfig": {"defaults": {"unit":
|
||||
"percent", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383", "value": null}, {"color": "#FFD700", "value": 30}, {"color": "#73BF69", "value": 40}, {"color": "#FFD700",
|
||||
"value": 70}, {"color": "#5794F2", "value": 90}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false,
|
||||
"calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"]
|
||||
== \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_luftfeuchtigkeit\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
|
||||
"resultFormat": "time_series"}]}, {"title": "🔵 Pressure", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 8, "y": 1}, "fieldConfig":
|
||||
{"defaults": {"unit": "pressurehpa", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#FF7383", "value": null}, {"color": "#FFD700", "value": 990}, {"color": "#73BF69", "value":
|
||||
1010}, {"color": "#FFD700", "value": 1030}, {"color": "#FF7383", "value": 1040}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto",
|
||||
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
|
||||
== \"hPa\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_druck\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name:
|
||||
\"mean\")", "resultFormat": "time_series"}]}, {"title": "💨 Wind", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 12, "y": 1}, "fieldConfig":
|
||||
{"defaults": {"unit": "velocitykmh", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#FFD700", "value": 20}, {"color": "#FF7383", "value":
|
||||
40}, {"color": "#C4162A", "value": 60}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs":
|
||||
["lastNotNull"]}}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"km/h\" and r[\"_field\"]
|
||||
== \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_windgeschwindigkeit\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")",
|
||||
"resultFormat": "time_series"}]}, {"title": "🌧️ Rain", "type": "stat", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 16, "y": 1}, "fieldConfig": {"defaults":
|
||||
{"unit": "mm/h", "decimals": 0, "thresholds": {"mode": "absolute", "steps": [{"color": "#73BF69", "value": null}, {"color": "#5794F2", "value": 0.1}, {"color": "#1F60C4", "value": 1}, {"color": "#3274D9",
|
||||
"value": 5}]}, "color": {"mode": "thresholds"}}}, "options": {"graphMode": "area", "colorMode": "background", "textMode": "auto", "reduceOptions": {"values": false, "calcs": ["lastNotNull"]}}, "targets":
|
||||
[{"query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"mm/h\" and r[\"_field\"] == \"value\")\n |> filter(fn:
|
||||
(r) => r.entity_id == \"regensburg_regensburg_niederschlag\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]},
|
||||
{"title": "☁️ Cloud Cover", "type": "gauge", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 4, "w": 4, "x": 20, "y": 1}, "fieldConfig": {"defaults": {"unit": "percent",
|
||||
"decimals": 0, "min": 0, "max": 100, "thresholds": {"mode": "absolute", "steps": [{"color": "#5794F2", "value": null}, {"color": "#73BF69", "value": 20}, {"color": "#FFD700", "value": 50}, {"color":
|
||||
"#808080", "value": 80}]}, "color": {"mode": "thresholds"}}}, "options": {"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}, "orientation": "auto", "showThresholdLabels": true, "showThresholdMarkers":
|
||||
true}, "targets": [{"query": "from(bucket: \"default\")\n |> range(start: -15m)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id
|
||||
== \"regensburg_regensburg_bewolkungsgrad\")\n |> last()\n |> yield(name: \"mean\")", "resultFormat": "time_series"}]}, {"title": "📈 Temperature & Humidity Trend", "type": "row", "gridPos": {"h":
|
||||
1, "w": 24, "x": 0, "y": 5}, "collapsed": false}, {"title": "Temperature", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": 0,
|
||||
"y": 6}, "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options":
|
||||
"Temperature"}, "properties": [{"id": "color", "value": {"fixedColor": "#FF7383", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max",
|
||||
"mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "T", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r)
|
||||
=> r[\"_measurement\"] == \"°C\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_temperatur\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty:
|
||||
false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Temperature\")", "resultFormat": "time_series"}]}, {"title": "Humidity", "type": "timeseries", "datasource": {"type": "influxdb",
|
||||
"uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": 12, "y": 6}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints":
|
||||
"never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Humidity"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode":
|
||||
"table", "placement": "bottom", "calcs": ["min", "max", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "H", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart,
|
||||
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_luftfeuchtigkeit\")\n |> aggregateWindow(every:
|
||||
30m, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Humidity\")", "resultFormat": "time_series"}]}, {"title": "📊 Pressure & Wind", "type": "row", "gridPos":
|
||||
{"h": 1, "w": 24, "x": 0, "y": 14}, "collapsed": false}, {"title": "Pressure", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x":
|
||||
0, "y": 15}, "fieldConfig": {"defaults": {"unit": "pressurehpa", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options":
|
||||
"Pressure"}, "properties": [{"id": "color", "value": {"fixedColor": "#8F3BB8", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean"]},
|
||||
"tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "P", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
|
||||
== \"hPa\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_druck\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |>
|
||||
set(key: \"metric\", value: \"Pressure\")", "resultFormat": "time_series"}]}, {"title": "Wind Speed", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos":
|
||||
{"h": 8, "w": 12, "x": 12, "y": 15}, "fieldConfig": {"defaults": {"unit": "velocitykmh", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher":
|
||||
{"id": "byName", "options": "Wind"}, "properties": [{"id": "color", "value": {"fixedColor": "#5794F2", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs":
|
||||
["max", "mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "W", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:
|
||||
(r) => r[\"_measurement\"] == \"km/h\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_windgeschwindigkeit\")\n |> aggregateWindow(every: 30m, fn: mean,
|
||||
createEmpty: false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Wind\")", "resultFormat": "time_series"}]}, {"title": "🌧️ Precipitation & Cloud", "type": "row", "gridPos": {"h": 1,
|
||||
"w": 24, "x": 0, "y": 23}, "collapsed": false}, {"title": "Rain", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24},
|
||||
"fieldConfig": {"defaults": {"unit": "mm/h", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id": "byName", "options": "Rain"}, "properties":
|
||||
[{"id": "color", "value": {"fixedColor": "#3274D9", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["mean", "lastNotNull"]}, "tooltip": {"mode":
|
||||
"multi", "sort": "desc"}}, "targets": [{"refId": "R", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"mm/h\"
|
||||
and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_niederschlag\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty: false)\n |> yield(name: \"mean\") |>
|
||||
set(key: \"metric\", value: \"Rain\")", "resultFormat": "time_series"}]}, {"title": "Cloud Cover", "type": "timeseries", "datasource": {"type": "influxdb", "uid": "P2AB959DC95E5519F"}, "gridPos": {"h":
|
||||
8, "w": 12, "x": 12, "y": 24}, "fieldConfig": {"defaults": {"unit": "percent", "custom": {"lineWidth": 2, "fillOpacity": 5, "spanNulls": true, "showPoints": "never"}}, "overrides": [{"matcher": {"id":
|
||||
"byName", "options": "Cloud Cover"}, "properties": [{"id": "color", "value": {"fixedColor": "#808080", "mode": "fixed"}}]}]}, "options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs":
|
||||
["mean"]}, "tooltip": {"mode": "multi", "sort": "desc"}}, "targets": [{"refId": "C", "query": "from(bucket: \"default\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:
|
||||
(r) => r[\"_measurement\"] == \"%\" and r[\"_field\"] == \"value\")\n |> filter(fn: (r) => r.entity_id == \"regensburg_regensburg_bewolkungsgrad\")\n |> aggregateWindow(every: 30m, fn: mean, createEmpty:
|
||||
false)\n |> yield(name: \"mean\") |> set(key: \"metric\", value: \"Cloud Cover\")", "resultFormat": "time_series"}]}]}'
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,103 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: fritzbox-exporter
|
||||
namespace: monitoring
|
||||
labels:
|
||||
app: fritzbox-exporter
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fritzbox-exporter
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: fritzbox-exporter
|
||||
spec:
|
||||
containers:
|
||||
- name: fritzbox-exporter
|
||||
image: ghcr.io/sberk42/fritzbox_exporter/fritzbox_exporter:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: fritzbox-exporter-secret
|
||||
key: username
|
||||
- name: PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: fritzbox-exporter-secret
|
||||
key: password
|
||||
- name: GATEWAY_URL
|
||||
value: "http://192.168.10.1:49000"
|
||||
- name: LISTEN_ADDRESS
|
||||
value: "0.0.0.0:9042"
|
||||
ports:
|
||||
- name: http-metrics
|
||||
containerPort: 9042
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: fritzbox-exporter
|
||||
namespace: monitoring
|
||||
labels:
|
||||
app: fritzbox-exporter
|
||||
spec:
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 9042
|
||||
targetPort: 9042
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: fritzbox-exporter
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: fritzbox-exporter
|
||||
namespace: monitoring
|
||||
labels:
|
||||
app: fritzbox-exporter
|
||||
release: prometheus-operator
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fritzbox-exporter
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- monitoring
|
||||
endpoints:
|
||||
- port: http-metrics
|
||||
path: /metrics
|
||||
interval: 60s
|
||||
scrapeTimeout: 15s
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: fritzbox-exporter-alerts
|
||||
namespace: monitoring
|
||||
labels:
|
||||
release: prometheus-operator
|
||||
spec:
|
||||
groups:
|
||||
- name: fritzbox-exporter.rules
|
||||
rules:
|
||||
- alert: FritzBoxExporterOffline
|
||||
expr: up{job="fritzbox-exporter"} == 0
|
||||
for: 5m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "FritzBox exporter is offline"
|
||||
description: "The FritzBox exporter pod in the cluster cannot reach the router at 192.168.10.1 or the exporter itself is down."
|
||||
Loading…
Reference in New Issue