1. Run python3 hook_receiver.py (put a sleep.bmp next to it).
2. Upload the plugin and save server + secret (change-me) on /plugins.
3. Leave File Transfer mode. The event subscriptions are refreshed then.
4. Home -> Plugins: the row now says "Receives: Book opened, Book closed, Reading session, Sleep" (wording may vary by language).
5. Open a book, read a few pages slowly (>= 2 s each, >= 10 s in total), press the power button to sleep.
6. The reader shows a Wi-Fi popup, joins, delivers, then sleeps with your image. The receiver prints:
/hook/open {"id": "a1b2c3d4-1", "ts": 1763913600, "book": "/Books/Dune.epub"}
/hook/session {"id": "a1b2c3d4-2", "book": "/Books/Dune.epub", "doc": "5f2c...", "start": 1763913610, "end": 1763913671, "seconds": 61, "from_bp": 1200, "to_bp": 1350}
reader.exit fires after the sleep drain, so it arrives with the next connection (or right away if you leave the book with Wi-Fi on). Want progress on the sleep connection itself? Add a sleep.enter request handler instead of the download. Remember: one handler per event.