Skip to content

Weekly or monthly PDF moisture report - #48

Merged
CervezaStallone merged 4 commits into
mainfrom
feat/reports
Nov 3, 2026
Merged

CervezaStallone merged 4 commits into
mainfrom
feat/reports

Conversation

@CervezaStallone

Copy link
Copy Markdown
Owner

Summary

PDF report as requested, following the mockup Informe automatizado estado de humedad. All sensors in one report.

  • Chart: wood moisture per sensor per day (daily average), with the 16/18/20 % lines.
  • Table per sensor: min/max temperature, humidity and wood moisture. Wood moisture above 16 % is yellow, above 18 % orange, above 20 % red; legend with the thresholds below the table.
  • Wood moisture uses the same correction and response time as the board and the alarms, from hourly averages (the response time before the period is included).
  • Settings → Reports: Report by e-mail off / weekly (Monday from 07:00, previous week) / monthly (the 1st from 07:00, previous month); Report language (NL, EN, DE, FR, ES); Download report for this or last week or month.
  • Sent as a PDF attachment to the notification e-mail recipients (e-mail must be on). Once per period; sent late if the app was off; a failed send is retried every hour and shows up in the notification log.
  • New dependency matplotlib (pinned per Python version, like numpy). Renders without a GUI backend.

Stacked on #47 (Home Assistant discovery): merge that first, then this diff only shows the report.

Report

Test plan

  • python test_app.py: 100/100 (periods, min/max, daily wood moisture, response time, PDF, mail once per period, retry, attachment, download needs login, thread survives errors)
  • Browser: Settings → Reports renders, Download PDF downloads report-2026-10-01.pdf
  • PDF checked visually with 6 sensors (Spanish)

Optional in Settings → MQTT. Every sensor becomes a Home Assistant device
with the sensor's name and manufacturer BRDC, with one entity per quantity.
Configs are retained and only resent when they change; removed sensors,
quantities and disabling discovery clear them.
Settings → Reports: daily wood moisture per sensor in a chart and a table
with min/max temperature, humidity and wood moisture (yellow above 16 %,
orange above 18 %, red above 20 %). E-mailed as a PDF attachment to the
notification recipients on Monday or the 1st from 07:00, retried hourly
on failure and logged; downloadable for this or last week or month.
Report language is selectable. Adds matplotlib.
# Conflicts:
#	CHANGELOG.md
#	README.md
#	settings.py
@CervezaStallone
CervezaStallone merged commit da113a2 into main Nov 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant