Hello, I am trying to get iOS notifications working for myself and I am hitting a brick wall.
I am running Hass.io 0.74.2 in docker on Linux Mint 18.3 Xfce 64-bit.
I installed SSL certs via Certbot in command line and my certificates are signed by Lets Encrypt
Every time I reload HA I do update push settings on the iPhone.
I think I have tried just about every different way of configuring the notifications in my config files.
I also tried sending a manual notification via the services tab.
I am using code that a friend sent me that he says is working for him and its still not working for me.
I have also tried sending a manual notification in the services tab.
{"message", "Testing one, two, three"}
Sorry if this is alot of info I’m about to dump on here. I am trying to give any relevant info I can think of. I appreciate any help anyone could offer.
edit: I discovered there is an issue with Docker and resolving DNS so I fixed that. Now I am successfully resolving DNS from within the container but I am still getting errors. I added a fresh copy of my log.
here is my configuration.yaml ios section.
ios:
push:
categories:
- name: light1
identifier: 'LIGHT1'
actions:
- identifier: 'LIGHT_OFF1'
title: 'Turn off Light'
activationMode: 'background'
authenticationRequired: yes
destructive: yes
behavior: 'default'
Here is my automation
- alias: 'Notify Light On'
trigger:
- platform: state
entity_id: light.bedside_light
from: 'off'
to: 'on'
action:
service: notify.ios_chris_iphone
data:
title: "Reading Light"
message: "Reading Light is On"
data:
push:
badge: 0
category: 'LIGHT1'
- alias: 'Push Action Light Off'
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: LIGHT_OFF1
action:
service: light.turn_on
entity_id: light.bedroom_ceiling_light
Here is a copy of my log from the moment I first see mention of notify.
During handling of the above exception, another exception occurred:
2018-08-27 18:48:50 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall notify.ios_chris_iphone: title=<homeassistant.helpers.template.Template object at 0x7f20a68e07b8>, message=<homeassistant.helpers.template.Template object at 0x7f20a68e0a58>, data=push=badge=0, category=LIGHT1>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 56, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 180, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f20a68fcf98>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ios-push.home-assistant.io', port=443): Max retries exceeded with url: /push (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f20a68fcf98>: Failed to establish a new connection: [Errno -3] Try again',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1038, in _event_to_service_call
await service_handler.func(service_call)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/notify/__init__.py", line 137, in async_notify_message
yield from notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/notify/ios.py", line 94, in send_message
req = requests.post(PUSH_URL, json=data, timeout=10)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ios-push.home-assistant.io', port=443): Max retries exceeded with url: /push (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f20a68fcf98>: Failed to establish a new connection: [Errno -3] Try again',))