{
"title": "Reading Webhook",
"config": { "file": "config.json" }, // {cfg.*} for URLs/secrets
"token": { "file": "token.json" }, // {token}, optional
"events": {
"reader.exit": {
"request": {
"method": "POST", // default POST
"url": "{cfg.server}/hooks/progress",
"headers": { "Content-Type": "application/json", "X-Secret": "{cfg.secret}" },
"body": "{\"id\":\"{event.id}\",\"book\":\"{event.book}\",\"pct\":{event.percent},\"ts\":{event.ts}}"
},
"toast": "Progress sent", // popup after success, if a screen is available
"connect": true // also deliver at sleep entry (turns on Wi-Fi)
},
"sleep.enter": {
"download": { "url": "{cfg.server}/sleep.bmp", "dest": "/sleep.bmp" }
}
}
}
One handler per event per plugin. A handler is either:
- request: url, method (POST), headers, body. Any 2xx counts as delivered. The response is read (max 8 KB) and ignored.
- download: url, method (GET), headers, dest. The response streams to dest (absolute path, no .., <= 1 MB). It goes to dest.part first and replaces dest only on a 2xx, so an error page never overwrites your file.
Optional per handler: