Wink/PubNub not updating

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.

Thank you @w1ll1am23 for an awesome fix. Yesterday I added your fix and so far everything working correctly. This issue boggling my setup for last week since Wink outage. I need to find a way to get out this Wink hub mess.

Thanks for the fix! confirmed working on a Vmware VM.

Great to hear. Thanks for the update

I’m running in Docker so I had to manually update the pubnubsub and python-wink versions but once those were done and the custom_component added, all is back to normal. Thanks for all the hard work on this!!

Okay, installed the custom_components/wink stuff. Locks work, thermostat/HVAC works, but my kitchen and attic temp/humidity are all stuck at 77.7 degrees and 77% humidity… for days.
Looking at them on my Wink phone app show correct readings though.
Wink 1 hub (one local, one remote) PI3b+, HA 0.92.2 HassOS 2.11 Supervisor 162

Do you think the new release will fix my Wink integration once official, or more than likely be in the same non working state as it is now with the custom components?

The particular error you reported is one I’ve not seen anyone else report. Maybe if you add pubnub: debug to your log it could give us a clue?

Where would I do this at? Sorry, only been using this for a few weeks.

see post 215 in this thread. Just change critical to debug. Also see logger doc to read up on it.

Can anyone help diagnose this error applied the custom component and used the command line to update pubnubsub to v 1.0.3v3 and python-wink to 1.10.4b1 running hassio V 0.92.2 on raspi3

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 156, 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 334, in setup
origin=pywink.get_subscription_origin())
TypeError: get_subscription_origin() missing 1 required positional argument: ‘device’

Are you downloading the same version that’s listed in the manifest.json in the Wink folder? If not it will get overridden when you restart with a different version. That error is for an older version of python-wink.

I added this to the log

  default: warning
  logs:
    pubnub: debug

May you confirm that is correct?

-Thanks

If it’s not too much trouble, a custom component I can use until I upgrade will be great!

In the meantime I can prepare to upgrade to the new version of HA (will install it in a Linux VM to fix/test my scripts) and see how I can upgrade my scripts/configs – so to hear this may take some time.

assuming those statements are below logger: and indented properly as was shown in post 215, yes - that’s correct. You can also confirm syntax is correct yourself via Configuration - General - Check Config

In your homeassistant.log you should see a warning about loading wink custom component followed by pubnub debug statements. If you don’t see the wink warning, you didn’t load the custom component properly.

Try dropping this https://drive.google.com/file/d/1gxV2alqBRgRZwliUC40ZK7C-M7A73kB8/view?usp=sharing in to HA_CONFIG_DIR/custom_components/ and unzip it.