iOS notify

I can’t seem to figure out the best way to send ios notifications via node-red. Can anyone post a good example?

A simple call-service node will do it. Just make sure that it gets a payload from the upstream node and it will trigger.

[{"id":"978ac7e4.331c68","type":"api-call-service","z":"e58caaca.87f878","name":"","server":"804ed9ef.be45f8","service_domain":"notify","service":"notify_all_ios","data":"{\"title\":\"Update\",\"message\":\"{{payload}}\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":1300,"wires":[["607b4ecf.3d6c6"]]},{"id":"804ed9ef.be45f8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]

The group created for the notification in groups.yaml is:

- name: notify_all_ios
  platform: group
  services:
    - service: ios_jons_iphone

You don’t need to have the payload upstream for a simple service call. The service call can include the payload itself:

With data:

{
    "message": "The garage door has been open for more than 15 minutes",
    "title": "Garage Door Left Open",
    "data": {
        "sound": "US-EN-Alexa-Garage-Door-Opened.wav"
    }
}
7 Likes

Unless the payload includes dynamic information based upon a different automation.

:+1:
Yup, just wanted to point out it didn’t have to be!

I don’t receive push notifications for quite a while (roughly 3 months).
I just created a test flow in node-red with your settings and fired it but I still do not receive any notifications.

Are there any changes that I might have missed (e.g. settings in iOS I might have to change?)

My environment:

  • iPhone 11 pro with iOS v13.6
  • Home Assistant Native iOS App v 0.113.2
  • Home Assistant v 0.113.2 on a RPi 4

Thanks in advance!

1 Like

If anyone needs more info on the sounds, I was able to locate this online.

1 Like