merdok / homebridge-miot

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

Support for BLE Smart Door Lock #445

Closed shipham2302 closed 7 months ago

shipham2302 commented 1 year ago

Device model _ lumi.lock.bmcn02

Device name _Xiaomi Smart Door Lock

Does the device require a MiCloud connection? _Do not know, but maybe yes.

**Anything special about the device? _It's a BLE-mesh based device and connect with my gateway3 (lumi.gateway.mgl03)

**Does it already work with the plugin with a limited scope (can be controlled using the auto created switch)? _I managed to exposed it to Home app but it said device type is not supported, it show battery level at 0%. Also I tried to create some propertymonitor but the value didn't change or respond at all. I've tried device ip and gateway ip.

merdok commented 1 year ago

Can you post the debug log? The values should update when propertyMonitor is used. Maybe there is a different underlying issue.

shipham2302 commented 1 year ago

Hi. Thank for quick reply. I've tried multiple times with no luck.

I've set it up with force Micloud connection and deep debug log enabled.

Battery still show 0% (in mihome is 50%). And it still appeared as device unsupported by Homekit.


[3/10/2023, 11:33:01 PM] [homebridge-miot][Lulu] Initializing device services
[3/10/2023, 11:33:01 PM] [homebridge-miot]
[Lulu] Device services:
"lock"
"battery"
"door"
]
[3/10/2023, 11:33:01 PM] [homebridge-miot
] [Lulu] Initializing device properties
[3/10/2023, 11:33:01 PM] [homebridge-miot]
[Lulu] Device properties:
"lock:operation-method"
"lock:operation-id"
"lock: abnormal-condition"
"lock:current-time
"battery:battery-level"
"door:status
"door: abnormal-condition",
"door:current-time
]
[3/10/2023, 11:33:01 PM] [homebridge-miot] [Lulu] Initializing device actions!
[3/10/2023, 11:33:01 PM] [homebridge-miot] [Lulu] Successfully created a Generic device! It is a Lock.
[3/10/2023, 11:33:01 PM] [homebridge-miot]
[Lulu] Initializing accessory!
[3/10/2023, 11:33:01 PM] [homebridge-miot] [Lulu] Accessory successfully initialized!
[3/10/2023, 11:33:01 PM] [homebridge-miot]
[Lulu] Registering 1 accessories!
[3/10/2023, 11:33:01 PM] [homebridge-miot]
[Lulu] Everything looks good! Initiating property polling!
[3/10/2023, 11:33:01 PM] [homebridge-miot] [Lulu] Log in to MiCloud!
[3/10/2023, 11:33:03 PM] [homebridge-miot] [Lulu] Successfully connected to Micloud! Setting up miot device from Micloud connection!
[3/10/2023, 11:33:03 PM] [homebridge-miot] [Lulu] Successfully connected to MiCloud! Setting up miot device from MiCloud connection!
[3/10/2023, 11:33:03 PM] (homebridge-miot] [Lulu] Connected to device: lumi.lock.bmcn02
[3/10/2023, 11:33:03 PM] [homebridge-miot]
[Lulu] Doing initial property fetch.
[3/10/2023, 11:33:04 PM] [homebridge-miot]
[Lulu] Starting property polling.
merdok commented 1 year ago

Can you try to also post a more detailed log using the deepDebugLog property set to true? I am just wondering why the battery does not work as at least this should work. Of course the other smart lock related stuff will not work currently but at least battery should. Also did you try to use the propertyControl or propertyMonitor to expose some of the device properties to the home app and does that work?

shipham2302 commented 1 year ago

As i said, i've tried propertymonitor and propertycontrol also. No change. Both light sensor or occupancy sensor didnt respond at all.

That's the only log related to this device when i restart the plugin. After that nothing appear in log again. I enabled deep debug log in device settings already.

merdok commented 1 year ago

Then your issue might not be related to missing device support but to something else, in the log you should be able to see successful property value updates when everything is fine.

shipham2302 commented 1 year ago

I don't see any update after the initialize process after all. So i don't know what to check next. It appeared without error in log at all.

merdok commented 1 year ago

I would recommend also here that you try to talk to the device directly by using the miot cli. That way you can test stuff and make sure that the communication works!

shipham2302 commented 1 year ago

Any documents to read about this CLI? I'd really appreciated.

merdok commented 1 year ago

There is a CLI section in the README, besides that you can use help for the cli commands to have a short description and usage.