Help registering for push notifications

Hello,

I noticed that push notifications stopped working on my phone. I wanted to start fresh on this so I emptied out my ios.conf and ios_devices.conf (is this even still used?).

On my phone I connect and press Enable notifications in the setting’s pane and then “Allow” in the pop-up dialog. In the Notification Settings view I see “Not registered for remote notifications” but, I can see my phone in the ios.conf.

I wanted to test if it was working anyways so I try to call the notify.iosapp service as follows:

{"message": "test"}

I get the following error:

16-12-07 20:00:45 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1977006640-11, service_data=message=test, domain=notify, service=iosapp>
16-12-07 20:00:46 ERROR (Thread-10) [homeassistant.components.notify.ios] No target parameter was found in the notification payload.
16-12-07 20:00:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1977006640-11>

A little unclear to me what to put for target and I thought this field was optional?
Any idea why my phone is reporting as unregistered?

Thanks,
Devan

I looked in to this a little more, I think this error message is because ios.enabled_push_ids() is returning None. This seems to confirm that it failed to register my phone but, I still don’t know why the phone isn’t registering…

{"devices": {"Devan_iPhone": {"battery": {"level": 74, "state": "Unplugged"}, 
                                           "pushId": "",  
                                           "device": {"name": "iPhone_dlippman",  
                                                          "systemName": "iOS",  
                                                          "type": "iPhone 5s",  
                                                          "systemVersion": "10.0.2",  
                                                          "permanentID": "xxxx",  
                                                          "model": "iPhone",  
                                                          "localizedModel": "iPhone"},  
                                           "app": {"versionNumber": 1, "buildNumber": 46, "bundleIdentifer": "io.robbie.HomeAssistant"},  
                                           "deviceId": "Devan_iPhone",  
                                           "permissions": ["location"],  
                                           "pushToken": "xxxxx", "pushSounds": []}}}

are you calling out the notification platform

notify:
 - platform: ios

Yep, doing it like this:

ios:
  push_categories:
    - name: Away
      identifier: 'AWAY' 
      actions:
        - identifier: 'ALARM_ARM_NOW' 
          title: 'Arm' 
          activationMode: 'background'
          authenticationRequired: no 
          destructive: yes
          behavior: 'default' 
          context: 'minimal' 
        - identifier: 'ALARM_CANCEL' 
          activationMode: 'background' 
          authenticationRequired: yes 
          destructive: no 
          behavior: 'default' 
          context: 'minimal' 
    - name: Alarm
      identifier: 'ALARM_SOUNDED'
      actions:
        - identifier: 'ALARM_SLEEP'
          title: 'Sleep'
          activationMode: 'background'
          authenticationRequired: yes
          destructive: yes
          behavior: 'default'
          context: 'minimal'
        - identifier: 'ALARM_CANCEL'
          title: 'Disarm'
          activationMode: 'background'
          authenticationRequired: yes
          destructive: yes
          behavior: 'default'
          context: 'minimal'

notify:
  - name: HTML5
    platform: html5
    gcm_api_key: 'xxxx'
    gcm_sender_id: 'xxxx'
  - name: iOSApp
    platform: ios

I seem to have things working now… I uninstalled app from phone, cleared ios.conf and started over. My mistake the first time was probably not reinstalling the iOS app before wiping the HA config.