HA stops reporting Wink state changes

Thanks. I will try to help any way I can.

If everyone having the issue could try this new wink.py file. https://hastebin.com/buzajutamo.py

inside of your configuration folder, make a new directory called custom_components and place this file in there. Make sure it is named wink.py

Restart your homeassisant.

Every hour on the hour you should see Polling the Wink API to keep PubNub updates flowing. in your logs.

Also make sure you set your logging level in your config to debug while we test this.

This no longer polls the Wink API via the pubnubsub library, it instead uses a built in method in HomeAssistant called track_utc_time_change to execute the API call. If this fails for some reason, we should get a clearer picture of what is going on since since it is running from homeassistant not an external library.

Fingers crossed that this just ends up working, and we can finally get everyone fixed!

If it doesn’t work, please provide your HomeAssistant logs,or at least look for any Traceback messages after your see the Polling the Wink API to keep PubNub updates flowing. message, and reply with those Tracebacks.

Thanks!

1 Like

This is my first time doing this. Do I need to call it from my configuration?

All you have to do is put the wink.py file in that folder and restart. When HA starts up it checks that folder for any custom components/overrides for existing components and loads it.

All done.
I toggle my dining room light that is controlled by the wink. It turns on but does not show the state of “on”

That’s after a restart with the new wink.py? That shouldn’t be happening. Is that what you have been seeing? Meaning it doesn’t ever work? Most people are seeing an issue where it stops working after so many hours, not not working at all.

Everything is working as expected using this new wink.py file for me so far. I will check back once it has been running for a few hours and make sure everything is still working.

1 Like

Yes. I can control the light but no states change. It use to work for a few hours at times but nothing now.

Did it load the component from the custom component? You should see this in your logs:

Loaded wink from custom_components.wink

Yes I can see that it loaded

Interesting, call the refresh_state_from_wink and make sure the state changes. Then wait for the next hour change (here in like 15ish minutes) and check your logs for the Polling... message I mentioned above. Then see if you change the light again if it will work.

What type of light is it?

I call the refresh state and it will then show the proper state but only once.
It is a Lutron pico dimmer.

You should send me your logs. Also, if possible. Log into wink@home find that light and click on the little i in the bottom right corner. That will pull up a window with a box in it that contains the device JSON. PM that JSON to me. Not sure if I have ever seen the JSON for one of those lights, it is possible something strange is going on with it. Causing your problem.

Sure. Do you need the whole JSON or can I take out the personnel stuff?

Yeah take out the pubnub details and location that should be all of the possibly harmful personal stuff.

@Dayve67 how are things working now? Should have run the API polling command twice by now.

Still the same :frowning:
States dont change.
Did you get my log file I emailed to you?

I did, not home at the moment so I can’t look at it very close. What happens if you open up the official Wink app, does everything start working again?

Yes. If I open the app it all works great.
Oh now I see there is an update for the Wink Hub. Hmmmm

Just installed. I’ll let you know how it goes.

fingers crossed

Thanks for all your help and patience with us.