HA stops reporting Wink state changes

I have been so busy I did not have a chance to try out the new file. Do you think it will be in the next update of HA?

Yes, it will be in the next release.

3 Likes

I have a problem with wink but it’s not exactly the same as what seems to be reported here, but it’s close. It effects lights specifically as opposed to switches.

When I use HA to turn off a light, the physical light turns off, but it takes up to a minute for the icon to turn from active to inactive.

Other than being somewhat confusing to look at, the real problem is that apparently additional status messages from Wink are placed on the buss and AppDaemon sees them as if the light changed state and triggers automations associated with turning the light on. Wink does not actually quit responding, other switches and lights continue to work so it’s not an issue with losing connectivity to wink. Switches work immediately with no delay and no extra messages on the buss. I have put in tests to the old and new states to see if only processing commands that actually result in a on/off or off/on do anything, but that is a little problematic when I want to dim a light.

Wow, a minute? Mine will take a second or so, shifting between on/off depending on what I am switching to and have since I integrated them into HA at the start. This has gotten better over time of course, mostly due to @w1ll1am23’s refactoring of the component.

I’ve always referred to it as the “Wink bounce” as it ‘bounces’ between states for a second. I just assumed this was normal behavior as the ‘state conversation’ went on between HA and Wink and got used to it. But up to a minute is an issue.

I’m wondering if @w1ll1am23’s upcoming code will address your issue? Have you tested it yet?

I thought It went in with the last code release?

Did it? I haven’t updated because I’m afraid to mess with my ZWave config. 44 requires you manually update Python Open Z-Wave, right?

I planned on waiting until the next version where it was part of the install hoping to avoid mucking up a working ‘black box’ ZWave set up. I guess I just worry about messing it up when it seems to be working.

Anyone feel like testing this https://github.com/home-assistant/home-assistant/pull/7818

You need to have a client id and client secret and you only need to have

‘’’
wink:
‘’’

In your config. It should walk you through the process with cards on the frontend. If you have any feedback let me know. Still a work in progress.

Should be able to just drop the wink.py into the config/custom_components folder.

1 Like

Hey, finally getting a chance to test this and just wanted to ask; Is this going to work with a Default View in place? I load - persistent_notification.invalid_config as part of the view, so I should be covered, but I just wanted to make sure.

I also have an off topic question that I’d like to ask about Wink, but I’ll PM you on that if that’s ok with you.

That is a good question I am not sure, would be good to know. And questions/suggestions are always welcome.

1 Like

@w1ll1am23 I can open a github issue if it is more fitting but I am seeing the following.

Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 368, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 222, in async_add_entity
    yield from entity.async_added_to_hass()
  File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro
    res = func(*args, **kw)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/binary_sensor/wink.py", line 108, in async_added_to_hass
    self.hass.data[DOMAIN]['entities']['binary_sensor'].append(self)
TypeError: list indices must be integers, not str

Is that in production? If so go ahead and open an issue and I’ll take a look later today hopefully.

Just started for me after upgrading to 0.46.0

My apologies @w1ll1am23 I had a wink.py custom_component I had forgotten about.

It is working now and I closed the Issue.

Good deal, that makes it easy.

Hey guys,
Just wondering if you could help me out. I updated to 0.46 on the weekend and now my Wink Hub is not seen by HA anymore. Here is my error log below:

2017-06-07 04:09:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step result = next(coro) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 368, in async_process_entity new_entity, self, update_before_add=update_before_add File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 222, in async_add_entity yield from entity.async_added_to_hass() File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro res = func(*args, **kw) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/binary_sensor/wink.py", line 108, in async_added_to_hass self.hass.data[DOMAIN]['entities']['binary_sensor'].append(self) TypeError: list indices must be integers, not str 2017-06-07 04:09:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step result = next(coro) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 368, in async_process_entity new_entity, self, update_before_add=update_before_add File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 222, in async_add_entity yield from entity.async_added_to_hass() File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro res = func(*args, **kw) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/wink.py", line 43, in async_added_to_hass self.hass.data[DOMAIN]['entities']['light'].append(self) TypeError: list indices must be integers, not str 2017-06-07 04:09:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step result = next(coro) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 368, in async_process_entity new_entity, self, update_before_add=update_before_add File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 222, in async_add_entity yield from entity.async_added_to_hass() File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro res = func(*args, **kw) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/wink.py", line 43, in async_added_to_hass self.hass.data[DOMAIN]['entities']['light'].append(self) TypeError: list indices must be integers, not str

I’m sorry I should have done some more reading. I too had a wink.py custom_component I had forgotten about. All good now :slight_smile:

1 Like

Can someone that was having this updating issue please test out https://github.com/home-assistant/home-assistant/pull/8208 and make sure it still works?

I get the following error:

2017-06-26 09:47:39 ERROR (MainThread) [homeassistant.config] Invalid config for [wink]: [client_id] is an invalid option for [wink]. Check: wink->wink->client_id. (See /home/hass/configuration.yaml, line 126). Please check the docs at https://home-assistant.io/components/wink/
2017-06-26 09:47:39 ERROR (MainThread) [homeassistant.setup] Setup failed for wink: Invalid config.

Here’s the relevant YAML which works fine in the production version:

#
# Wink API
#
wink:
  email: !secret wink_email
  password: !secret wink_password
  client_id: !secret wink_client_id
  client_secret: !secret wink_client_secret

Sorry I should have provided some instructions on how this works lol.

There will no longer be any credentials in the main configuration.yaml just

wink:

When using oauth, the credentials will be stored in a newly created .wink.conf file.

So for the moment, cment out everything under wink and try again.

I downloaded your pull request and added to the custom_components folder, but I hadn’t yet requested the new oauth credentials (oops). Is there any way to revert to the previous configuration? When I remove wink.py from the folder and restore the the configuration.yaml file, it’s no longer detecting the wink components. It states it may take a few days to get the new credentials.