Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request support for loock.lock.t2v1 #1341

Open
hzonz opened this issue Apr 27, 2024 · 0 comments
Open

Request support for loock.lock.t2v1 #1341

hzonz opened this issue Apr 27, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@hzonz
Copy link

hzonz commented Apr 27, 2024

Based on the debug logs, I refer to #1324

# XiaoMi Lock M20

from custom_components.xiaomi_gateway3.core.devices import *

DEVICES = [{
    8154: ["Xiaomi", "Door Lock M20", "loock.lock.t2v1"],
    "spec": [
        BaseConv("action", "sensor"),
        BaseConv("contact", "binary_sensor"),  # from mi=7
        BLEFinger("fingerprint", mi=6),
        BLEDoor("door", mi=7),
        BLEMapConv("action", mi=8, map={"00": "disarmed", "01": "armed"}),
        BLELock("lock", mi=11),
        BLEByteConv("battery", "sensor", mi=4106),
        BLEMapConv("lock", "binary_sensor", mi=4110, map={"00": True, "01": False}),  # reverse
        BLEMapConv("door", "binary_sensor", mi=4111, map={"00": True, "01": False}), 
    ],
}] + DEVICES

action is normal.
binary_sensor nothing has changed.

Here is the debug log

2024-04-27 12:13:39.951 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'central/report', 'data': b'{"id":2146938240,"_to":128,"method":"_async.ble_event","params":{"dev":{"did":"1058685304","mac":"D8:76:70:C0:8D:2D","pdid":8154},"evt":[{"eid":11,"edata":"2000000180777B2C66"}],"frmCnt":22,"gwts":1714191225}}'}
2024-04-27 12:13:39.951 DEBUG (MainThread) [custom_components.xiaomi_gateway3.gate.10.10.12.15] {'uid': 'd87670c08d2d', 'did': '1058685304', 'msg': 'on_report', 'data': {'action': 'lock', 'action_id': 0, 'method_id': 2, 'message': 'Unlock outside the door', 'method': 'biological', 'key_id': 0, 'error': None, 'timestamp': '2024-04-27T12:13:43'}}

2024-04-27 12:13:40.421 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report', 'data': b'{"id":648494669,"method":"_async.ble_event","params":{"dev":{"did":"1058685304","mac":"D8:76:70:C0:8D:2D","pdid":8154},"evt":[{"eid":11,"edata":"2000000180777b2c66"}],"frmCnt":22,"gwts":1714191225}}'}
2024-04-27 12:13:40.481 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report_ack', 'data': b'{"id":648494669,"result":"ok"}'}

2024-04-27 12:13:47.900 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'central/report', 'data': b'{"id":954523255,"_to":128,"method":"_async.ble_event","params":{"dev":{"did":"1058685304","mac":"D8:76:70:C0:8D:2D","pdid":8154},"evt":[{"eid":7,"edata":"017F7B2C66"}],"frmCnt":23,"gwts":1714191233}}'}
2024-04-27 12:13:47.900 DEBUG (MainThread) [custom_components.xiaomi_gateway3.gate.10.10.12.15] {'uid': 'd87670c08d2d', 'did': '1058685304', 'msg': 'on_report', 'data': {'contact': False, 'action': 'door', 'action_id': 1, 'message': 'Door is closed', 'timestamp': '2024-04-27T12:13:51'}}

2024-04-27 12:13:48.071 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report', 'data': b'{"id":919243681,"method":"_async.ble_event","params":{"dev":{"did":"1058685304","mac":"D8:76:70:C0:8D:2D","pdid":8154},"evt":[{"eid":7,"edata":"017f7b2c66"}],"frmCnt":23,"gwts":1714191233}}'}
2024-04-27 12:13:48.121 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report_ack', 'data': b'{"id":919243681,"result":"ok"}'}

2024-04-27 12:14:24.220 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report', 'data': b'{"id":1848067709,"method":"_sync.ble_query_prod","params":{"pdid":8154}}'}
2024-04-27 12:14:24.301 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report_ack', 'data': b'{"id":1848067709,"result":{"operation":"query_prod","pdid":8154,"ttl":1800,"thr":-40,"upRule":[{"delta":0,"eid":6,"intvl":0},{"delta":0,"eid":11,"intvl":0},{"delta":0,"eid":8,"intvl":0},{"delta":0,"eid":7,"intvl":0},{"delta":0,"eid":4106,"intvl":600},{"delta":0,"eid":4110,"intvl":60},{"delta":0,"eid":4111,"intvl":60}]}}'}

2024-04-27 12:14:32.377 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'central/report', 'data': b'{"id":48084324,"_to":128,"method":"_async.ble_event","params":{"dev":{"did":"1058685304","mac":"D8:76:70:C0:8D:2D","pdid":8154},"evt":[{"eid":4111,"edata":"01"}],"frmCnt":24,"gwts":1714191278}}'}
2024-04-27 12:14:32.377 DEBUG (MainThread) [custom_components.xiaomi_gateway3.gate.10.10.12.15] {'uid': 'd87670c08d2d', 'did': '1058685304', 'msg': 'on_report', 'data': {'door': False}}
2024-04-27 12:14:32.879 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report', 'data': b'{"id":194134712,"method":"_async.ble_event","params":{"dev":{"did":"1058685304","mac":"D8:76:70:C0:8D:2D","pdid":8154},"evt":[{"eid":4111,"edata":"01"}],"frmCnt":24,"gwts":1714191278}}'}
2024-04-27 12:14:32.939 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.10.10.12.15] {'topic': 'miio/report_ack', 'data': b'{"id":194134712,"result":"ok"}'}


@AlexxIT AlexxIT added the enhancement New feature or request label Apr 27, 2024
@AlexxIT AlexxIT self-assigned this Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants