nfarina / homebridge-icontrol

iControl (Xfinity Home) for Homebridge: https://github.com/nfarina/homebridge
7 stars 2 forks source link

Xfinity Home weird issues after initial setup #2

Open fitzage opened 7 years ago

fitzage commented 7 years ago

When the login problem was fixed, I initially had success connecting to Xfinity Home. I can fix it by clearing cachedAccessories file and the items in the persist folder, which requires then deleting homebridge from HomeKit and adding it again, which requires setting up all my rooms and scenes again.

It eventually reverts to not working, and this is what shows up in the logs. I briefly mentioned this on the other issue that is now closed, but figured it should be surfaced here.

I'm going to try not moving it to a different room this time and see what happens, but I'm guessing it will start failing within a few hours.

Jun 14 10:44:34 raspberrypi homebridge[434]: [6/14/2017, 10:44:34 AM] [Xfinity Home] There was an error while communicatJun 14 10:44:34 raspberrypi homebridge[434]: Stack:Error
Jun 14 10:44:34 raspberrypi homebridge[434]: at iControl._notifyError (/usr/local/lib/node_modules/homebridge-icontrol/nJun 14 10:44:34 raspberrypi homebridge[434]: at iControl.<anonymous> (/usr/local/lib/node_modules/homebridge-icontrol/noJun 14 10:44:34 raspberrypi homebridge[434]: at self.callback (/usr/local/lib/node_modules/homebridge-icontrol/node_moduJun 14 10:44:34 raspberrypi homebridge[434]: at emitOne (events.js:77:13)
Jun 14 10:44:34 raspberrypi homebridge[434]: at Request.emit (events.js:169:7)
Jun 14 10:44:34 raspberrypi homebridge[434]: at Request.init (/usr/local/lib/node_modules/homebridge-icontrol/node_modulJun 14 10:44:34 raspberrypi homebridge[434]: at Redirect.onResponse (/usr/local/lib/node_modules/homebridge-icontrol/nodJun 14 10:44:34 raspberrypi homebridge[434]: at Request.onRequestResponse (/usr/local/lib/node_modules/homebridge-icontrJun 14 10:44:34 raspberrypi homebridge[434]: at emitOne (events.js:77:13)
Jun 14 10:44:34 raspberrypi homebridge[434]: at ClientRequest.emit (events.js:169:7)
Jun 14 10:44:34 raspberrypi homebridge[434]: at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:433:2Jun 14 10:44:34 raspberrypi homebridge[434]: at HTTPParser.parserOnHeadersComplete (_http_common.js:103:23)
Jun 14 10:44:34 raspberrypi homebridge[434]: at TLSSocket.socketOnData (_http_client.js:322:20)
Jun 14 10:44:34 raspberrypi homebridge[434]: at emitOne (events.js:77:13)
Jun 14 10:44:34 raspberrypi homebridge[434]: at TLSSocket.emit (events.js:169:7)
Jun 14 10:44:34 raspberrypi homebridge[434]: at readableAddChunk (_stream_readable.js:153:18)
Jun 14 10:44:34 raspberrypi homebridge[434]: at TLSSocket.Readable.push (_stream_readable.js:111:10)
Jun 14 10:44:34 raspberrypi homebridge[434]: at TLSWrap.onread (net.js:536:20)
Jun 14 10:44:34 raspberrypi homebridge[434]: Response:
Jun 14 10:44:34 raspberrypi homebridge[434]: undefined
fitzage commented 7 years ago

Yep, didn't even take a couple hours.

nfarina commented 7 years ago

So once it stops working, does it ever work again?

fitzage commented 7 years ago

No. At least not that I've ever noticed.

On Jun 15, 2017, at 4:46 PM, Nick Farina notifications@github.com<mailto:notifications@github.com> wrote:

So once it stops working, does it ever work again?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nfarina/homebridge-icontrol/issues/2#issuecomment-308894912, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAAHplU_XjKoRXFHp9IlALEmSCYTGdCgks5sEcIygaJpZM4N6QSe.

fitzage commented 7 years ago

I'm running Node 4.5 (which I believe was recommended on a thread for the wink plugin). Is there a different version of Node I should be using that might help?

fitzage commented 7 years ago

Upgraded to Node 5.12, which doesn't appear to have broken anything else and right now the security system is working. We'll see if it holds up.

fitzage commented 7 years ago

Nope. Something I did as part of the upgrade must have temporarily fixed it. Not so much anymore.

fitzage commented 7 years ago

OK, here's what temporarily fixes it: delete the iControl file in the persist folder. However, this only seems to be recreated if I manually run homebridge, not run it via systemctl. Maybe I need to check my script, but I'm pretty sure it's just running the same command. Maybe a permissions issue, because I think that's running as the homebridge user.

fitzage commented 7 years ago

If I delete the iControl file in persist, and start up using systemctl, it never recreates the file. Perhaps the problem above is related to that file getting stale? If I start up manually, the file gets created, and I can access the security system in homebridge. If I stop it manually and start up with systemctl quickly enough, it works that way too because apparently it’s using that iControl file, even though it won’t create it.

Permissions should be fine, so I’m not entirely sure what’s going on, but it might be a configuration issue at this point.

fitzage commented 7 years ago

Except maybe the persist/iControl file isn’t all that’s going on, because this time I manually started homebridge and the security system worked in HomeKit, but it never created that iControl file in persist.

fitzage commented 7 years ago

Maybe it’s when that iControl file eventually gets re-created that things stop working?

I guess this is sending you a crapload of emails. Sorry.

fitzage commented 7 years ago

Well, that file isn't the issue. Was working fine without it, now stopped working, that file still isn't there. So all the stuff above was just a big circle.

nfarina commented 7 years ago

😂