Wink/PubNub not updating

Any idea why I would be getting the following error using the custom_component?

Error during setup of component wink
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/wink/__init__.py", line 332, in setup
    sub_details = pywink.get_subscription_details()
AttributeError: module 'pywink' has no attribute 'get_subscription_details'

I am on HA v91.4

Hi @w1ll1am23 – I have an older version of HA (0.56.2). Can I install the custom component, or should I upgrade to the latest HA version to get the updated Wink support (which version contains your update?).

And big thanks for fixing this!!!

Wink has been driving me off the wall lately with their outages. I eventually will go to a Z-Wave/ZigBee stick or SmartThings.

Apparently my version of HA/Python is too old…

File “/root/.homeassistant/custom_components/wink/init.py”, line 771
async def async_added_to_hass(self):
^
SyntaxError: invalid syntax

I would recommend updating but that would probably be a ton of work. So much has changed between then and now. If you want to try that go for it, if not let me know and I could put together a custom component that should work for you.

I really appreciate all the work you are doing…
I have tried a few times to add this custom component to fix my wink but something is wrong. I am on version 90.1.

This is the error I get

Error during setup of component wink
Traceback (most recent call last):
File “/usr/src/app/homeassistant/setup.py”, line 154, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/wink/init.py”, line 332, in setup
sub_details = pywink.get_subscription_details()
AttributeError: module ‘pywink’ has no attribute ‘get_subscription_details’

1 Like

The correct version of python-wink isn’t getting installed. Something is cached or something.

Try to manually install

pip3 install python-wink==1.10.4b1

thanks, yeah I am using docker so that must be the issue and I really have no idea how to upgrade the python-wink since it is in docker… but thanks for confirming that

Hello W1ll!! i appreciate your job, i have the same problem as harfordhawk, is it posible to install it ussing this?

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.2
timezone America/Monterrey
version 0.90.2
virtualenv false

It must have been cached, as the manual install did install the new version. However, I am now getting a different error message. Any ideas on this one?

Error during setup of component wink
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x68ddb030>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/homeassistant/lib/python3.5/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: /users/me/wink_devices (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x68ddb030>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/wink/__init__.py", line 332, in setup
    sub_details = pywink.get_subscription_details()
  File "/srv/homeassistant/lib/python3.5/site-packages/pywink/api.py", line 662, in get_subscription_details
    response_dict = wink_api_fetch()
  File "/srv/homeassistant/lib/python3.5/site-packages/pywink/api.py", line 685, in wink_api_fetch
    response = requests.get(arequest_url, headers=API_HEADERS)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.wink.com', port=443): Max retries exceeded with url: /users/me/wink_devices (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x68ddb030>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

That’s not related. I know I have seen other users report the same thing and it has always turned out to be network related in some way. Some users had pihole setup and it was causing issues.

hi. @harfordhawk and @revsmitty I finally get it work. Just rm the container and re create it with the custom component installed. Everything is ok now. @w1ll1am23 you rock guy !
Thanks !

I went ahead and created a Hass.io installation. Of course, it still doesn’t work for me, but I no longer have the same error. LOL

Hmm… that’s odd, I don’t have a complicated setup (no pihole for sure). Do you think this is worth troubleshooting further, or should I just start over with the Hass installation? I’m on the current version of HA, but I’ve been updating the same install for a number of years now. I have tried reverting and removing the wink custom_component, but when I add it back this error message returns. I’m concerned that when the pull request makes it into production, I’m going to see this same error, and probably end up having to reinstall in any case.

Yeah its a DNS issue for sure so maybe try changing the DNS on your pi to point at Google’s DNS? If that doesn’t work I would try a reinstall

Are you running your pi on wifi or ethernet? I was having major issues using just wifi on my pi, and when I switched to ethernet, everything was much better.

Basically, when I was on wifi, every time I restarted hassio, it would not be able to communicate with Wink. Only way to resolve was to stop homeassistant, remove the wink config file and re authenticate with wink.

I’m running on ethernet. I’m still seeing the issue after changing to use Google’s DNS. Should I try removing the wink config file and re-auth?

Not sure if this is related, but I went ahead and removed the wink config file to re-authenticate, and when I went to the https://developer.wink.com site, the application I had created last year was no longer there. I was no longer able to authenticate to the developer site with the previous credentials I had created. I had to use either Google or GitHub oath. I am now awaiting approval from the developer site. I’m seeing “Your OAuth Client ID and Client Secret will be assigned when your application is approved.”

Well, I received the new wink ID/Secret and re-authenticated, and still getting the error. Time to reinstall I guess.

I’m getting closer I think. My error is slightly different now than the rest of the users:

2019-05-07 18:38:53 ERROR (EndpointThread-Subscribe-0) [pubnub] Exception in subscribe loop: HTTP Client Error (400): {"error":"Bad Request","message":"Client Error","statusCode":400}
2019-05-07 18:38:54 ERROR (EndpointThread-Subscribe-0) [pubnub] Exception in subscribe loop: HTTP Client Error (400): {"error":"Bad Request","message":"Client Error","statusCode":400}
2019-05-07 18:38:55 ERROR (EndpointThread-Subscribe-0) [pubnub] Exception in subscribe loop: HTTP Client Error (400): {"error":"Bad Request","message":"Client Error","statusCode":400}

Any idea what is amiss with this?

-Thanks

Everything is working now after reinstall of Hassbian and remembering to update to Google’s DNS. Thanks for all the help. :sweat_smile: