MartinPham / homebridge-homekit-controller

Control Apple's HomeKit devices via Homebridge
30 stars 4 forks source link

Process gets stuck after entering pairing pin #2

Open askovi opened 4 years ago

askovi commented 4 years ago

It discovers my Homekit devices just fine then I select one, I enter the Homekit pairing pin of the device and press enter and it just sits there indefinitely doing nothing. I can't even ctrl+c to cancel the process, or anything, it's just stuck.

MartinPham commented 4 years ago

thanks for your report, the pairing process is taking long time, could you try again and wait for about 5 minutes?

MartinPham commented 4 years ago

it'd be great if you could provide more detail about your homekit device

rds217 commented 4 years ago

I am also running into this problem - trying to connect a few switches, five Leviton Decora DH15S and one Ecobee Switch+. Starting with the Switch+, since I definitely know the code for that.

Message I'm getting is: UnhandledPromiseRejectionWarning: M2: Error: 6 (node:1836) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:1836) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Then it freezes up like askovi mentioned.

MartinPham commented 4 years ago

Thanks for your response. When you guys entered the code, did you add also the dash - character?

MartinPham commented 4 years ago

Like 123-45-678, instead of 12345678

rds217 commented 4 years ago

I did include the dashes, and I’m sure I tried it without them either. I also waited what I thought was a sufficient amount of time (>10 min) after each try. Anything else I should try?

On Feb 17, 2020, at 07:41, Martin Pham notifications@github.com wrote:

 Thanks for your response. When you guys entered the code, did you add also the dash - character?

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

MartinPham commented 4 years ago

Thanks for your report, I'm trying to debug the error "M2: Error: 6".

halilaykent commented 4 years ago

Do we need to reset the accessories before pairing?

halilaykent commented 4 years ago

I also have M2: Error: 6 error

rds217 commented 4 years ago

Hope everything is going alright @MartinPham. I have some time to help troubleshoot these errors if you're available to work on the plugin. Otherwise, I think a workaround to achieve partial functionality would be to use the homebridge-dummy plugin to generate dummy switches for HomeKit devices, and then tie them together via automations. The dummy switches appear in homebridge and are linked to the physical devices. Your method is definitely more elegant and preferred.

amaisano commented 3 years ago

Same error. More details:

Enter PIN for logi:95:C2 (XXX-XX-XXX): 999-99-999(node:1768) UnhandledPromiseRejectionWarning: M2: Error: 6
(node:1768) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1768) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
amaisano commented 3 years ago

FWIW, this fork works and can get past this step: https://github.com/L-C-P/homebridge-homekit-controller

nambvarun commented 3 years ago

FWIW, this fork works and can get past this step: https://github.com/L-C-P/homebridge-homekit-controller

This didn't work for me. Did you do anything additional to get this working?

jkreileder commented 3 years ago

"M2: Error: 6" means unavailable – most likely this means the device is already paired to HomeKit and, as HomeKit devices only support one association, the device is really unavailable.

I managed to get around "M2: Error: 6" by removing the device from HomeKit and then doing "homekit" (still having the device on my network). I got service and paringData JSON then. The accessories array doesn't have anything in it, though – there should be aid and iid for three switches.