Push Notifications

I’m attempting to set up push notifications in the iOS app and I don’t see the push notifications key at all. Is there a configuration key I’m required in my config.yaml file? From what I understand you have to enter the key first.

I have already allowed push notifications from the app when you first launch it.

Try force quitting and relaunching your app. It should be listed in Settings under the header “Push Notifications” along with two buttons under the field. If you still don’t see it please try reinstalling.

Thank you for the info. I’ve done both.

Here is what I see:

That’s… weird. Can you try reinstalling the app again? When you get the permissions prompt to Allow Notifications and Enable Location please tap the Allow Notifications button first and before the location prompt. Once you get the iOS popup and accept please tap the Allow Notifications button once more, making sure it turns solid blue and remains blue. Then you can accept the location prompt.

I believe this may be an issue with the permissions checking library I am using.

I was having the same issue and your steps above resolved it for me - thanks!

Sorry to be a pest. I’m still not getting the notifications key. If there is anything I can help with or provide, please let me know. I bought a new router and configured it yesterday for this app. I’m excited.

Cheers

Did you do the complete reinstall? That solved it for me.

Yes. The app has been installed and re-installed about 10 times.

I receive the push notifications regarding geolocation changes, but I don’t see the push notifications key in the settings section.

Can you contact me on Gitter for some realtime 1-on-1 debugging?

This was happening because the iOS component was not loaded.

1 Like

So I’ve confirmed that the app can receive push notifications fine but I can’t seem to get it working. Here is what I have so far:

ios:
  push_categories: # Defines actionable notifications. Categories are groups of actions. You specify the category in the notification.
    - name: Alarm
      identifier: 'ALARM' # Must be unique and ALL CAPS
      actions:
        - identifier: 'SOUND_ALARM' # Must be unique and ALL CAPS
          title: 'Sound Alarm' # Needs to be short!
          activationMode: 'background' # or background. The mode in which to run the app when the action is performed.
          authenticationRequired: yes # A Boolean value indicating whether the user must unlock the device before the action is performed.
          destructive: yes # A Boolean value indicating whether the action is destructive.  When the value of this property is true, the system displays the corresponding button differently to indicate that the action is destructive.
          behavior: 'default' # or TextInput. When TextInput the system provides a way for the user to enter a text response to be included with the notification.
          context: 'default' # or Minimal. Default = In this context, the full UI is displayed for the notification’s alert. You may specify up to four custom actions in this context. Minimal = In this context, a minimal UI is displayed for the notification’s alert. You may specify up to two custom actions in this context.
        - identifier: 'SILENCE_ALARM' # Must be unique and ALL CAPS
          title: 'Silence Alarm' # Needs to be short!
          activationMode: 'background' # or background. The mode in which to run the app when the action is performed.
          authenticationRequired: yes # A Boolean value indicating whether the user must unlock the device before the action is performed.
          destructive: no # A Boolean value indicating whether the action is destructive.  When the value of this property is true, the system displays the corresponding button differently to indicate that the action is destructive.
          behavior: 'TextInput' # Default or TextInput. When TextInput the system provides a way for the user to enter a text response to be included with the notification.
          context: 'default' # or Minimal. Default = In this context, the full UI is displayed for the notification’s alert. You may specify up to four custom actions in this context. Minimal = In this context, a minimal UI is displayed for the notification’s alert. You may specify up to two custom actions in this context.
          textInputButtonTitle: 'Silencio!' # Only for iOS 10 when behavior is TextInput.
          textInputPlaceholder: '...' # Only for iOS 10 when behavior is TextInput.
          parameters: # iOS 9 only. Use this dictionary to specify any behavior-specific data for the action. For example, if you set behavior to TextInput you can use the UIUserNotificationTextInputActionButtonTitleKey key, which lets you customize the title of the button displayed by the text input interface.
            UIUserNotificationTextInputActionButtonTitleKey: "Silencio!"

I’m trying to get a push notification fire when home assistant is back up:

automation:
- alias: "Startup Notification"
  trigger:
    platform: event
    event_type: homeassistant_start
  action:
      service: notify.iOSApp
      data:
        message: "By Golly, Home Assistant is back up!"
        data:
          push:
            badge: 5
            category: "ALARM"

After some work, its good.

Here is what I have in place:

ios:

automation:
- alias: "Startup Notification"
  trigger:
    platform: event
    event_type: homeassistant_start
  action:
    service: notify.iOSApp
    data:
      message: "By Golly, Home Assistant is back up!"

Its much simpler than I expected. Cheers

It looks like after this new beta version I can’t see the notifications key again. I haven’t changed my config.yaml

Not too sure what is going on

I’m getting this error message:

16-09-18 18:26:12 homeassistant.core: Unable to find service notify/iosapp

I have the py files in the two folders and they are named iOS.py

I’m going to be working on a whole new settings page today to fix issues like this and be clearer about needing to load the iOS component if you want notifications. Should be out tonight.

Cool! Would it be possible at some stage to add an option to prevent the App itself from notifying zone changes? I do this through HA and push the notifications out so I can see all zone changes not just those on my phone. For now it is fine as I am still testing but eventually I would like to be able to avoid the double notifications. Thanks!

The settings are already there for it but they aren’t always correctly saving because of the database problem that is causing other bugs like missing states and the inability to save group order.

1 Like

I may have missed it. I downloaded the app last night and my push notifications are not working on my iphone. I don’t have any push notifications in my yaml and my IOS component did not load when I downloaded the app. What do I need to do to get notifications to my phone when devices enter and leave the zones? I am very new to HA. Thanks for the help!

Can you give me a hand? I have the app installed
and I can see everyone on the map leave
and enter zones from the app. I can’t get the push notifications to work from the app. Also I might
have missed it but the iOS component is also not loaded. Do I have to have it loaded?

Follow this summary of instructions