display: refresh EPD on WAN interface change and improve WAN detection #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR: display: refresh EPD on WAN interface change and improve WAN detection
Summary
This PR improves runtime WAN detection and E-Paper (EPD) rendering behavior. The primary goals are:
wan_state_pathfor testing and overrides.EPaperDaemoninitialization tolerant of olderStatusCollectorsignatures (backwards-compatible fallback).Version was bumped to
3.1.0andCHANGELOG.mdwas updated. See commits478b8eeandeee6e81for the implementation and release bump.Changes (high-level)
azazel_pi/core/display/status_collector.pywan_state_pathargument for injection/testing.ip route get) to determine the active interface.azazel_pi/core/display/epd_daemon.pyStatusCollectorsignatures (catchesTypeErrorand retries without the extra param).azazel_pi/core/display/renderer.pyFiles changed
azazel_pi/core/display/status_collector.pyazazel_pi/core/display/epd_daemon.pyazazel_pi/core/display/renderer.pyCHANGELOG.md(added 3.1.0 entry)pyproject.toml(version bump to 3.1.0)Why this is a minor bump (3.0.0 -> 3.1.0)
All changes are backward-compatible runtime improvements and feature additions (no breaking API changes). They primarily improve behavior (EPD UX and detection heuristics), so a minor version increment is appropriate.
How to test (developer / CI)
python3 -m venv .venv source .venv/bin/activate pip install -U pip pip install pytest pytest-cov pytest -vsudo python3 /opt/azazel/azazel_pi/core/display/epd_daemon.py --debug # or, if testing the workspace copy directly (less privileged): python3 ./azazel_pi/core/display/epd_daemon.py --debugExample log excerpts (observed during development)
These excerpts are representative of the output produced during development and debugging.
TypeError observed before the runtime was updated (illustrates compat fix):
Daemon startup and update loop messages (normal debug output):
Interface detection/log example (route-based fallback):
When a WAN change is detected the daemon logs a message and forces a clear + full refresh; look for a message similar to:
Deployment notes (on-device)
/opt/azazel/azazel_pi. If you deploy the workspace copy over the installed copy, back up the existing/opt/azazel/azazel_pifirst.azazel-epd.servicesystemd unit. Rotation and daemon options can be controlled via the systemd drop-in at/etc/systemd/system/azazel-epd.service.d/override.confusingEnvironment=entries, e.g.:Environment=EPD_ROTATION=180./opt, run:Checklist for reviewers
Commits of interest
478b8ee— display: refresh EPD on WAN interface change and improve WAN detection (feature implementation)eee6e81— chore(release): bump version to 3.1.0 (changelog + pyproject)