homeautomatisation:influxdb:examples_influxdb
                Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| homeautomatisation:influxdb:examples_influxdb [2022/03/10 22:04] – created illu | homeautomatisation:influxdb:examples_influxdb [2022/03/11 22:24] (current) – illu | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | ====== Last value for snapshot ====== | ||
| + | |||
| get only the last value from iobroker shelly power, if its none in range, fill with previous value. | get only the last value from iobroker shelly power, if its none in range, fill with previous value. | ||
| - | < | + | < | 
| from(bucket: | from(bucket: | ||
|   |> range(start: |   |> range(start: | ||
| Line 7: | Line 10: | ||
|   |> fill(usePrevious: |   |> fill(usePrevious: | ||
| |> last() | |> last() | ||
| + | </ | ||
| + | integration in grafana | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | ====== Integral for Watt hours / from W to Wh ====== | ||
| + | |||
| + | < | ||
| + | from(bucket: | ||
| + |   |> range(start: | ||
| + |   |> filter(fn: (r) => r[" | ||
| + |   |> filter(fn: (r) => r[" | ||
| + |   |> integral(unit: | ||
| </ | </ | ||
| + | |||
| + | {{: | ||
| + |    | ||
homeautomatisation/influxdb/examples_influxdb.1646946249.txt.gz · Last modified: 2022/03/10 22:04 by illu