Help with Wink Hub Setup?

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.

I am trying to get my Wink connected for the first time and am running into the following error in the logs:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 416, in start
resp = yield from self._request_handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web.py”, line 325, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 93, in impl
return (yield from handler(request))
File “/usr/lib/python3.6/site-packages/homeassistant/components/http/ban.py”, line 58, in ban_middleware
return (yield from handler(request))
File “/usr/lib/python3.6/site-packages/homeassistant/components/http/auth.py”, line 49, in auth_middleware
return (yield from handler(request))
File “/usr/lib/python3.6/site-packages/homeassistant/components/http/static.py”, line 70, in staticresource_middleware
return (yield from handler(request))
File “/usr/lib/python3.6/site-packages/homeassistant/components/http/init.py”, line 427, in handle
result = handler(request, **request.match_info)
File “/usr/lib/python3.6/site-packages/homeassistant/components/wink/init.py”, line 567, in get
data.get(‘code’), self.config_file[‘client_secret’])
File “/usr/lib/python3.6/site-packages/pywink/api.py”, line 399, in request_token
headers=headers)
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 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘api.wink.com’, port=443): Max retries exceeded with url: /oauth2/token (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x70ab5130>: Failed to establish a new connection: [Errno -3] Try again’,))

I get this after going through the authorization and getting returned to a 500 Internal Server Error page.

I’ve tried going through the config with my duckdns url, local url, https and http and I added the google nameservers to my resolv.conf. Any other ideas about what’s going on?

I finally got it to authorize by switching off my Duck DNS and Dnsmasq addons. I’m pretty sure it’s the Dnsmasq addon as when I turned it back on I started getting the same error. Is there something I can do to configure that addon so that I can keep using it?

Current config:

{
“defaults”: [
“8.8.8.8”,
“8.8.4.4”
],
“forwards”: [],
“hosts”: [
{
“host”: “xxxxx.duckdns.org”,
“ip”: “192.168.2.21”
}
]
}

How do you delete the wink file to start fresh?
Please and thanks

Stop Home Assistant. Then delete the .wink.conf in your config folder. Then restart.

Thanks. It worked!
Sorry am new to home assistant. Switching from openHAB. How do you enable cloud services so you can access home assistant remotely or from your phone.
Thanks

You just need to open a port on your firewall and make it public. You will need to get a domain name and enable SSL with letsencrypt. There are several guides on how to set it up.

I setup port forwarding but still cant get it to load. I also don’t have a wink.config file located in the config folder. Did I do something wrong ?

You don’t need port forwarding for wink setup. The wink.conf is hidden if you are using Linux you need to delete the file .wink.conf it has a . in front.

Thanks I removed the file ,rebooted, and then went through the setup again…But i’m still getting “Client is not authorized or could not be found.”

You have to stop Home Assistant, then delete the file. If you delete the file while HA is running the file gets recreated when HA shutsdown.

Stupid question.
My site is on my local Ubuntu Server v 18.04
hassio is running. Wink is running by my phone app.
In trying to pair with hassio I have created my api.
But now I am very confused.
I put the following in the
REDIRECT URIS
http://192.168.1.185/auth/wink/callback

When I call up the config in hassio it says
Add a Redirect URI of http://192.168.1.185:8123/auth/wink/callback.
They will provide you a Client ID and secret
after reviewing your request.
(This can take several days).
but it also has in a box redirect uris* http://127.0.0.1/auth/wink/callback

I put in the secret codes.
When I press submit.
I then reboot hassio.
I go to configure and it shows http:192.168.1.185:8123/auth/wink
I click on it and nothing happens.
Where do I go from here.

What is the IP you access Hass on? 192.168.1.185 correct?

YesScreenshot%20from%202018-08-12%2014-02-23

Ok, so when you click on configure and paste in your stuff you should then go to

192.168.1.185:8123/auth/wink and it should bring you to a sign in screen.

This is what the wink ide says.
Even though my url is 192.168.1.185/auth/wink/callback (NO HTTP(S))
The Wink app will not allow me to save it with out the HTTP.

New information…
I deleted the .wink.conf file as I have done in the past.
Rebooted
Reentered credentials.
Rebooted.
Started wink.
Nothing. but the hassio click on box.
Then I went to view the URL bar in my browser and accidentally hit the enter key, lo and behold the error message went away and I am all set.

Thank you so much for your patience.

@w1ll1am23 I’ve been following your notes and I’ve done the following in an attempt to get Wink working with Home Assistant (running in a Docker container).

Modified my configuration.yaml so that it has the following:

http:
 base_url: 192.168.1.101:8123

This was required so Home Assistant populated the proper URI for the Wink callback.

I then removed the SSL certificates from configuration.yaml and all port forwarding from my router; home assistant is not accessible from outside my network. This was necessary to be able to load Home Assistant from http://192.168.1.101:8123

I then created an application on the Wink Developer Portal:

Which everything looks great, so I copy / paste the Client ID and Client Secret into the Configuration notification on Home Assistant.

The configuration is saved in Home Assistant and the notification then changes to authorize Wink by visiting http://192.168.1.101:8123/auth/wink

I’m able to open the URL but I receive the following error message from Wink.com
Client is not authorized or could not be found.


This is where Home Assistant does something wrong, the URL redirects to the following website:
https://api.wink.com/oauth2/authorize?client_id=CLIENT_ID_SECRET&redirect_uri=http%3A//PUBLIC_IP_ADDRESS%3A8123/auth/wink/callback

Home Assistant populated the wrong Client ID (used an old one) and my Public IP address; most likely from an old Wink configuration. I put in the proper Client ID and Internal IP address and was able to get to the Wink Authorization page.

Then, and only then, could I get my Wink to show up in Home Assistant.

Yeah that’s strange. That IP is provided by the HA system not sure how they are obtaining it. I could possibly change the dialog to accept the IP address you wanted added so the user can specify it?