Allow Selected MQTT topics to trigger local (iPhone) Notifications
Opened this issue · 2 comments
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!
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.