wailuen / homebridge-sensibo-sky

Homebridge Sensibo Sky
33 stars 25 forks source link

Position and room setting dismissed after HomeBridge reboot #11

Closed siavashvj closed 7 years ago

siavashvj commented 7 years ago

Every time my HomeBridge server restarts (Mac OS) the Sensibo items’ names, room settings and Favorites positions reset.

This does not happen to other HomeBridge plugins.

wailuen commented 7 years ago

Hmm.. I am not able to replicate that. Let me try again this weekend.

Cloudore commented 7 years ago

This is a result of the Null Check implemented a couple of weeks ago, had the same issue.

orpolaczek commented 7 years ago

I can't replicate it. My homebridge is installed as a system service.

Restarting / killing / rebooting the hosting machine still won't cause it and I have two pods in my account.

siavashvj commented 7 years ago

@Cloudore How did you solve it?

@orpolaczek I'm running HomeBridge as a system service as well (launchctl), and it happens every time.

Cloudore commented 7 years ago

@orpolaczek try restarting homebridge while having your Sensibo devices unplugged. In my country the electricity goes off and on like twice a day, so when that happens, Homebridge will boot before Sensibo, thus failing the Null check and completely removing all Sensibo devices from my Home.app, and then re-adding them as new when it discovers them.

@siavashvj I created my fork and removed the Null Check by backtracking on @wailuen steps, since I'm no coder it took me 3 or 4 tries, but when I got it, I stopped having the issue.

wailuen commented 7 years ago

I found the part where it dislodge the registered device when NULL. Made a simple change but not able to test since it never happen to me. Ver 0.4.2. Please test and let me know if I can close the case

siavashvj commented 7 years ago

It worked! Everything stayed put.

Good job, and thank you!

wailuen commented 7 years ago

Perfect.