HA stops reporting Wink state changes

Hmmm, I am going to hope you did something wrong :grin: @dspille are you having any luck?

Unfortunately, I am also still having the issue after updating to include your pull request.

:disappointed:well crap. Okay, can you guys test again with the newest file I just pushed? I was trying to call the new get_user function as well as the wink_api_fetch function. I changed it to only call the get_user function since that is the one that appears to fix yā€™alls problem. However I am worried that might cause issues for other people. Like me. When I was having this problem initially I had to call the wink_api_fetch function to fix it. Hopefully calling get_user will work for everyone.

I changed the python script that you provided to call https://api.wink.com/users/me/wink_devices/ instead of https://api.wink.com/users/me. Which I believe is what the wink_api_fetch function calls (Correct me if I am wrong. Just did some quick digging through your python-wink code) and the states started updating correctly. Seems like it is more of the call not getting sent as opposed to which call to make?

That doesnā€™t make senseā€¦ that is currently being called today for all users. That was the original fix that I added awhile back. It sounds like maybe both things need to be run? Based on what you just did?

I changed my local copy to logs more details on the requests being made. I am trying to make both requests still. We will see what happens with that. There is a chance the calls were being made too quickly so it wasnā€™t working.

I havenā€™t had a chance to test the fix that @w1ll1am23 provides on github, but my previous install with the automation still seems to work fine.

No, I changed it to only call the /me/wink_devices. I did not call /me. Thatā€™s why I am thinking the call that is currently being used for everyone is not getting sent in mine (well, everyone having this issue) for some reason? Think it would also explain why the timetoken stays the same. The call is never getting made so the timetoken is not updating for pubnub.

I am not sure how that could be happening. I know everyone has reported that they are seeing the log message ā€œPolling the APIā€ and no one has reported any trackback errors after seeing that in the logs. I have also had users manually call the /user/me/wink_devices endpoint with postman which didnā€™t work. I think you and I may have tried that initially? It wanā€™t until you made the call to /users/me that everything started working. That is what is making me think calling both fixed it. It is possible that maybe the get_user call was making it though automatically via HA and once you called /user/me/wink_devices externally it started working again? idk just guessing.

Everything is a guess at this point. I am going to start up my regular version of HA (41.0) that should be before any of these new changes were made. When the states stop updating, I will use postman to manually call the /me/wink_devices endpoint and let you know the results. (We did not try that initially, you gave me a list of 10 or so endpoints to call and the first one I tried worked)

@dspille any chance you can provide me with the systemctl log file for the new version of the wink.py you are running?

If you run this journalctl -u [name if has service].service > /somelogfile.txt it should provide you with all of the output form the HomeAssistant process. It looks like, for some reason the call being made by pubnubsubhandler isnā€™t being made in some cases. I never see this problem on my system, but @shire210 confirmed that his are never issued. @shire210 is running in Docker so isnā€™t able to get the systemctl logs. I would like to see if anything in there will point to the issue.

@w1ll1am23 Iā€™d be happy to help. I am using Hassbian on a Raspberry Pi, and I tried running journalctl -u home-assistant.service > somelogfile.txt from both the pi and homeassistant accounts, and I get a No journal files were found. message. Any ideas? home-assistant.service is what I use from the pi account to start/stop/restart the service.

@w1ll1am23 I was able to get it to run with the following command sudo journalctl -u home-assistant@homeassistant > winklogfile.txt. I also had to rename the log file with an xml extension to be able to upload it here (not sure if there is a better way). Let me know if I need to try something else.

winklogfile.xml (745.1 KB)

That is what I needed, but it looks like your logging level is too low. Could you set your logging level like so

logger:
  default: debug

Then run Homeassistant until you stop receiving updates, and re-run the command above and send that log? Then make sure you remove the debug portion from your config, running on a Pi you will end up burning up your SD card a lot quicker.

I will do that and post back here.

1 Like

@w1ll1am23 Here is the latest log. File was too big to upload, so here is a dropbox link.

This was after things stopped working? Not seeing anything unfortunately. I am considering/testing now, moving the calls into homeassistant out of pubnubsubhandler. This might give us a better look at whatā€™s going on. Iā€™ll post a new wink.py for everyone to test with later today, if it wors for me.

Can you post the instructions on how to install the wink.py and how I can help too please?

1 Like

Of course!

Yes. I was up early this morning and noticed it stopped reporting state, so I went ahead and posted the log. Not sure the precise time it stopped reporting.