Wink problems

Haven’t had the time until now, but my Wink hub stopped working with Hassio months ago. Tried to erase my wink: (+ name and password) so I can go through the setup again, but it never pops back up. Anyone know why that is?

I’ve deleted/readded wink: multiple times, but it just never gives me the setup for Wink like the first time around.

You should have a hidden file in your config folder (.wink.conf) delete that when HA isn’t running, and the configurator will show back up on the next restart.

Thank you so much!

This has happened to me twice now in the past month. HASSIO Overview page just says there is a Wink configuration error.

I figured out on my own to remove .wink.conf to redo the Wink setup upon HA restart, but I sure wish I knew why this keeps happening.

I am not positive why it is happening, but I think I have somewhat of a fix. Basically the token is expired and the refresh while HA is running isn’t saving in the config. I should have a “fix” for this, to call refresh on startup if it fails. I’ll try to get it added soon but I have been really busy lately.

1 Like

I sure appreciate your time - both in responding to my concern so quickly, and in working towards a resolution when you can.

Thanks!

Great news. Thanks a lot.

Hi W1lliam23,

My Wink configuration was lost again yesterday, and twice today. This appears to be occurring now after every HASSIO restart.

At least it’s “only” a 10-15 minute process to recover from it, but it sure is strange a restart could be causing the token to expire.

Agreed, that is strange. How are you restarting? Can you try to stop and then start and save the log from before and after? Also probably turn in debug logging at least for wink.

I’m connecting to Hassio via SSH, modifying the config, and restarting via “hassio ha restart”.

I’ve added the debug logging, and have restarted multiple times, and Wink component is holding steady for now.

Since my last reply when Wink component was working fine, the Wink “Invalid Config” occurred again after a restart…

2018-03-26 09:53:31 WARNING (MainThread) [homeassistant.setup] Setup of wink is taking over 10 seconds.
2018-03-26 09:54:30 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink
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.SSLEOFError: EOF occurred in violation of protocol (_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=‘api.wink.com’, port=443): Max retries exceeded with url: /oau

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, 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 427, in setup
hubs = pywink.get_hubs()

So now that I see from debug info that the Wink error is related to a connection/timeout related problem and not expired tokens, I found that just restarting Hassio can clear up the problem, just as it can trigger it.

Seeing that “Wink Invalid Config” error message on the dashboard was leading me to unnecessarily removing .wink.conf and starting over with the config each time. Maybe it would be possible to detect the type of error that occurred before stating the configuration (keys) are invalid? Possibly adding a “Reconnect” button built in to try again?

My RasPi3 is connected directly to uVerse router via Ethernet. No LAN issues that I know of. I guess something in the Internet connection or Wink oauth server is occasionally choking. At least I know now to restart Hassio if this occurs again.

EDIT: Should “wink:” remain in configuration.yaml after a successful configuration? I’m seeing Wink working without it being listed on a new build I’m testing, so am confused. It’s still listed in the system I’m having trouble with.

Wink doesn’t need to be there in the config if discovery is on. You can’t modify the config while HA is running, doing so will be pointless once you restart because HA writes the config on shutdown. If you need to modify the config/delete it you MUST stop HA and then do whatever to the file.

I am not sure what is causing those SSL error, I believe others have seen similar issue and changing DNS servers help, but u could be wrong about that. If you haven’t tried already can you set your DNS to Google’s
8.8.8.8 and 8.8.4.4?

The “config” I was referring to that I was modifying was configuration.yaml. I’m very early into Hassio setup and am adding/changing a lot of stuff as I learn. That’s why I am restarting Hassio so often and maybe seeing this problem more than most. I fully understand there is no point modifying .wink.conf which I think is the config file you are referring to.

It appears the Wink component just says “Invalid Configuration” when any sort of error error is detected - right? Just saying that maybe a bit more clarity about what to look for may be in order especially since there actually isn’t any configuration at all in the yaml (except for legacy Wink oauth users).

My AT&T router doesn’t allow reconfiguring DNS, but I will change the setting locally on the Pi. Thanks for the advice and for looking at the problem!

UPDATE (3 days later):
updating DNS seems to have solved the problem with the “Wink Invalid configuration” error (which was actually SSL connection timeouts and had nothing to do with any Wink configs). After many HA restarts the past few days it’s been stable.

I just installed a new Chamberlain MyQ-enabled garage door opener, which works fine via Wink, but view-only with no door control via Home Assistant (a known limitation).

I have also installed the “myQ Cover” component which is working great and provides full control. My issue is that I now have two identical garage door entries listed in the Cover box, one works fully, the other doesn’t (except to show status).

Is there a way to exclude specific devices from the Wink component in the yaml so Hassio ignores them?

It would also be nice if the Wink cover documentation mentioned the availability of the MyQ Cover component as a solution to the serious Wink>MyQ control limitation that was mandated by Chamberlain.

Good call on the doc, feel free to add it to the doc just click on the “edit this page with GitHub” link. As for ignoring the other cover, that functionality is coming soon I hope. I had it started/working but wasn’t to the standards and didn’t get added. I have been super busy lately so I haven’t got around to taking a stab at it again. In the meantime, you can hide the wink entity in your customize.yaml and it won’t be visible in the frontend.

Thanks for the customize tip!

I’ve submitted the Wink GitHub doc update. Hope it meets your approval.

@w1ll1am23 - It appears that the update on GitHub I submitted was never implemented and I can’t tell if this was because it failed to post, was never reviewed, or was deleted. This was my first attempt at a GitHub update so it’s possible I didn’t do something right, but my edits appeared to be submitted properly.

Hmmm the update should be super quick, after you edit with the link from the site the site should be updated in about 15 minutes. Maybe you didn’t click the final submit button?

I never expected my update to take effect without it first being reviewed by someone. I thought that might be you. I get this notice when editing the wink.cover.markdown info on GitHub…

You’re editing a file in a project you don’t have write access to. Submitting a change to this file will write it to a new branch in your fork GaryOkie/home-assistant.github.io, so you can send a pull request.

After making the changes, I click the green button “Propose file change”. And that was it.
I’m unclear what else I should do, in particular, if I now need to make a “pull request” and how to go about doing that.

Thanks for any advice.