Document Paper Pro sidecar UDP logger

This commit is contained in:
aeroreyna
2026-07-16 19:37:07 -04:00
parent b573223577
commit e9276d641f
@@ -44,6 +44,8 @@ Initial SSH-based proof of concept works.
- Remaining work: create the automatic bridge loop that watches/pulls `latest.txt`, sends the image to Hermes/OCR, and writes `/home/root/hermes-chat/inbox/response.txt`; current test response was written manually.
- Pi-side sidecar logger installed on `aeropi5` under `~/remarkable-logger/` with user systemd timer `remarkable-logger.timer` every 30s. It SSH-polls Paper Pro `192.168.68.128`, logs JSONL to `~/remarkable-logger/events.jsonl`, writes `latest.json`/`state.json`, tracks online/offline, `xochitl` active state, most-recent modified document as current-document guess, and watched terms `diary,dairy,journal` for quasi-live document updates. First run found 364 docs and watched docs including `Journal2026`, `Journal`, `Daily Journaling`, `Daily Journal`, and `DairyGpt`.
- xochitl event-source probe: `journalctl -u xochitl` did not emit document-open/page-open entries at normal verbosity during a live monitor; only battery wake lines appeared. DBus introspection on xochitl unique names was access denied. `busctl --system monitor` works for system signals but no xochitl document signal was confirmed. xochitl keeps `.eventcache.db`/WAL with telemetry JSON fragments (`domain: document`, tool/template/actions), but committed DB had only generic telemetry and no document UUID/name/open event from the test. `.config/remarkable/xochitl.conf` had `LastOpen=` blank. Conclusion: rely on xochitl file mtimes/content/page `.rm` changes for current-document/quasi-live tracking rather than a documented/open xochitl event feed.
- Device-side sidecar installed on Paper Pro: `/etc/systemd/system/remarkable-sidecar.service` enabled/running; script `/home/root/remarkable-sidecar/remarkable_sidecar.sh`; daily text logs `/home/root/remarkable-sidecar/logs/YYYY-MM-DD.txt`; state snapshots `/home/root/remarkable-sidecar/state/`. It logs `online`, 60s `heartbeat`, best-effort `offline`, and `document_change` by comparing xochitl file mtimes every 20s. BusyBox `nc` lacks UDP, so ARM64 helper `/home/root/remarkable-sidecar/bin/udp_broadcast` was built with the reMarkable SDK on iMac and broadcasts to `192.168.68.255:49321`.
- Pi UDP listener installed on `aeropi5`: `~/remarkable-logger/remarkable_udp_listener.py` as user service `remarkable-udp-listener.service`, logging UDP JSONL to `~/remarkable-logger/udp/YYYY-MM-DD.jsonl` and latest IP to `~/remarkable-logger/latest_device.json`. Pi poller `remarkable_logger.py` was patched to use `latest_device.json` when `REMARKABLE_HOST` is not set, so DHCP/IP changes are caught by tablet broadcast. Duplicate UDP packets from Pi eth0+wlan0 are deduped within 2s.
Hermes can:
- Connect to the reMarkable via SSH alias `remarkable`.