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 Ntfy and Pushover to GQServer #319

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

KalapoP812
Copy link

GQServer is now capable of:

  • Sending messages for earthquakes to the user's local and regional area
  • Sending messages as EEW for any shaking at the user's home location (Untested)

Users can modify any setting in Settings->Alerts->Ntfy/Pushover:

  • Modify the message priority for nearby earthquakes, light shaking, and strong shaking at their home location
  • Use custom sounds for nearby earthquakes, light and strong shaking at their home location (Pushover only)
  • Toggle whether they want to use Ntfy, Pushover, or both
  • Toggle whether they want to get notified of nearby earthquakes, expected shaking, or both

Messages contain the same info as the discord bot + S-wave arrival and expected intensity at the user's home location

Credits for the original idea: @Simulping

Additions:
- Added ntfy and pushover settings in Settings->Alerts
- Ability to notify users for any earthquakes near their local and regional area
- Ability to notify users for any expected shaking at their home location
- Ability for users to change priorities and sound notification
- Earthquake Early Warning Canceled when an earthquake was canceled regardless the location
- Fixed some priority issues when using pushover
Fixed bugs where
- Notifications were sent from any earthquake update after felt shaking
- When felt shaking was reported, notifications for both nearby and felt shaking were sent
@KalapoP812
Copy link
Author

After running a server for a while, I finally felt an earthquake and can confirm that EEW using Ntfy and Pushover works. There were some bugs, which I believe I fixed.
Here is the image:
image
By the time the notification was sent, the S-Wave had already passed for about 3 seconds because the earthquake was too close, and GlobalQuake did not detect it quickly enough.

- Reverted a change
- "No shaking expected" bug is finally fixed

Note: There is a potential bug that if an earthquake is felt and a second earthquake is created at the same time (regardless of the location), and the first eq updates, the user will be notified again as if nothing happened before.
Bug fixes:
-Final Report Earthquakes were not sent
- If an earthquake is felt and a second earthquake is created at the same time (regardless of the location), and the first eq updates, the user will be notified again as if nothing happened before.
When the option is disabled, the user will receive only the final report.
Images for EEW will not be supported for now as sending images takes longer time.

NTFY support soon.
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.

1 participant