torifat / xiaomi-mi-air-purifier

Homebridge plugin for Xiaomi Mi Air Purifier
Apache License 2.0
99 stars 15 forks source link

Can't connect with my Xiaomi 3H #223

Open razvy94 opened 3 years ago

razvy94 commented 3 years ago

doesn't work with Xiaomi 3h for me, it appear in homekit but it show always "no response".

torifat commented 3 years ago

Can you please try the new version? The old one wasn't working properly with Homebrige 1.3.

razvy94 commented 3 years ago

i try it and:

[18/11/2021, 16:01:31] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info. [Removed rest of the log because they don't provide any additional value. - Rifat]

torifat commented 3 years ago

Can you please share your version of Homebrige and homebridge-xiaomi-mi-air-purifier?

razvy94 commented 3 years ago

homebridge-config-ui-x v4.41.2 homebridge-xiaomi-mi-air-purifier v2.0.0

torifat commented 3 years ago

Do you get a message like Connected to "Air Purifier" @ 192.168.XX.XXX! before these errors? It looks like your IP and Token is probably not working.

torifat commented 3 years ago

I will add a better error message. I just upgraded to the new version, and I still don't handle all errors cases properly.

razvy94 commented 3 years ago

yes i get it, [18/11/2021, 16:12:23] [Air Purifier] Connected to "Air Purifier" @ 192.168.xx.xxx!

torifat commented 3 years ago

Is it possible for you to check your NodeJS version? I also use Xiaomi 3H and do not have this issue.

razvy94 commented 3 years ago

Node.js Version | v14.18.1 Npm Version | v6.14.15

torifat commented 3 years ago

Do you get any other error before "[18/11/2021, 16:01:31] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info."?

It looks like the device is undefined for some reason and I can't reproduce it on my side :( I tried to use a wrong IP/Token but I don't get the same error. Sorry, I won't be able to help mich if I can't reproduce it :(

razvy94 commented 3 years ago

no other errors just:

[18/11/2021, 16:49:54] [Air Purifier] Initializing XiaomiMiAirPurifier accessory... [18/11/2021, 16:49:54] [Air Purifier] Air Purifier finished initializing! 18/11/2021, 16:49:56] [Air Purifier] Connected to "Air Purifier" @ 192.168.31.123!

[18/11/2021, 16:50:00] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Active': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info. [Removed rest of the log because they don't provide any additional value. - Rifat]

boomchatchat commented 3 years ago

i have a same issue, too.

torifat commented 3 years ago

@boomchatchat you don't have the same issue. Your errors are different.

ZenitES commented 3 years ago

Hello, I also have this problem, but with a Mi Air Purifier 2H.

Homebridge v1.3.8 Node.js v16.13.0 Npm v8.1.0

i get message [25/11/2021, 17:24:25] Loaded plugin: homebridge-xiaomi-mi-air-purifier@2.0.1 [25/11/2021, 17:24:25] Registering accessory 'homebridge-xiaomi-mi-air-purifier.XiaomiMiAirPurifier' [25/11/2021, 17:24:25] --- [25/11/2021, 17:24:25] [Air Purifier] Initializing XiaomiMiAirPurifier accessory... [25/11/2021, 17:24:25] [Air Purifier] Air Purifier finished initializing! [25/11/2021, 17:24:25] [Air Purifier] Connected to "Air Purifier" @ 192.168.xxx.xxx!

then i get errors:

[25/11/2021, 17:24:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Current Air Purifier State': Unhandled error thrown inside read handler for characteristic: device.power is not a function. See https://git.io/JtMGR for more info. [25/11/2021, 17:24:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Target Air Purifier State': Unhandled error thrown inside read handler for characteristic: device.mode is not a function. See https://git.io/JtMGR for more info. [25/11/2021, 17:24:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Air Quality': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://git.io/JtMGR for more info. [25/11/2021, 17:24:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'PM2.5 Density': Unhandled error thrown inside read handler for characteristic: device.pm2_5 is not a function. See https://git.io/JtMGR for more info. [25/11/2021, 17:24:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Life Level': Unhandled error thrown inside read handler for characteristic: device.filterLifeLevel is not a function. See https://git.io/JtMGR for more info. [25/11/2021, 17:24:26] [homebridge-xiaomi-mi-air-purifier] This plugin threw an error from the characteristic 'Filter Change Indication': Unhandled error thrown inside read handler for characteristic: device.filterLifeLevel is not a function. See https://git.io/JtMGR for more info.

bidulle95 commented 2 years ago

same issue