Skip to content

package: add Pushover to the send2 toolkit - #1529

Open
WLTB-Gino wants to merge 2 commits into
themactep:masterfrom
WLTB-Gino:send2-pushover
Open

package: add Pushover to the send2 toolkit#1529
WLTB-Gino wants to merge 2 commits into
themactep:masterfrom
WLTB-Gino:send2-pushover

Conversation

@WLTB-Gino

Copy link
Copy Markdown
Contributor

Adds send2pushover, a Pushover (pushover.net) notifier following the send2ntfy/send2gotify pattern.

@themactep

Copy link
Copy Markdown
Owner

Thanks for this — the implementation follows the send2ntfy/send2gotify pattern cleanly and every integration point is wired correctly (script, send2.json default, json-send2.cgi GET/POST/default, send.cgi whitelist, the three motion bridges, agent-adapter, and the WebUI page/JS/table/capabilities). Marking video: false and using --form-string for all text fields are both right. A few things worth addressing before merge:

1. Branch is stale — rebase needed. This is 12 commits behind master, and f6311f43f ("motion: suppress events while pan/tilt motors are active") touched three of the same files: package/prudynt-t/files/motion, package/thingino-raptor/files/raptor-motion, and package/timps/files/timps-motion. The hunks sit in non-overlapping regions so they'd likely apply cleanly, but please rebase and re-test, especially the prudynt motion script (master added a MOTOR_ACTIVE_FLAG guard this branch doesn't have).

2. Verbose mode exposes the full credential pair. echo_command redacts the preview (token=***/user=***), but the actual curl --verbose invocation dumps the multipart request body to stderr — token and user key in cleartext. send.cgi's "wait for output" test path captures stderr and renders it in the browser. This is pre-existing across the toolkit (gotify leaks the token in the URL, ntfy in the Authorization header), but Pushover sends both credentials in the body, so both get dumped. Worth a note or a follow-up.

3. Priority edge cases.

  • Help text advertises -2 lowest, 2 highest, but priority 2 (Emergency) requires retry/expire parameters, which the script never sends — send2pushover -z 2 gets a 400. The WebUI correctly caps at 1; the CLI help should match.
  • No range validation on priority at all (same laxness as gotify, but a bad value just fails at the API).

4. 2.5 MB attachment limit is unguarded. Pushover rejects image attachments over 2.5 MB; the script doesn't check or resize. Higher-res sensors (4K+) can produce JPEGs over that, in which case photo notifications fail via the generic error path. The WebUI note documents the limit, but there's no guard. Has this been tested against a real camera snapshot?

Nits (non-blocking):

  • shfmt -i 0 -ci reformats the double-tab continuation indent — send2gotify/send2ntfy share the same style, so it's consistent, just noting it.
  • tool-send2-pushover.js reads send_video into a disabled checkbox on load but always writes false on save.
  • send2.json block lands between mqtt and ntfy (file's only loosely sorted, so no big deal).

Only item 1 blocks merge; 2–4 are worth fixing or acknowledging.

WLTB Gino added 2 commits August 25, 2026 16:17
Add send2pushover, a Pushover (pushover.net) notifier that follows the
same pattern as send2ntfy/send2gotify:

- /usr/sbin/send2pushover with token/user config in /etc/send2.json,
  optional title, message template (strftime), priority -2..1 and
  photo attachment via multipart upload (video unsupported)
- WebUI: Pushover config page (tool-send2-pushover.html), entry in
  the Send-to services table, service capabilities and test button
- json-send2.cgi: pushover domain read/write support
- motion bridges: prudynt motion script, timps-motion and
  raptor-motion now honor motion.send2pushover
- agent-adapter persists motion.send2pushover
- timps.mk installs send2pushover alongside the other send2 tools
- rebase onto current master (db8cd52); keep Paul f6311f4 motor-active guards in all three motion bridges alongside pushover service entry

- clamp priority to supported range: emergency (2) requires mandatory retry/expire params we never send, so 2 maps to 1 and out-of-range values map to 0/1; help text no longer advertises emergency

- guard Pushover 2.5 MB attachment limit before upload; skip with clear error instead of generic API failure

- add header note documenting verbose-mode credential exposure (pre-existing toolkit-wide, both Pushover creds travel in the multipart body)

Nits: explain send_video=false persistence in tool-send2-pushover.js; move pushover block after ntfy in send2.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants