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.
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
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.
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.
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.
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.