Can't get push notifications to work

Sorry for the technically duplicate post, but the first place I asked it wasn’t really the right place. O.P: https://community.home-assistant.io/t/push-notifications-now-available/154700/166?u=dave_sausages

I can’t for the life of me get the push notifications to work.

These are my steps:

Install and open android app.

Phone is on same wifi as Home Assistant

App says “unable to find home assistant”

Enter address manually: I put the Nabu Casa url in then my user account login details.

App says: “Unable to register application. Please check to ensure you have the mobile_app integration enabled on your home assistant instance”

Retry does nothing. However, I close app re-open it and it loads HA lovelace up instantly.

On my laptop, there is no “ notify.mobile_app” service in Developer tools – Services. Only notify.notify

I Restart HA and still no notify.mobile_app in the services.

It should be noted that when I go to integrations and try to add the mobile app integration, it says: Aborted - Open the mobile app to set up the integration with Home Assistant. See the docs for a list of compatible apps.

I’ve tried pretty much every version of “open app once” and clear data etc as per the instructions, but still no dice. I’ve logged in on the app and kept it on the “unable to register application” screen and restarted HA there for example. Still same problems.

I have cleared the android app cache, reinstalled it multiple times, but nothing I try gets the notify.mobile service to appear.`

App is version 1.4. Hassio on Rpi4 0.104.2

Can anyone help get this working for me?

I suppose the first stage of problem solving is: should I get the “Unable to register application. Please check to ensure the mobile_app integration enabled on your home assistant instance” error when I first try to correct to my HA instance on the app?

When I try to connect for the first time I get this appear my logs:

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 50, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/http_api.py", line 80, in post
    DOMAIN, data=data, context={"source": "registration"}
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 109, in async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/config_flow.py", line 47, in async_step_registration
    self.hass, user_input[CONF_USER_ID], devt_entry.entity_id
  File "/usr/src/homeassistant/homeassistant/components/person/__init__.py", line 108, in async_add_user_device_tracker
    if device_tracker_entity_id in device_trackers:
TypeError: argument of type 'NoneType' is not iterable

Do you have either default_config: or mobile_app: in your configuration.yaml?

Yes I have tried, neither, either and both. Same issues. Does the error provided above give some clues on a solution?

I also have these:

device_tracker:
  - platform: bluetooth_tracker
#  - platform: bluetooth_le_tracker
#    track_new_devices: true

person:

default_config:

And the bluetooth device tracker works?

Aha! I went playing again and found partial success. I went into configuration - persons and noticed my user account. I looked at the devices and saw GM1913. I googled GM1913 and saw it was the code for my phone model (Oneplus 7Pro, which I never entered in HA). I selected it as a device to track. Logged out of the app, and back in…and no error message! It logged straight in to the Lovelace interface!

I went to the enable push notifications section of the app and noticed that “requires SSL enabled for frontend” was no longer present (which I assume to mean SSL was enabled?) I then went to the services section, but still no notify.mobile service was available. So I restarted Hassio, but after restart it still wasn’t there. Have deleted all data from app and relogged in a few times now and still nothing.

I should note though that after a few times of restarting and wiping app data etc, I now have 2 instances of my phone in the devices to track GM1913 and GM1913(2).

I’m getting closer,but still no cigar

Good, making progress :slightly_smiling_face: If you go to integrations, do you see anything under mobile_app?