HA iOS Notification Error

So after doing some clean up in my scripts (moving things around, not changing anything) I restarted my HA (Hass.io) and the notifications stopped working with the following error message:

Log Details (ERROR)
Fri May 11 2018 22:27:36 GMT+1000 (AEST)

Error executing service <ServiceCall notify.ios_hasspad: message=<homeassistant.helpers.template.Template object at 0x72cb5af0>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/usr/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, 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 SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/usr/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/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/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/lib/python3.6/site-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='ios-push.home-assistant.io', port=443): Max retries exceeded with url: /push (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

As far as I can tell, my SSL certificate works fine, and there are no other issues reported.

I should add I’m on 68.1 and have been for a few days, haven’t had any issues with this till now. Also tried to notify 2 other iOS devices with the same error message.

Any ideas?

From above there appears to be an issue with SSL, you may want to look into this a bit deeper.

I’m seeing the same thing. No changes, it worked yesterday.

You are correct about SSL, but it’s an SSL issue on the HA server side, not my side. If you try to go to https://ios-push.home-assistant.io (the link at the bottom of the error message), it comes up with a warning.

I’m also getting this error.
Happend after a restart of Home Assistant.
No changes were made in the config files.

Ah thanks. Didn’t realise the address was real, I thought you changed it to hide your own address.
Guess we need to wait for server owners to fix it then.

The certificate has expired.16

That would do it!

Yep I was using it all morning to test my Burglar Alarm notifications. I Will switch to email for now I am sure they will fix it soon :slight_smile:

I’m having the same issue. Started about 3 hours ago.

Same here. Please fix it.

I created an issue on github :

1 Like

Seeing the same issue.

Same issue

When It will be fixed?

Give the dev’s some time. they are properly at pycon atm.

1 Like

Does any know if it is possible to detect this kind of situation in a a trigger and perform an action?

I’m thinking of setting up Amazon SNS as a backup to send an sms, but the price for it is quite steep (about € 0,12 per message, the same as Twilio). I’d like to be able to enable an input_boolean that when activated falls back to Amazon’s SNS.

Having the same issue, 0.68.1

Use ssl-cert-check or any other command line tool to check the certificate if it’s valid or not…

- platform: command_line
    name: SSL cert expiry
    unit_of_measurement: days
    scan_interval: 14400
    command: "ssl-cert-check -b -s domain.tocheck.com -p 443 | awk '{ print $NF }'"
1 Like

I think this is still run by Robbie and not seen him around much lately.