Conversation
|
I'll use the PR to work on some documentation, not sure if this eventually belongs in a readme file in the repo or in the wiki: NotificationsPeaNUT supports some notification providers. To receive notifications from PeaNUT, you must configure:
Example YAML configuration for ntfy (/config/settings.yml): NOTIFICATION_INTERVAL: 10
NOTIFICATION_PROVIDERS:
- name: ntfy
triggers:
- variable: ups.status
operation: changes
- variable: battery.runtime
operation: is_below
targetValue: 900
config:
server_url: https://ntfy.example.com/
topic: my-ntfy-topic
priority: '3'
tags: peanut,prodTriggersTriggers define the events you want to receive notifications for.
Notification Providersntfyntfy (https://ntfy.sh/) Configuration
stdoutLog notifications to stdout. Any parameters configured for the stdout provider will be dumped to stdout with each notification (this can be useful for debugging). |
|
Great job! Is there any plan to add support for Apprise or a generic form of webhook which can be utilized to use other notification platforms? |
|
|
Thanks for fixing the linting/sonarqube issues! Something about the dropdown in the notifications area appears to be broken after the rebase... I will try to get that working and update the PR |
|
|
@Brandawg93 I'm going to mark this ready for review, let me know if you want to see any e2e tests or anything from my environment since I have this setup and working with ntfy. I also think documentation will be important for this feature, especially as more providers/plugins are added. I documented the providers I implemented in the PR comment above here but I didn't think this really belonged in the global README... maybe the wiki would be a good place, or I can throw it into a separate README file somewhere in the repo if you'd prefer. Apologies for the delay on getting this ready... life got a little busy for me recently! |
|







This is a WIP of #136
I wanted to start the PR early to get feedback on my changes.
The ntfy integration is working, and I added a "stdout" notification provider that "console.logs" the notifications (useful for debugging or if you just love a good old fashioned CLI)
I have not written tests or documentation yet. Before this gets merged I definitely need to add proper tests and documentation, and ideally a few more notification providers/integrations. Would like feedback on what the highest priority ones to add would be? I started with ntfy because that's my preferred provider & I already have it setup, but it's very extensible so long as we document the config options for each provider as we add them.