Wink/PubNub not updating

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:

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?