Wink/PubNub not updating

I deleted all the folders and now have this in the Home page:

image

Log:

2019-05-26 18:58:03 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.154
2019-05-26 18:58:03 WARNING (MainThread) [homeassistant.config_entries] Config entry for hue not ready yet. Retrying in 5 seconds.
2019-05-26 18:58:05 ERROR (Thread-5) [pychromecast.socket_client] [AFTN2:8010] Exception caught while sending message to controller ReceiverController: Message urn:x-cast:com.google.cast.receiver from receiver-0 to sender-0: {'requestId': 2, 'status': {'applications': [], 'isActiveInput': True, 'volume': {'controlType': 'attenuation', 'level': 1, 'muted': False, 'stepInterval': 0.05}}, 'type': 'RECEIVER_STATUS'}
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py", line 565, in _route_message
    message, data)
  File "/usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py", line 899, in receive_message
    self._process_get_status(data)
  File "/usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py", line 1029, in _process_get_status
    status = self._parse_status(data, self.cast_type)
  File "/usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py", line 1007, in _parse_status
    app_data = data['applications'][0]
IndexError: list index out of range
2019-05-26 18:58:15 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform ring is taking over 10 seconds.
2019-05-26 18:58:15 WARNING (MainThread) [homeassistant.components.camera] Setup of platform ring is taking over 10 seconds.
2019-05-26 18:58:57 WARNING (MainThread) [homeassistant.setup] Setup of wink is taking over 10 seconds.
2019-05-26 18:59:00 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform plex is taking over 10 seconds.
2019-05-26 18:59:00 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform plex is taking over 10 seconds.
2019-05-26 18:59:13 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink
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 "/usr/local/lib/python3.7/site-packages/homeassistant/components/wink/__init__.py", line 535, in setup
    sirens.append(WinkSirenDevice(siren, hass))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/wink/__init__.py", line 663, in __init__
    self.wink.pubnub_channel, self._pubnub_update)
  File "/config/deps/lib/python3.7/site-packages/pubnubsubhandler.py", line 81, in add_subscription
    self._pubnubs[0].subscribe().channels(channel).execute()
IndexError: list index out of range
2019-05-26 18:59:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:13 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.
2019-05-26 18:59:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wink: Unable to set up component.

FYI: Putting the old file back in place does populate wink objects again in a non working state.

Okay, you aren’t getting the same error again which is what I wanted to check. Let me take a look and see whats going on here.

1 Like

So I am not sure why you are getting that error, but this new file might help.

Try to swap this in place of the current file and see what happens.

This delays the subscriptions from starting for 60 seconds after the Home Assistant Started event it triggered.

1 Like

This seems to have worked. I’m also seeing Wink events in the logbook.

1 Like

Sweet! Well feel free to run it as is, and I will work on getting an MR open for the library bump. I would like to to test the final version once it is done prior to me merging it in though. I’ll let you know when.

All my old automations are working again. I have also bounced my instance a few times and it keeps coming up correctly. Thanks again for looking at this,

No problem, glad it ended up being an easy fix.

1 Like

So I had a free minute, go ahead and give this a shot.

place the wink folder in this zip inside of HA_CONFIG_DIR/custom_components/ and restart.

Might be best to delete the pubnubsubhandler files in your deps directory again to make sure it is pulling the new pubnubsub-handler version 1.0.5

You can verify it downloaded and installed the new version if you look at your logs after the startup is finished and searching for ==1.0.5

Works perfectly! pubnubsub-handler updated to 1.0.5, and the errors are completely gone. Thank you so much for the fix.

No problem, let hope that all this changing means Wink is actually sticking around and they will start pushing to improve their up time and push update speed.

MR has been opened https://github.com/home-assistant/home-assistant/pull/24154

Hi,

Can you check CPU usage after this change? I see between 13% and 20 % at all times. Going back to old version (production) and system will show between 1% and 3%

How many devices do you have

No a lot- 7-8 sensors and one light.

Oh crap, thanks for catching this. For my testing I was creating a new pubnub every 3 channels (I have less than 50 to test with) and I pushed it with 3 not 50! I will get this fixed right now.

Can you test again change the mainifest.json in the custom component about bump the pubnubsubhandler version to 1.0.6

Thank you very much, I have changed it and it works fine.

“pubnubsub-handler==1.0.6”,
“python-wink==1.10.5”

Cpu at 2% now

1 Like

Anyone else no longer getting pubnub updates? I’m on 0.93.1. I can control the lights but don’t get sensor updates and the light state does not refresh.

Only error I am seeing in the log is the error in subscribe loop that seemed pretty benign since wink moved the notifier in house.

Edit: nevermind, seems to be working now, with no changes on my end

@w1ll1am23, I am having this warning

    Connection pool is full, discarding connection: notifier.wink.com
Connection lost. Reconnecting…

on my hassio 0.93.2 and pubnubsubhandler version to 1.0.6

Are you having any issues with push updates?