wylanswets / homebridge-icontrol-platform

Enables iControl home security systems and other accessories in Homebridge for homekit
4 stars 2 forks source link

TypeError: self.accessories[j].event is not a function #4

Closed AFN40 closed 4 years ago

AFN40 commented 4 years ago

Hey there again! Thanks for the help last time around. Do you have any insight into the below error message I keep getting?

TypeError: self.accessories[j].event is not a function at /usr/lib/node_modules/homebridge-icontrol-platform/index.js:84:53 at /usr/lib/node_modules/homebridge-icontrol-platform/node_modules/icontrol-api/index.js:119:11 at iControl.<anonymous> (/usr/lib/node_modules/homebridge-icontrol-platform/node_modules/icontrol-api/index.js:470:7) at Request.self.callback (/usr/lib/node_modules/homebridge-icontrol-platform/node_modules/request/request.js:185:22) at Request.emit (events.js:311:20) at Request.<anonymous> (/usr/lib/node_modules/homebridge-icontrol-platform/node_modules/request/request.js:1154:10) at Request.emit (events.js:311:20) at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-icontrol-platform/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:417:28) at IncomingMessage.emit (events.js:323:22) at endReadableNT (_stream_readable.js:1204:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

wylanswets commented 4 years ago

Hey @AFN40! You're welcome! Yes... actually this particular issue I thought I resolved in a previous update. Can you see if you are running the latest version of the plugin? (0.2.4)

AFN40 commented 4 years ago

Yes, I’m on 0.2.4. Thanks!

Sent from my iPhone

On Apr 16, 2020, at 5:24 PM, Wylan Swets notifications@github.com wrote:

 Hey @AFN40! You're welcome! Yes... actually this particular issue I thought I resolved in a previous update. Can you see if you are running the latest version of the plugin? (0.2.4)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

wylanswets commented 4 years ago

I've published version 0.2.5 which adds another check to hopefully fix this issue.

cries in javascript

Please update and reopen this issue if this happens again!

AFN40 commented 4 years ago

Hey there. I updated the plugin, but now my alarm system is not responding. I've attached a portion of the lengthy log entry that I get in return. Thanks for all the help. If there's a way I can send you a tip, please let me know. iControl.log

wylanswets commented 4 years ago

Very strange.... it’s showing that it’s erring when it shouldn’t be. How many times have you run that?

AFN40 commented 4 years ago

I only receive that message in the log once upon startup. Is that what you mean?

wylanswets commented 4 years ago

I just mean how many times have you tried to start it up? I can try a fix in a bit but it’s strange what I might have to do to fix it.

AFN40 commented 4 years ago

I'd say I have rebooted 5 or 6 times, all with the same error.

A weird thing (not sure if related) happened when installing 0.2.5. After a reboot, Homebridge could not find the config file at first. I do run home bridge as a service and my config file is in a different folder since I use homebridge-config-ui-x. So maybe it just defaulted somewhere else?

wylanswets commented 4 years ago

I have pushed up an attempted fix - 0.2.6. Give this a try and see if it helps.

AFN40 commented 4 years ago

Thanks. Here is what I got.

homebridge.log

wylanswets commented 4 years ago

Interesting. With the credentials you have in your config file are you able to log in to xfinity home? Could you try copy-pasting them from your config file in to the comcast website?

AFN40 commented 4 years ago

Yep, credentials are good to go.

wylanswets commented 4 years ago

That’s strange. It’s basically trying to submit the login page but getting sent back to the login page with no errors on screen..... is there a way you could test the plugin on a different setup or make sure homebridge is up to date? If nothing else the only other thing I could think of is trying different credentials or something.

AFN40 commented 4 years ago

I might be able to test on a different setup, but not until tomorrow. I am on Homebridge 0.4.53.

AFN40 commented 4 years ago

So I was able to wipe my pi, fresh install everything, including OS, and I still get the same attached error. homebridge.log

wylanswets commented 4 years ago

Basically what seems to be happening somehow is that it has submitted the login page and is then getting sent back to the login page rather than being redirected to the resource it requested. So something during the login process specifically around submitting the login is not working.... I know comcast has like a very short character limit for passwords, so is yours longer than that somehow? Also do you have special characters in your password? Maybe try resetting your password to something simpler to troubleshoot.

Also - I opted to make a "new user" in my comcast account just for the plugin to use, not that it is a requirement but just something that might be useful - you could create an account with a randomly generated password with no special characters within their character limit and see if that works.

AFN40 commented 4 years ago

The new user method worked! Thank you. Wonder what was tripping it up... Oh well. Thanks again.

wylanswets commented 4 years ago

Very weird... I’m glad you got it resolved! Now the world may never know that or how may licks it takes to get to the center of a tootsie pop. In either case let me know if there’s any other issues you encounter!