API errors from Wink after upgrading from 0.56.2 to 0.58.1 (solved)

Since mid-October, I’ve been using a bunch of devices through Wink. I created a developer account, added a new application, and then fed Hass.io whatever OAUTH settings/URLs it needed. That has worked fine for ~6 weeks.

After my upgrade today, Wink no longer works. Here’s what I’m seeing in the log:

2017-11-30 00:16:15 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/wink/__init__.py", line 320, in setup
    pywink.get_subscription_key())
  File "/usr/lib/python3.6/site-packages/pywink/api.py", line 565, in get_subscription_key
    response_dict = wink_api_fetch()
  File "/usr/lib/python3.6/site-packages/pywink/api.py", line 584, in wink_api_fetch
    raise WinkAPIException("401 Response from Wink API.  Maybe Bearer token is expired?")
pywink.api.WinkAPIException: 401 Response from Wink API.  Maybe Bearer token is expired?

I see some other threads about this but they are Home Assistant and not Hass.io, so I’m not really sure how transferrable the info is going to be.

EDIT: As I was finishing this post, I found my answer, but figured I’d still post it just in case others have the same issue after their updates.

Went into /config and deleted the .wink.conf file, then restarted Home Assistant and was presented with the option to configure Wink again. Once I did so everything was working fine. Not sure what caused the issue, but not too complicated a fix.

1 Like

I had the same experience upgrading from 59.0 to 59.1. I followed your method and I am glad to report that my Wink connection was restored. YAY!

Awesome! Glad it worked out for you. Can’t take credit for the method though, just found it Googling.

I am having the same issue with Wink. I have tried deleting the wink.conf file after stopping HA and reloading.
When I configure Wink it returns an error:

Secure Connection Failed

An error occurred during a connection to mywebsite.org:8123. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

Any ideas on what I can try?