HA stops reporting Wink state changes

Awesome! Thank sounds like a good plan.

Yeah, you’re right with the websocket. It would only not present correct to the frontend.
Here is a screenshot. On the left side is my main HA with failed Wink light status and on the right is my test HA which was just started and is reporting the Wink light status correct.

I will let the test HA run for the rest of the day and hope the log file is helping to resolve this issue.

Wrote a quick python script which is checking the light status via HA Python API.
Here is the result which shows that HA is thinking the lights are off. The sofa reading light is on.

root@orangepipcplus:~# ./test.py
Sofa Reading is off.
Sofa Ceiling is off.
root@orangepipcplus:~#

So it seems that the status is not reported correct to HA. Let’s see what the log is showing later.

I have automation based on light States and indeed it does fire, just not correctly since the state is incorrect.

Are you running two instances of HA at once?

Once this starts happening again, can you use this https://www.pubnub.com/docs/console and enter your subscription key and channel (you can obtain them from wink@home) for one of your devices and trigger a state change, see if the pubnub console sees it. If it does, can you send me the response?

Also what happens if you call the wink version “refresh state from API”? do the states get corrected on the frontend? Any errors after calling the service?

I’m running HA on 2 different devices. One is my Main HA the other one is my development and testing HA.

Adding the service call to refresh the state from wink in my test python script brought the status back to live.
Here is the output:

root@orangepipcplus:~# ./test.py
Sofa Reading is on.
Sofa Ceiling is off.
root@orangepipcplus:~#

The test HA is still working normal. one of the lights is getting switched on every 30 minutes and after 30 seconds off again. I’m waiting for it to fail and I will have a look into the log file.

care to share that python script? Please. :slight_smile:

1 Like

I just did a small test.
I toggled one of my lights with HA to “on” and showed the “off” state in HA. Then I opened the Wink app on my Iphone and it showed the “on” state. I toggled the same light “off” and then back “on” and it changed to the “on” state in HA.
Checked a few other lights and everything is all good for now.
Hmmmm

1 Like

Yeah. It also seems to work for me. For 10 hours no issue. I will let my test run for longer and see if the issue shows up again.

@turboc here is my script - a quick and dirty job before I had to leave for work. Remove the “.yaml” at the end.
test.py.yaml (577 Bytes)

Yup. Second day in a row. HA does not show the states changing from my Wink hub. I open the wink app on my Iphone and toggle a light and then HA shows the states right.

Had issues like that for about two weeks now as well.
I received the client_id and client_secret info yesterday to set it up in the recommended way:

wink:
  email: YOUR_WINK_EMAIL_ADDRESS
  password: YOUR_WINK_PASSWORD
  client_id: YOUR_WINK_CLIENT_ID
  client_secret: YOUR_WINK_CLIENT_SECRET

Did that make a difference for anybody?

I switched to he API method several weeks ago and am still having this problem.

Stranger still today. Usually it either is or is not communicating between HA and Wink. Today I’m noticing that things I changed in the Wink app have updated in HA. But other items that were changed from HA or manually are not showing changes. One error keeps popping up after today’s reset, but I don’t know if it’s relevant.

17-02-18 23:11:00 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_track_state_change.<locals>.state_change_listener(<Event state_...d_deck_string>) at /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/event.py:59
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/event.py", line 79, in state_change_listener
    event.data.get('new_state'))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/core.py", line 234, in async_run_job
    target(*args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/automation/state.py", line 87, in state_for_cancel_listener
    async_remove_state_for_listener()
TypeError: 'NoneType' object is not callable

Not sure about that error, but there are been reported API issues for the last few hours. Look here http://status.winkapp.com/

Man, I don’t know if I’ve been lucky or what, but despite having a bunch of connectionpool errors and EOFs from Nest, DarkSky and even Plex, Wink has been silent and steady as a rock. No errors, no problems with states.

1 Like

Thats how it has been for me. I feel bad for everyone here having problems, but the lack or errors in the logs makes this one the most difficult problem I have seen.

It is also working stable for me. No error or indication what could have caused the problems. @w1ll1am23 don’t feel bad. You have done a great job with the Wink integration and you’re really helpful with troubleshooting this issue.

2 Likes

I’ll second that. And I’ve come across @w1ll1am23 in the Wink subreddit looking to do even more research. I am sure you’ll figure it out and we’ll all help wherever we can.

1 Like

Previously you gave some advice to do a manual update via the dev page (but I forget what it was exactly) , and also a while back, a script to poll that kept things in sync. Are those things worth trying in this situation? (I’m not suggesting it’s the exact same problem necessarily…)

I’m not sure if what I’m seeing is related or not. but it’s like the main page on my HA screen locks up, the tabs work fine and report fine with wink and other things. But it’s like the main page won’t talk and if I happen to refresh it to try and get it to wake up, it just goes away. But like the others no errors.