merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
383 stars 62 forks source link

None of my devices appear in homekit. #380

Closed mutchu closed 1 year ago

mutchu commented 1 year ago

Hi there, None of my devices appear in homekit. How to do please? Thanks

[11/5/2022, 9:37:03 AM] [miot] [Mi Air Purifier Pro H] Device found! Setting up miot device from local connection! [11/5/2022, 9:37:03 AM] [miot] [Mi Air Purifier Pro H] Device firmware: 2.0.8 [11/5/2022, 9:37:03 AM] [miot] [Mi Air Purifier Pro H] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:37:03 AM] [miot] [Mi Air Purifier Pro H] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:37:03 AM] [miot] [Mi Air Purifier Pro H] Device diconnected! [11/5/2022, 9:37:15 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (Protocol) 10.0.0.42 <- Reached maximum number of retries, giving up miIO.info - {"timeout":5000,"retries":3} [11/5/2022, 9:37:15 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Error: Call to device timed out [11/5/2022, 9:37:15 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:37:58 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device found! Setting up miot device from local connection! [11/5/2022, 9:37:58 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device firmware: 1.4.3_23101 [11/5/2022, 9:37:58 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:37:58 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:37:58 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device diconnected! [11/5/2022, 9:38:03 AM] [miot] [Mi Smart Antibacterial Humidifier] Device found! Setting up miot device from local connection! [11/5/2022, 9:38:03 AM] [miot] [Mi Smart Antibacterial Humidifier] Device firmware: 2.1.3 [11/5/2022, 9:38:03 AM] [miot] [Mi Smart Antibacterial Humidifier] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:38:03 AM] [miot] [Mi Smart Antibacterial Humidifier] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:38:03 AM] [miot] [Mi Smart Antibacterial Humidifier] Device diconnected! [11/5/2022, 9:38:03 AM] [miot] [Mi Air Purifier Pro H] Device found! Setting up miot device from local connection! [11/5/2022, 9:38:03 AM] [miot] [Mi Air Purifier Pro H] Device firmware: 2.0.8 [11/5/2022, 9:38:03 AM] [miot] [Mi Air Purifier Pro H] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:38:03 AM] [miot] [Mi Air Purifier Pro H] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:38:03 AM] [miot] [Mi Air Purifier Pro H] Device diconnected! [11/5/2022, 9:38:27 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (Protocol) 10.0.0.42 <- Reached maximum number of retries, giving up miIO.info - {"timeout":5000,"retries":3} [11/5/2022, 9:38:27 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Error: Call to device timed out [11/5/2022, 9:38:27 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:38:59 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device found! Setting up miot device from local connection! [11/5/2022, 9:38:59 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device firmware: 1.4.3_23101 [11/5/2022, 9:38:59 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:38:59 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:38:59 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device diconnected! [11/5/2022, 9:39:04 AM] [miot] [Mi Smart Antibacterial Humidifier] Device found! Setting up miot device from local connection! [11/5/2022, 9:39:04 AM] [miot] [Mi Smart Antibacterial Humidifier] Device firmware: 2.1.3 [11/5/2022, 9:39:04 AM] [miot] [Mi Smart Antibacterial Humidifier] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:39:04 AM] [miot] [Mi Smart Antibacterial Humidifier] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:39:04 AM] [miot] [Mi Smart Antibacterial Humidifier] Device diconnected! [11/5/2022, 9:39:04 AM] [miot] [Mi Air Purifier Pro H] Device found! Setting up miot device from local connection! [11/5/2022, 9:39:04 AM] [miot] [Mi Air Purifier Pro H] Device firmware: 2.0.8 [11/5/2022, 9:39:04 AM] [miot] [Mi Air Purifier Pro H] ReferenceError: foundDeviceModel is not defined [11/5/2022, 9:39:04 AM] [miot] [Mi Air Purifier Pro H] Error during device identify! Retrying in 60 seconds! [11/5/2022, 9:39:04 AM] [miot] [Mi Air Purifier Pro H] Device diconnected!

{ "micloud": { "username": "", "password": "", "country": "de", "forceMiCloud": false }, "devices": [ { "name": "Mi Air Purifier 2H Chambre des Mimi", "ip": "10.0.0.43", "token": "9240de267b8274f61362dc02b3534fa4", "deviceId": "zhimi.airpurifier.mc2", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "", "password": "", "country": "de", "forceMiCloud": false }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Mi Air Purifier 2H Chambre de Julia", "ip": "10.0.0.42", "token": "9240de267b8274f61362dc02b3534fa4", "deviceId": "zhimi.airpurifier.mc2", "pollingInterval": 10, "deepDebugLog": false, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Mi Air Purifier Pro H", "ip": "10.0.0.41", "token": "78bc601b0ec704e9d679f9f57208ebae", "deviceId": "zhimi.airpurifier.vb2", "pollingInterval": 10, "deepDebugLog": false, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Mi Smart Antibacterial Humidifier", "ip": "10.0.0.40", "token": "12a63e535420bf878f6dfacad1178f32", "deviceId": "deerma.humidifier.jsq5", "pollingInterval": 10, "deepDebugLog": false, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true } ], "platform": "miot" }

merdok commented 1 year ago

Oh, yeah this is an issue! Just posted an update to version 1.4.2 which should fix that. Thanks for reporting! Also the deviceId for all your devices is wrong, it is best to remove that completely and let the plugin detect that.

mutchu commented 1 year ago

@merdok Thank you for your speed. However my Purifier Pro H appears well and works normally, but my two Purifier 2H appear but are unresponsive in Homekit...

11/5/2022, 11:06:47 AM] [miot] [Mi Air Purifier Pro H] Use time: 42735 minutes. [11/5/2022, 11:06:47 AM] [miot] [Mi Air Purifier Pro H] Filter life level: 91%. [11/5/2022, 11:06:47 AM] [miot] [Mi Air Purifier Pro H] Filter used time: 720 hours. [11/5/2022, 11:06:47 AM] [miot] [Mi Air Purifier Pro H] Starting property polling. [11/5/2022, 11:06:49 AM] [EufySecurity-2.1.0] WARN: Push Closed! [11/5/2022, 11:06:57 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:06:57 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:06:57 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:06:57 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:06:58 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:06:58 AM] [miot] [Mi Air Purifier Pro H] Property motor-speed:motor1-speed value changed to ---> 447 [11/5/2022, 11:07:07 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:07:07 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:07:07 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:07:07 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:07:07 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:07:08 AM] [miot] [Mi Air Purifier Pro H] Property motor-speed:motor1-speed value changed to ---> 446 [11/5/2022, 11:07:17 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:07:17 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:07:17 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:07:17 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:07:18 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:07:27 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:07:27 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:07:27 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:07:27 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:07:28 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:07:28 AM] [miot] [Mi Air Purifier Pro H] Property motor-speed:motor1-speed value changed to ---> 447 [11/5/2022, 11:07:37 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:07:37 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:07:37 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:07:37 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:07:38 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Log in to MiCloud! [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] (MiCloud) Log in to MiCloud with username michel.berlie@icloud.com. Request timeout: 5000 milliseconds. [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Log in to MiCloud! [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (MiCloud) Log in to MiCloud with username michel.berlie@icloud.com. Request timeout: 5000 milliseconds. [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] (MiCloud) Login step 1 [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (MiCloud) Login step 1 [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (MiCloud) Login step 2 [11/5/2022, 11:07:45 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] (MiCloud) Login step 2 [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] (MiCloud) Login step 3 [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] (MiCloud) Login successful! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Using server country: de [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Fetching device info from the MiCloud! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Connection to MiCloud device failed! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Error: error:0308010C:digital envelope routines::unsupported [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Error during connection! Retrying in 60 seconds! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] (MiCloud) Logout from MiCloud for username michel.berlie@icloud.com [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre des Mimi] Device diconnected! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (MiCloud) Login step 3 [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (MiCloud) Login successful! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Using server country: de [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Fetching device info from the MiCloud! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Connection to MiCloud device failed! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Error: error:0308010C:digital envelope routines::unsupported [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Error during connection! Retrying in 60 seconds! [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] (MiCloud) Logout from MiCloud for username michel.berlie@icloud.com [11/5/2022, 11:07:46 AM] [miot] [Mi Air Purifier 2H Chambre de Julia] Device diconnected! [11/5/2022, 11:07:47 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:07:47 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:07:47 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:07:47 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:07:48 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:07:57 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:07:57 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:07:57 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:07:57 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:07:58 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:07:58 AM] [miot] [Mi Air Purifier Pro H] Property motor-speed:motor1-speed value changed to ---> 446 [11/5/2022, 11:08:07 AM] [miot] [Mi Smart Antibacterial Humidifier] Preparing property poll! [11/5/2022, 11:08:07 AM] [miot] [Mi Smart Antibacterial Humidifier] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [11/5/2022, 11:08:07 AM] [miot] [Mi Air Purifier Pro H] Preparing property poll! [11/5/2022, 11:08:07 AM] [miot] [Mi Air Purifier Pro H] Splitting properties into chunks. Number of chunks: 2. Chunk size: 14 [11/5/2022, 11:08:08 AM] [miot] [Mi Air Purifier Pro H] Error while parsing response from device for property alarm:alarm. Response: {"did":"362561075","siid":5,"piid":1,"code":-4001} [11/5/2022, 11:08:08 AM] [miot] [Mi Air Purifier Pro H] Property motor-speed:motor1-speed value changed to ---> 447

{ "micloud": { "username": "", "password": "", "country": "de" }, "devices": [ { "name": "Mi Air Purifier 2H Chambre des Mimi", "ip": "10.0.0.43", "token": "50dfff3ca64a6b30341580f2843911cf", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "", "password": "", "country": "de" }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Mi Air Purifier 2H Chambre de Julia", "ip": "10.0.0.42", "token": "6b38960e4ab05d57016dc31cf0bb5613", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "", "password": "", "country": "de" }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Mi Air Purifier Pro H", "ip": "10.0.0.41", "token": "78bc601b0ec704e9d679f9f57208ebae", "pollingInterval": 10, "deepDebugLog": false, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Mi Smart Antibacterial Humidifier", "ip": "10.0.0.40", "token": "12a63e535420bf878f6dfacad1178f32", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "", "password": "", "country": "de" }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true } ], "platform": "miot" }

merdok commented 1 year ago

You got the recent Error: error:0308010C:digital envelope routines::unsupported introduced in the latest nodejs version. You would need to downgrade to nodejs 16.x.x for now.

mutchu commented 1 year ago

@merdok It works, thank you very much for your speed.

merdok commented 1 year ago

As of version 1.4.3, the plugin should now work with the recent nodejs version without any issues again

mutchu commented 1 year ago

@merdok Hello, Thank you for your work on this pluggin, do you know if it is possible not to display the temperature, humidity and air quality of an air purifier in HomeKit? Thanks

merdok commented 1 year ago

Not possible right now, the plugin auto detects that your device supports air quality and displays those values.