Version 0.20.0 focuses on security hardening, resource bounds, and container isolation, alongside behavior changes that may require configuration updates on existing deployments. Check the published advisories for full details.
Security
- Private data folder & signed state: EMHASS now stores all generated state, results, logs, and models in its private
DATA_PATHfolder (/data/in Docker and the Home Assistant add-on) and treatsdata_pathas read-only input when the two differ.params.pklandinjection_dict.pklare replaced byparams.jsonandinjection_dict.json(mode0600), and ML/PV/weather.pklfiles are authenticated with HMAC-SHA256 (data_signing.key). (@LesIT1) - Browser
Host,Origin, framing, and CSP guards: AddedContent-Security-Policy,X-Frame-Options: SAMEORIGIN/frame-ancestors 'self',Originchecks on state-changing requests, andHostallowlisting (EMHASS_ALLOWED_HOSTS,EMHASS_FRAME_ANCESTORS). Plotly charts now render as SVG instead ofeval-based WebGL traces. (@LesIT1) - Bounded runtime and saved parameters: Added
PARAM_BOUNDSand per-solve memory/step budgets across/set-config,/action/*,/get-json(YAML anchors/aliases disabled), PV-bias, and thermal calibration payloads. (@LesIT1) - Database credential binding & read timeouts:
/set-confignow refuses changing InfluxDB/VictoriaMetrics host/port or downgrading SSL while credentials are stored, and enforces strict connect/read timeouts off the event loop. (@LesIT1) - Bounded Home Assistant & Supervisor replies: Enforced decompressed response size caps, connection/read timeouts,
no_attributeshistory queries (withaiohttp>=3.14.5), and prioritized control-entity publishing within a 300 s budget. (@LesIT1) - Malformed-request guard & log rotation: Malformed HTTP/WebSocket targets and
Hostheaders now return400before reaching Quart, default Gunicorn worker restarts by request count are disabled (MAX_REQUESTSremains opt-in), andaction_logs.txtis automatically trimmed above 4 MiB. (@LesIT1)
Migration (action needed)
- Shared
data_pathlayouts (/share/emhassin the HA add-on, or--dataoutsideDATA_PATH):data_pathis now input-only (for CSV inputs). Generated files (opt_res_latest.csv,plan_latest.json,last_run.json,action_logs.txt,entities, and.pklmodels) are written only toDATA_PATH(/data/). Latest results are imported once on first start; re-fit ML forecaster/regressor models once after upgrading, and ensure/datais persisted in Docker sodata_signing.keyis kept across restarts. - Home Assistant Webpage / iframe cards: Framing from another origin or port (e.g.,
:8123framing:5000) is now blocked by default. SetEMHASS_FRAME_ANCESTORS(or theemhass_frame_ancestorsadd-on option) to allow your framing origin; Home Assistant Ingress continues to work without changes. - Reverse proxies, Tailscale (
*.ts.net), and custom domains: When behind a proxy that rewritesHost/Origin, or when accessing EMHASS via non-local hostnames with API auth disabled, add the public hostname/origin toEMHASS_ALLOWED_HOSTS(oremhass_allowed_hostsin the add-on). continual_publish: The background publish loop now starts only whencontinual_publish: trueis enabled in the saved configuration; passing"continual_publish": trueonly in runtime parameters no longer starts it.- Database settings & parameter limits: Moving an InfluxDB/VictoriaMetrics host or disabling SSL while credentials are stored must be done in
config.json(or by a Home Assistant admin via Ingress). Requests or saved configs exceedingPARAM_BOUNDSnow return400.
Improvement
- test: migrate Solcast and Forecast.Solar response mocks to HttpTestServer (@MMicieli)
- test: migrate Solcast rooftop validation and weather cache tests off aioresponses (@MMicieli)
- build(deps): bump actions/checkout from 4.4.0 to 7.0.1 (@dependabot[bot])
- build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.2 (@dependabot[bot])
- build(deps): bump astral-sh/setup-uv from 5.4.2 to 10.4.0 (@dependabot[bot])
- build(deps): bump actions/setup-python from 5.6.0 to 7.1.0 (@dependabot[bot])
- build(deps): bump peter-evans/repository-dispatch from 3.0.0 to 4.0.1 (@dependabot[bot])
- build(deps): bump github/codeql-action/analyze from 3.39.5 to 4.39.5 (@dependabot[bot])
- build(deps): bump actions/download-artifact from 6.0.0 to 8.0.2 (@dependabot[bot])
- build(deps): bump conda-incubator/setup-miniconda from 3.3.0 to 4.1.0 (@dependabot[bot])
- build(deps): bump codecov/codecov-action from 5.5.5 to 7.1.1 (@dependabot[bot])
- build(deps): bump SonarSource/sonarqube-scan-action from 7.2.1 to 8.5.1 (@dependabot[bot])
- build(deps): bump google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml from 2.0.1 to 2.7.1 in the github-actions group (@dependabot[bot])
- feat(docker): let the image run as a non-root user (@LesIT1)
- ci: check the bundled CEC databases against a rebuild from their sources (@LesIT1)
- chore: Pin CI actions to commit SHAs, trim workflow permissions, drop unused dependencies (@LesIT1)
Documentation
- docs: clarify battery SOC defaults and target semantics (#1421) (@MMicieli)
- docs: send battery SOC with an explicit unit and correct recovery guidance (@MMicieli)
Fix
- fix: restore CI test matrix after state_files and signed model changes (@davidusb-geek)
- fix: check the SoC sensor and rooftop ids, start continual_publish from the saved config (@LesIT1)
- fix: private data folder, signed state, data_path as input only (@LesIT1)
- fix: bound Home Assistant replies by size, time and shape (@LesIT1)
- fix: check server names and origins, send framing and content policies (@LesIT1)
- fix: bound the runtime and saved settings that size one run (@LesIT1)
- fix: keep a stored database login with its server, and bound database reads (@LesIT1)
- fix: return 400 for malformed requests that made Quart raise, and stop restarting the worker by request count by default (@LesIT1)
- fix: keep lock and counter files in a temp folder of EMHASS's own account (@LesIT1)
- fix(ci): enforce Sonar quality gates and document fork PR verification (#1401) (@MMicieli)
What's Changed
- fix: keep lock and counter files in a temp folder of EMHASS's own account by @LesIT1 in #1418
- chore: Pin CI actions to commit SHAs, trim workflow permissions, drop unused dependencies by @LesIT1 in #1419
- ci: check the bundled CEC databases against a rebuild from their sources by @LesIT1 in #1420
- feat(docker): let the image run as a non-root user by @LesIT1 in #1424
- build(deps): bump google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml from 2.0.1 to 2.7.1 in the github-actions group by @dependabot[bot] in #1426
- docs: send battery SOC with an explicit unit and correct recovery guidance by @MMicieli in #1423
- fix(ci): enforce Sonar quality gates and document fork PR verification (#1401) by @MMicieli in #1413
- docs: clarify battery SOC defaults and target semantics (#1421) by @MMicieli in #1431
- build(deps): bump SonarSource/sonarqube-scan-action from 7.2.1 to 8.5.1 by @dependabot[bot] in #1427
- build(deps): bump codecov/codecov-action from 5.5.5 to 7.1.1 by @dependabot[bot] in #1428
- build(deps): bump conda-incubator/setup-miniconda from 3.3.0 to 4.1.0 by @dependabot[bot] in #1430
- build(deps): bump actions/download-artifact from 6.0.0 to 8.0.2 by @dependabot[bot] in #1432
- build(deps): bump github/codeql-action/analyze from 3.39.5 to 4.39.5 by @dependabot[bot] in #1433
- build(deps): bump peter-evans/repository-dispatch from 3.0.0 to 4.0.1 by @dependabot[bot] in #1435
- build(deps): bump actions/setup-python from 5.6.0 to 7.1.0 by @dependabot[bot] in #1436
- build(deps): bump actions/checkout from 4.4.0 to 7.0.1 by @dependabot[bot] in #1439
- build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.2 by @dependabot[bot] in #1438
- build(deps): bump astral-sh/setup-uv from 5.4.2 to 10.4.0 by @dependabot[bot] in #1437
- test: migrate Solcast rooftop validation and weather cache tests off aioresponses by @MMicieli in #1440
- fix: restore CI test matrix after state_files and signed model changes by @davidusb-geek in #1450
- fix: check the SoC sensor and rooftop ids, start continual_publish from the saved config by @LesIT1 in #1442
- test: migrate Solcast and Forecast.Solar response mocks to HttpTestServer by @MMicieli in #1444
- build(deps): bump astral-sh/setup-uv from 10.4.0 to 10.4.2 in the github-actions group by @dependabot[bot] in #1452
Full Changelog: v0.19.0...v0.20.0