Help with Wink Hub Setup?

Should this be included in the docs? I don’t mind submitting a PR but I’m not sure whether everyone needs to use their local IP as the redirect URI or this is a special case.

I thought that the configurator already mentioned it? It should probably be there.

It’s there but there’s no indication that a local IP should be used when setting up your developer account with Wink.

Ahh hmm okay. Yeah if you want go ahead and add some doc to explain it better. In most cases it should be a local address

What is the url if I have SSL turned on? I have set it to that http://192.168.1.xxx:8123/auth/wink is my url and have the wink account set up. When I click on “configure” I get the dialog

Please authorize Wink by visiting https://xxx.yyy.com/auth/wink

If I try to open my browser to that link I get nothing. Just a busy cursor that spins forever.

What am I doing wrong?

steven

Check this thread. You may be having a similar problem to what I experienced.

Thanks. I will give that a try when I get home

n0dyjeff, That was it. To summarise

  1. Change my port forward on my router from 443->8123 to 8123->8123
  2. Make sure the url on the wink dev site is http://192.168.1.xxx:8123/auth/wink/callback
  3. In configuration.yaml
    a) set base_url to http://192.168.1.xxx:8123
    b) comment out the ssl_certificate and ssl_key lines
  4. Reboot HA
  5. Click on Configure link in the Wink panel of HA
  6. Log into Wink
  7. Boom, it works
  8. Undo the port forward and the change to configuration.yaml
  9. Reboot

This is how to do the new Wink authorization with SSL

1 Like

I am having issues installing my wink hub. I am able to configure the hub using my developer id and secret and then use the call back link to log in but when I restart I get a wink invalid config error. Also in my log file I receive this message.

` 2 017-12-03 22:22:56 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 436, in setup
hubs = pywink.get_hubs()
File “/usr/lib/python3.6/site-packages/pywink/api.py”, line 492, in get_hubs
token = get_local_control_access_token(_id)
File “/usr/lib/python3.6/site-packages/pywink/api.py”, line 406, in get_local_control_access_token
_LOGGER.debug("Local_control_id: " + local_control_id)
TypeError: must be str, not NoneType ‘

Any ideas what may be going on?

Yeah there is a fix needed in python-wink I’ll get that added.

Why hub do you have? Do you only have a relay?

Thanks! That would be great. I have a first edition wink hub.

Interesting, not sure why you are getting that error.

Can you log in to https://winkathome.net/Login.aspx?redirect=default.aspx

Find your hub, click the little ‘i’ in the bottom right. Find the JSON field and PM that to me?

The error makes it seem like your hub isn’t sending a local control ID back.

Maybe try rebooting your hub? Is your hub rooted and not all the way up-to-date maybe?

This https://github.com/home-assistant/home-assistant/pull/10961 should fix your problem.

I had a similar issue with my Wink 2nd Generation Smart Hub and I had to return it back since it was faulty. The issue was confirmed by Wink so if you’re still experiencing the issue, make sure to reach out to them.

I’m experiencing this error also. just restarted due to some conig updates for other items and now it says my wink config is invalid.

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 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
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/wink/init.py”, line 320, in setup
pywink.get_subscription_key())
File “/usr/lib/python3.6/site-packages/pywink/api.py”, line 576, in get_subscription_key
response_dict = wink_api_fetch()
File “/usr/lib/python3.6/site-packages/pywink/api.py”, line 597, 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?

Have you deleted your .wink.conf after you shutdown HA and then attempted to run through the Wink setup again? It is possible your token in the .wink.conf expired.

Anyone having problems with the wink hub not reporting state changes to HA? The only way I can get changes is to force a wink refresh

Everything seems to be working fine for me although I am responding 3 hours later so maybe there was an issue then? Are you still having trouble? Any errors in your logs?

I noticed this on Thursday but I was away from home and could not look into it. Last night I restarted HA and it then told me that the Wink hub was not configured. I deleted the wink.config. file and then setup the wink api with HA again. All working for now :slight_smile:

1 Like

This was a pain but it finally worked. Not sure why it does. Any ideas? For duckdns domain with ssl encryption. 1. Add wink: in configuration.yaml. 2. Create application and set redirect uri= https://yourdomain.duckdns.org:8123/auth/wink/callback in developer.wink.com. 3. Enter user ID and secret in home assistant front end wink configuration widget 4. Go to https://yourdomain.duckdns.org:443/auth/wink 5. Enter wink email and password 6. Use Port 443 instead of 8123 in the link that follows.

I had to forward Port 443 to 8123 when set ssl with letsencrypt.

This is all black magic to me but maybe it’d be useful for someone.