A setup like this is never finished. Since the first posts went online, a few things changed that do not need a post of their own, but would make the old ones wrong if I kept quiet about them.
More data from the inverters
In the post about the balcony PV the DTU thing only had the values I used at first. The DTU sends a lot more. Four more values per inverter are in the thing now: the AC voltage and the efficiency on ch0, and the DC power and the irradiation of the panel on ch1, the module input:
Type number : balkon_so_U_AC "SO AC voltage" [ stateTopic="inverter/Balkon_SO/ch0/U_AC", unit="V" ] Type number : balkon_so_Efficiency "SO efficiency" [ stateTopic="inverter/Balkon_SO/ch0/Efficiency", unit="%" ] Type number : balkon_so_P_DC "SO DC power" [ stateTopic="inverter/Balkon_SO/ch1/P_DC", unit="W" ] Type number : balkon_so_Irradiation "SO irradiation" [ stateTopic="inverter/Balkon_SO/ch1/Irradiation", unit="%" ]
Irradiation is the DC power as a share of the peak power of the module. The items get unit="%", otherwise openHAB shows efficiency and irradiation as a plain number, and the same expire as the power.
Both inverters run at about 95 % efficiency. In the morning and the evening, at a few watts, the value jumps to 100 %, because the DTU rounds AC and DC power. In Grafana I only show the efficiency while the DC side delivers at least 20 W.
Dashboards in git
In the post about openHAB, InfluxDB and Grafana I wrote that I build the dashboards in the UI. Not any more. They are JSON files in the Compose repository now, and the Ansible deployment copies them into Grafana’s provisioning folder:
providers:
- name: own
type: file
allowUiUpdates: true
disableDeletion: false
updateIntervalSeconds: 30
options:
path: /etc/grafana/provisioning/dashboards/own
Saving in the UI still works, but the next deployment of a changed file overwrites it, so I export a change back into git first. A dashboard file I delete in git disappears from Grafana with the next deployment.
Two more Flux tasks, and a fix
There are two more tasks, both for the history panels, which got slow when they calculated everything from the raw data:
| Task | Writes | Runs |
|---|---|---|
| Boiler hourly | boiler energy per hour, from the counter of its relay | every 15 min |
| Base load daily | lowest quarter hour between 00:00 and 05:00, per day | every hour |
And a fix in “Energy 15m”. The linear interpolation draws a line to the end of the quarter hour. In the running quarter, and at a gap in the data, there is no later point yet, so the line is extrapolated and can go below zero. One quarter hour showed -0.09 kWh of grid import. Now the task clamps the energy at zero:
|> map(fn: (r) => ({r with _value: if r._value > 0.0 then r._value / 1000.0 else 0.0}))
Read-only backups
In the post about Docker Compose the price scraper got a read-only file system. The backup container now gets the same idea. It only reads what it backs up, so those mounts are read-only. Only its own database and the backup target stay writable:
volumes:
- /srv/duplicati:/config
- /media:/media:ro
- /media/.../BackUp:/backups
- /srv:/srv:ro
The price: Duplicati can no longer restore “to the original location”. I restore into /backups and copy from there.
