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

Allow Selected MQTT topics to trigger local (iPhone) Notifications #178

Open
camphamp opened this issue Nov 19, 2023 · 2 comments
Open

Allow Selected MQTT topics to trigger local (iPhone) Notifications #178

camphamp opened this issue Nov 19, 2023 · 2 comments

Comments

@camphamp
Copy link

I would like to have urgent notifications sent to myself via my iPhone Notifications using MQTT topic subscriptions.

I use Node-Red and ESP32 devices, but there are many possible MQTT sources for others.

Structurally, you would need to allow for background fetching (perhaps this is just a user-defined setting) and have the app request notification permission from the user.

The UI could be a check box to enable notifications and the snooze time in hrs : minutes between repeat notifications (when it is a duplicated message within a topic). For example, the topic: alerts/freeze and message: "Basement is below freezing!" could be sent every 10 seconds but the user should be able to quiet iPhone notifications to a desired frequency, like every 6 hours.

Let me know if I can help test or answer/research any questions. Thanks!

@philipparndt
Copy link
Owner

Hi @camphamp,

I don't think this is the right architecture for doing push messages. For reliable urgent notifications you will always need a server component that uses the Apple Push Notifications Service (https://developer.apple.com/notifications/).

A good architecture would be:

  • iOS app to register the notification channel
  • Microservice that listens to MQTT messages (maybe on a "notification" topic) and sends push notifications

I see only two ways how this can be done:

  • lot of effort necessary together with some costs for developer certificates for each user
  • providing this as a service which would cost maintenance time, hosting costs and carful security considerations.

@camphamp
Copy link
Author

camphamp commented Nov 19, 2023 via email

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

No branches or pull requests

2 participants