What's new
- Developer documentation: new ARCHITECTURE.md explaining how all the pieces fit together — component overview, the wake loop's state machine, the suspend/resume design, flag files, and a troubleshooting guide.
- Clearer log source prefixes:
monitor→dpms-monitor,dispatcher→nm-dispatcher,dim-watch→notify-service.
Fixes
- Stale sleep flag self-heals: if the resume event never fired (e.g. the network never came back after resume), a leftover sleep flag suppressed every future screen-off — leaving the TV on indefinitely — and misrouted the next network-up event as a resume. The monitor now verifies the flag against logind on screen-off and removes it when no suspend is in progress.
Updating
sudo /opt/lgpowercontrol/update.shSettings and TV pairing survive the update.