Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Heizungsmonitor ====== ===== Links ===== * https://randomnerdtutorials.com/esp8266-ds18b20-temperature-sensor-web-server-with-arduino-ide/ * https://randomnerdtutorials.com/esp8266-ota-updates-with-arduino-ide-over-the-air/ ===== Ideensammlung ===== * nutzt [[computer:docker:tig-stack|Telegraf-Influx-Grafana Stack]] Q: grafana: i get 1min binary values in influx and want to have summary minutes per day With Flux (sum of 1‑minute boolean samples per day), use a daily aggregate window and (optionally) convert minutes to hours. Flux query: minutes per day from(bucket: "your_bucket") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "sensor" and r._field == "value" // 0/1 samples each minute ) |> aggregateWindow( every: 1d, fn: sum, createEmpty: true ) |> yield(name: "minutes_on") Each output point is the total minutes the signal was ON that day, assuming one sample per minute with values 0 or 1. In Grafana, select Flux as the query language, paste this query, and use a time range aligned to days (now()-30d/d to now()/d) so each bar shows one day. Flux query: hours per day from(bucket: "your_bucket") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "sensor" and r._field == "value" ) |> aggregateWindow( every: 1d, fn: sum, createEmpty: true ) |> map(fn: (r) => ({ r with _value: float(v: r._value) / 60.0 })) |> yield(name: "hours_on") The map step converts summed minutes to hours by dividing by 60. You can rename _value to a friendlier field (for example daily_hours) with another map or rename step if desired. If your 1‑minute values are not exactly 0/1 but represent a duty (for example 0 or 60), adjust the division factor in the map accordingly. haus/pfleger/heizung/heizungsmonitor.txt Last modified: 2026/01/06 10:27by spring