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

Email notification settings #489

Closed
ivelin opened this issue Jan 14, 2021 · 7 comments · Fixed by #773
Closed

Email notification settings #489

ivelin opened this issue Jan 14, 2021 · 7 comments · Fixed by #773
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ivelin
Copy link
Contributor

ivelin commented Jan 14, 2021

Is your feature request related to a problem? Please describe.
Currently notification settings have to be provided in the edge device config.yaml.

Describe the solution you'd like
End users need a easy way to configure notification preferences via the UI app.

Describe alternatives you've considered
Using config.yaml is OK for developers, but not end users.

Additional context
The UI has to offer a way for users to provide email address where edge notifications will be sent to.
Respectively the UI needs to update the edge configuration via its config REST API when user's preferences change.

The UI notification settings design would ideally take into account future improvements that allow multiple notification targets - iftt, push notifications, SMS , etc.

@ivelin ivelin added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jan 14, 2021
@ivelin
Copy link
Contributor Author

ivelin commented Jan 26, 2021

@vickywane this is the corresponding backend implementation running on edge deployments: ambianic/ambianic-edge#50

@ivelin
Copy link
Contributor Author

ivelin commented Feb 2, 2021

The case was made for supporting multiple email addresses for notification alerts.

  1. Maybe you do not want the your granddad's neighbor to have access to the Edge, but when something bad happens the neighbor can go next door to your granddad's when you live 1000 kilometers away.
  2. There is also the idea of peer support. Friends of similar age keep an eye on each other. They can’t physically run to the rescue but they can look at the alert, make an educated decisions and call emergency if needed.
  3. And then there is the typical case that a caregiver on duty and a family member should be notified immediately.

@ivelin
Copy link
Contributor Author

ivelin commented Feb 3, 2021

@vickywane as you are exploring implementation options for email notifications, there is another possibility to consider.

We could potentially use the recently introduced github sponsors API to obtain an OAuth token from the PWA. Then if the user is a sponsor, we can use that token in the edge to call into a new ephemeral serverless function, let's call it AmbianicNotificationsProxy, which proxies notification calls from the edge to notification service providers such as mailgun, ifttt, AWS SMS, etc. AmbianicNotificationsProxy can verify calls against valid ambiniac github sponsor tokens and then use deployment environment secret variables to route messages from the edge to mailgun and other notification services in the future. It won't need a database to store any data of its own.

I just tested the new github sponsors GraphQL and it seems to work fine. See links and screenshots.

Screen Shot 2021-02-02 at 9 15 36 PM

Screen Shot 2021-02-02 at 9 26 39 PM

This will mean that only sponsoring users can use the new notifications feature, but I think that's a reasonable value for a few dollars per month.

Users who don't want to be sponsoring us, can still use notifications by editing config.yaml on the edge with the service provider credentials of their choice.

Thoughts?

@vickywane
Copy link
Contributor

Are all Ambianic users Github sponsors?

@ivelin
Copy link
Contributor Author

ivelin commented Feb 3, 2021

Are all Ambianic users Github sponsors?

No.

@stale
Copy link

stale bot commented Oct 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 11, 2021
@ivelin ivelin linked a pull request Nov 19, 2021 that will close this issue
5 tasks
@ivelin
Copy link
Contributor Author

ivelin commented Nov 19, 2021

Addressed via #773

@stale stale bot removed the wontfix This will not be worked on label Nov 19, 2021
@ivelin ivelin closed this as completed Nov 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants