I can test as well. Although I haven’t been having the same problems you were so maybe that won’t be much help…
@brg468 @rabittn sweet, thanks. I will let you know what needs done as soon a the python-wink Pull Request gets merged. The process is much more complicated without being able to download the correct version of python-wink using pip.
@w1ll1am23, I just updated to version 0.33.2 and now I’m getting this error:
16-11-22 15:40:51 homeassistant.bootstrap: Attempt made to setup wink during setup of wink
16-11-22 15:40:51 homeassistant.bootstrap: Component wink failed to setup
16-11-22 15:40:51 homeassistant.bootstrap: Unable to prepare setup for platform sensor.wink because dependency wink could not be initialized
Sometimes its sensors that don’t load other times its lights, and occasionally it works correctly but not very often. Any ideas?
Not sure, I would need to see more of the log. I assume there is a traceback somewhere? I did notice some issues yesterday accessing the Wink api so it is possible its from that?
@brg468 @rabittn Time to test!
@rabittn make sure you disable the pubnub automation.
The steps to run my fork are below.
git clone https://github.com/w1ll1am23/home-assistant.git
cd home-assistant
git checkout pubnub_v4
python3 setup.py install
Or course I would recommend running this in a virtualenv so you don’t mess up your current stuff.
I have been testing this for awhile now and haven’t run into any issues. It will take a little longer for the subscription to start using this so once HA is started wait ~1 minute before changing any states.
I’ve been running for over a day now and haven’t seen any issues. As an added benefit I can now call the homeassistant.stop and restart services sucesfully again, which stopped working for me after the switch to Pubnub months ago. I’ll keep you posted if I see anything strange.
Good deal, I wasn’t having that issue with the restart after switch to systemd, but I assume the unsubscribe call I added in is somehow assisting with that. Thanks for testing!
I’m still seeing issues with door sensors dropping (binary sensors) even with running the wink update status service (not sure if that helps or not)
I have to do a restart of ha to get updates again.
Interesting, so how long does it work for? I have run mine for 4 or 5 days without a reboot and never had an issue. (Rebooting for other reasons).
So when you call the wink update service the status doesn’t update for the sensor? Or does it update once, but stop updating after that?
Its hard to tell. I need to keep better track of when I do a restart with HA.
Ill try to gather more data and keep you posted. It is easy to spot when a door opens the the lights do not come on.
@w1ll1am23 Have any of your changes made it in to the 35.x releases? I haven’t updated HA in quite a while but reading through this thread and the change log, it was unclear whether potential fixes are still in your tesing repository or if some have made their way to main line release. Thanks.
Yes! They were added a few releases back. So far so good I have been running without issues ever since.
Thanks for your work on this! I’ll update and see how it goes for me. Since I have only door sensors on the wink, I was pretty consistently losing contact within 24 hours, so this will be a huge improvement.
Great, let me know how it goes!
Hi William,
Your changes working well here. I’ve discovered a little wrinkle though,
for some reason it seems reporting becomes corrupted somehow. I see this present itself as
HA thinking my lights are turned on, when they are not. I know this because I have some time based rules that also take into account whether the light is already on or not. So if the light is on at midnight, for example, it dims, but if it is off, it stays off. So this now every … week? or 2? seems to break and assume the lights are on (so then it sets a dim level which turns on the lights…). I’m sorry I haven’t done any troubleshooting so far on this, been too busy, but a reset fixes it for a while.
thx
Thanks for the feedback. Two things to try, and one question. First what type of lights are these?
Next time it happens can you check the state of the devices in the wink app and see if they are correct? Also try to run the wink service refresh state from api
and see if the states correct themselves.
Hey william
Luckily it’s happened last night and I hadn’t reset yet. This light is a generic z-wave switch. Yes, wink reports correct state.
I can see that HA thinks the lights have been on for 24 hours straight, which isn’t correct (even accounting for it turning on the lights in the middle of the night heh).
Running ‘refresh state from wink’ service (which was the only one I saw) did properly refresh the state of the light. But that only refreshed the correct state, it did not repair the sync, as further light on/off were still not reflected in the HA interface, so they continued to be stuck.
I won’t reset just yet in case you have any follow up questions.
thanks
I suspect that the pubnub connection died and failed to reconnect. I think you may see something in your logs. If you could, send me your logs and I’ll take a look at them. Pubnub is pretty good a reconnecting, but I guess there are some problems they can’t gracefully recover from. I will look into seeing if there is any way to make the library attempt a reconnect.
I had logging turned to error as default, so i guess whatever was going on didn’t rate an actual error label. (Sorry… I set that when i thought everything was perfect… heh). I will reset and change to info level logging.
This is all I had in my log (looks like I had a reboot that I forgot about, so this failure happened in only a couple of days):
16-12-24 16:58:35 homeassistant.config: Incomplete core config. Auto detected elevation: 81
16-12-24 16:59:27 netdisco.ssdp: Error fetching description at https://192.168.10.102:8888
16-12-27 14:29:05 homeassistant.components.recorder: Error during query: (sqlite3.OperationalError) database is locked
Unless you think the db error is indicative?
thanks. I’ll report back next time I catch this with a better log.
No the db error has nothing to do with it. However if you see that a lot in your logs you should consider switching to mysql for your db.
I’ll wait for your logs. Also when it happens check out status.wink.com and see if they are reporting any issues.