Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "device" parameter for Pushover Notifications #802

Closed
TheMegamind opened this issue Nov 6, 2024 · 4 comments
Closed

Add "device" parameter for Pushover Notifications #802

TheMegamind opened this issue Nov 6, 2024 · 4 comments

Comments

@TheMegamind
Copy link

TheMegamind commented Nov 6, 2024

The Pushover API includes an optional "device" parameter, which allows the user to name the specific device(s) to send the notification to instead of all devices under the user key.

I have several devices in my pushover user account (phones, tablets, etc.) and as currently implemented, raspiBackup sends any requested notifications to ALL of them. It would be preferable to have these instead sent only to selected devices as I do with other applications where I have integrated Pushover.

Looking through the raspiBackup code, it appears this could be implemented with just 6 or 7 simple lines of code and wouldn't impact any current user configurations. If I felt capable of submitting a proper pull request, I would do so, but this is probably best left to someone who understand the code in full.

Thanks for considering this addition.

@framps framps self-assigned this Nov 7, 2024
@framps framps added the enhancement Enhancement request label Nov 7, 2024
@framps
Copy link
Owner

framps commented Nov 7, 2024

Makes sense to me to add the device parameter 👍 . It's just another parameter which has to be passed to the API and a new optional pushover configuration parameter PUSHOVER_DEVICE.

If you like you can update raspiBackup right now and add here another line

--form-string "device=MYDEVICE"\

as a workaround until it's implemented in raspiBackup. Will try to get it into next upcoming release 😉

@framps framps added this to the 0.6.10 milestone Nov 7, 2024
@TheMegamind
Copy link
Author

TheMegamind commented Nov 7, 2024

Thanks!

I've also added the optional ttl parameter, so that (in my case) the pushover message self-destructs after 24 hours when the next daily backup is run. It's just housekeeping, but I find that parameter useful as well.

--form-string "ttl=86400"\

@framps
Copy link
Owner

framps commented Nov 7, 2024

Nice option. I'm frankly no pushover user and not familiar with all the options.

I'll add another option PUSHOVER_ADDITIONAL_OPTIONS where any other API options can be defined. In your case you have to define

PUSHOVER_ADDITIONAL_OPTIONS='--form-string "ttl=86400"'

framps added a commit that referenced this issue Nov 8, 2024
@framps framps added Implemented planned for next release Will be available with next release labels Nov 8, 2024
@framps
Copy link
Owner

framps commented Nov 8, 2024

Implemented and will be available with 0.6.10

@framps framps closed this as completed Nov 8, 2024
@framps framps added verified and removed planned for next release Will be available with next release labels Nov 8, 2024
@framps framps modified the milestones: 0.6.10, 0.7.0 Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants