Hi Everyone, Hoping someone can point me in the right direction to fix an IOS HA Companion App Notification issue. The issue is that I cannot receive external notifications to my iPhone 7+ via “notify.mobile_app_x” nor “notify.notify” processing. I am receiving internal notifications just fine using both the same methods, but when I turn my WiFi off on my phone (e.g. external mode) I get no notifications at all from HA to the Companion App.
I can control my Home Assistant externally (phone wifi off) just fine via the https://xxx.duckdns.org:8123 link - turn on/off lights, view all dashboards, arm/disarm Alarmo, etc. No form of notifications work in this mode (e.g. notify.mobile_app_todds_iphone OR notify.notify). I see the “Rate Limits” value count dropping (in Companion App Notifications) for each message that I try to send. I do not see any messages in the Companion App Event Log related to notifications (only location updates from the past).
I can control my Home Assistant internally (phone wifi on) just fine via the http://192.168.x.x:8123 link - turn on/off lights, view all dashboards, arm/disarm Alarmo, etc. I can also send and receive ALL notifications to my iphone 7 (via notify.mobile_app_todds_iphone OR notify.notify). I can also play built-in sounds, display critical type messages, display messages with events, etc just fine.
With iPhone Wifi OFF, the Companion App status shows: Connected via “External URL”, Version “2023.6.2”, Websocket “Connected”, Local Push “Disabled”, Logged in as “Todd xxx”.
With iPhone Wifi ON, the Companion App status shows: Connected via “Internal URL”, Version “2023.6.2”, Websocket “Connected”, Local Push “Available(1)”, Logged in as “Todd xxx”.
IOS iPhone 7 Setup:
- Apple iPhone 7+, running IOS 15.7.6
- Note iPhone 7 will not update to IOS 16 due to old hardware.
- Companion App installed, version 2023.4 (2023.460)
internal url = http://192.168.x.x:8123, Local Push enabled
external url = https://xxxx.duckdns.org:8123
device name = todds_iphone - All iPhone “Focus” profiles have Home Assistant in the Apps settings to allow access. Note that no focuses are enabled for any of my testing.
Home Assistant Setup:
- Runs on a Raspberry Pi3B
- Home Assistant 2023.6.2
- Supervisor 2023.06.2
- Operating System 10.3
- frontend 20230608 - latest
- I am not using Home Assistant Cloud
- Addon DuckDns with LetsEncrypt enabled, default (none) ipv4 and ipv6 values
domains:
- xxxx.duckdns.org
token: xx-xx-xx-xx-xx
aliases: []
lets_encrypt:
accept_terms: true
algo: secp384r1
certfile: fullchain.pem
keyfile: privkey.pem
seconds: 1800
- Addon NGINX, network exposed port = 443
domain: xxxx.duckdns.org
hsts: max-age=31536000; includeSubDomains
certfile: fullchain.pem
keyfile: privkey.pem
cloudflare: false
customize:
active: true
default: nginx_proxy_default*.conf
servers: nginx_proxy/*.conf
nginx_proxy_default_fix_ingress.conf contents:
# used by NGINX
# Fixes issues with addons using their own web server (e.g. ESPHome, etc).
location /api {
proxy_connect_timeout 60;
proxy_read_timeout 60;
proxy_send_timeout 60;
proxy_intercept_errors off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host:8123;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://homeassistant.local.hass.io:8123/api;
}
Netgear Router Port Forwarding:
- External start port = 8123, External end port = 8123
- Internal start port = 443, Internal end port = 443, Internal IP address = 192.168.x.x
Message notification yaml example - works fine when run internal, but does not work external. Same results if I use “notify.notify” as well:
alias: Notify App - Welcome Home Todd
description: >-
Causes a Welcome Home voice sound to be played on a mobile device when the
specified person has come home.
trigger:
- platform: state
entity_id:
- person.todd
to: home
condition: []
action:
- service: notify.mobile_app_todds_iphone
enabled: true
data:
title: Welcome Home
message: Welcome Home!
data:
push:
sound:
name: US-EN-Alexa-Welcome-Home.wav
volume: 1
mode: single
I hope it’s something simple in my configuration that I am overlooking. Maybe a firewall port needs to be opened somewhere? NGINX config maybe?
I appreciate your time and consideration.
Thanks - Todd