Wink/PubNub not updating

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:

Home Assistant in a docker container.
Running latest dev build
Getting these errors every minutes in log:
2019-05-07 21:44:11 ERROR (EndpointThread-Subscribe-0) [pubnub] Exception in subscribe loop: Connection Error: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

Already tried deleting Wink integration and performed new integration with Wink and getting the same error.

Same issue here, no fixes worked.

This isn’t an error you need to worry about. This is how Wink is handling the subscription, it disconnects and reconnects with a new connection. The fix for this is Wink to stop the disconnects/handle them more gracefully.

If you want to eliminate these once a minute subscribe loop errors from spamming your log, update your logger in configuration.yaml to add pubnub: critical

logger:
  default: warning
  logs:
    pubnub: critical

this error is unfortunately causing my automations to not work anymore, or at least not control wink items.

You are seeing the remote connection error or the bad request error?

Me too. Wink support wasn’t interested in helping.

Exception in subscribe loop: HTTP Client Error (400): {“message”:“Invalid Subscribe Key”,“error”:true,“service”:“Access Manager”,“status”:400}

and

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘ps.pndsn.com’, port=443): Read timed out. (read timeout=10)”)’: /v2/presence/sub-key/sub-c-f7bf7f7e-0542-11e3-a5e8-02ee2ddab7fe/channel/5806c6cd3b416a5dc5f3b2814cdc04d275e766b7%7Clight_bulb-4039922%…etc

wink app itself works fine obviously but no control from HA to Wink

It doesn’t look like the custom component loaded for you. Can you check your directory structure again? Also what version of ha are you running?

92.2 the latest but ya i havent tried the custom yet ill do that

Hi @w1ll1am23

Awesome effort, Thanks for that.
I’m running 0.92.2 on linux docker and before your custom_component the switches were not updating on clickin on them, they alwgays revert to its previous state.

Now thanks to you, after installing the custom_component, the state is updated immeidately after clicking on them which is great!.
Nevertheless if I change the state of the switches from Google Home (published switches from HA) or from winkapp directly, the state is not updated in HA, not sure if I’m still missing something here or if I’m alone in such behaviour.

So do they never update or does it just take a really long time?

It seems they never get updated, it has been more than 30 minutes now since I change the state of a switch which wasn’t reflected until now in the Lovelace ui

Although I see now in the log:
Exception in subscribe loop: Connection Error: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

So I restarted the HA and then retried immediately and now the state is being updated normally even if the change is coming form Google home / Winkapp

It seems for some reason after sometime the subscription/connection gets disconnected

Quick update:
Now I get the error again but even with that the updates are working normally, not sure what happened to be fixed alll what I did is restarted the HA second time after installing the custom_componentn, will keep an eye on it if it happens again, here is the current error in which is not affecting the updates so far:
Exception in subscribe loop: Connection Error: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))
2:07 AM /usr/local/lib/python3.7/site-packages/pubnub/pubnub.py (ERROR) - message first occured at 2:02 AM and shows up 5 times

Yeah those errors are from Wink disconnecting on their end. Not sure why they are doing it. But you should be okay.

You sir, are a genius. I had to manually update the needed packages in the docker container but my wink thermostats are once again responding properly HASS. Thank you!!!

Will these fixes be included in a future Hassio release?

I’m having the same " HTTPSConnectionPool(host=‘ps.pndsn.com’, port=443): Read timed out" issue but I haven’t loaded the custom component yet either. I’ll try that today at some point.

This Wink update should be in the next 93.0 release.