Wink API server name change

I’ve got some errors this morning coming from Wink related to an expired SSL certificate. There seems to be some reports that Wink may have changed the name of their API server. If that’s the case I assume the component will need an update to get things working. This is the error I’m getting:

Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 351, in _make_request
    self._validate_conn(conn)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 814, in _validate_conn
    conn.connect()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 289, in connect
    ssl_version=resolved_ssl_version)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 577, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

The server name has changed to:

api.wink.com

I updated this file:

.homeassistant/deps/pywink/api.py

On line 16 change:

BASE_URL = "https://winkapi.quirky.com"

to:

BASE_URL = "https://api.wink.com"

Fixed the issue for me.

@kevince52, good deal I did the same thing and it is working for me as well. I have PRs ready to go, once the python-wink PR gets pulled in an pushed to pypi I will submit the HA PR.

1 Like

Wow!

Y’all are on it! I came to post the exact same fix.

In my AIO install on the Pi, it was in this path

/home/hass/deps/pywink/api.py

Issue: