jbergler / hass-ttlock

Home Assistant integration for TTLock locks
54 stars 12 forks source link

Call error when. locking/unlocking #42

Closed stevearmitage closed 1 year ago

stevearmitage commented 1 year ago

Describe the bug

No response when locking and unlocking lock - v0.4.8

To Reproduce

Steps to reproduce the behavior:

click on lock or unlock button

Expected behavior

A clear and concise description of what you expected to happen.

The lock locks or unlocks

Diagnostic info

Log Details (ERROR) This error originated from a custom integration. Logger: homeassistant.core Source: custom_components/ttlock/api.py:101 Integration: TTLock (documentation, issues) First occurred: 13:47:43 (2 occurrences) Last logged: 15:28:11

Error executing service: <ServiceCall lock.lock (c:01GYVF7K3XQCPH8MD5B75KY62B): entity_id=['lock.server_lock_2']> Error executing service: <ServiceCall lock.unlock (c:01GYVMZGW2YJ8P0SFMV6DY61Q8): entity_id=['lock.server_lock']> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/core.py", line 1838, in catch_exceptions await coro_or_task File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/lock/init.py", line 96, in _async_lock await entity.async_lock(**remove_entity_service_fields(service_call)) File "/config/custom_components/ttlock/lock.py", line 44, in async_lock await self.coordinator.lock() File "/config/custom_components/ttlock/coordinator.py", line 216, in lock res = await self.api.lock(self.lock_id) File "/config/custom_components/ttlock/api.py", line 129, in lock res = await self.get("lock/lock", lockId=lock_id) File "/config/custom_components/ttlock/api.py", line 101, in get raise RequestFailed(f"API returned: {res}") custom_components.ttlock.api.RequestFailed: API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}

jbergler commented 1 year ago

@stevearmitage would be so kind as to turn debug on for the integration and try again - those logs should hopefully provide some more clues!

stevearmitage commented 1 year ago

Hopefully these are all of the debug logs. there maybe some other integration items.

2023-04-25 13:39:48.137 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ttlock which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2023-04-25 13:39:58.973 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'auth', 'tag', 'fan', 'search', 'zwave_js', 'xiaomi_ble', 'homeassistant_alerts', 'onboarding', 'mobile_app', 'ffmpeg', 'broadlink', 'dlna_dmr', 'generic', 'blueiris', 'repairs', 'homekit_controller', 'config', 'conversation', 'aussie_broadband', 'application_credentials', 'cover', 'ld2410_ble', 'energy', 'bluetooth_adapters', 'person', 'image_upload', 'utility_meter', 'alexa_media', 'sensor', 'counter', 'default_config', 'hacs', 'co2signal', 'input_text', 'google', 'hardkernel', 'binary_sensor', 'file_upload', 'analytics', 'daikin', 'system_health', 'lifx', 'input_datetime', 'media_source', 'input_boolean', 'trace', 'bhyve', 'lovelace', 'schedule', 'automation', 'shopping_list', 'diagnostics', 'zone', 'sun', 'stream', 'script', 'device_automation', 'mqtt', 'esphome', 'history', 'cast', 'timer', 'camera', 'shelly', 'zha', 'scene', 'input_number', 'switch_as_x', 'spotify', 'sonoff', 'bureau_of_meteorology', 'bthome', 'nut', 'garbage_collection', 'my', 'forecast_solar', 'unifi', 'group', 'integration', 'tts', 'hardware', 'ttlock', 'map', 'blueprint', 'light', 'input_button', 'xiaomi_miio', 'localtuya', 'tuya', 'rest_command', 'persistent_notification', 'surepetcare', 'ipp', 'logbook', 'python_script', 'input_select'}

2023-04-25 13:40:14.390 INFO (MainThread) [homeassistant.setup] Setting up ttlock
2023-04-25 13:40:14.391 INFO (MainThread) [homeassistant.setup] Setup of domain ttlock took 

2023-04-25 13:40:15.888 DEBUG (MainThread) [custom_components.ttlock.api] [1ae9] Sending request to https://euapi.ttlock.com/v3/lock/list with args={'pageNo': 1, 'pageSize': 1000}
2

2023-04-25 13:40:18.019 DEBUG (MainThread) [custom_components.ttlock.api] [1ae9] Received response: status=200: body={'list': [{'date': 1681786636000, 'specialValue': 557905396, 'lockAlias': 'server lock', 'noKeyPwd': '5543703', 'electricQuantityUpdateDate': 1682242217000, 'lockMac': 'D8:C4:D3:66:E8:B6', 'passageMode': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'featureValue': 'C27442140F5F4', 'electricQuantity': 80, 'bindDate': 1681786636000, 'lockData': 'GYQ5KzVNalE2nyWfI0qRwuKaYknsI50dqwjfF8nlxlz1D4zTHcQS28lTV2NFXGEpSWoBPp3qfIrqcqMcyfUSm+Bkh3Vvpt6YvAtTbvBXuQzkjDhYDNc5NtzgjmGTiljTYOo34tqhE999yoeKHr5i8hiGvn9TS3WhYb24bA6OATVPK8IhJsZOHayMKi6d83J6yQjK4FpAM/IxPEPNgpfTl8VUanujCGfj5Dxw5CXxjg9sA9kiz2r7120B9Jvq+WpPStmlSfci3Pvo4lvVPnv5Q6bxurJC0dSFqWb7BaygNC3aD/ITJhRygJePM7OOCbJBFVYP/6wFg2TyPiTT3104JfMkN46GOhKZDuBkN8Ih0lVNTbHIxk44mkuWoV/DdW05qr0YZBcg1oEIJx5Q1b9ibAPhzEnCi2IgT+ZbKybTk3flrxNkoH6362a3ej4OItPxN486pRlo5ryeHYuZ0xlFzuie5zirSY5OMSpL+szo6prJz3vKZiiumow7PMM5bIkOuzhzZSpixBD40vZyXdK5zL1qoZ+1q61Jed/0OstcY1kkzt/OP6eaJi58j7ogEyz2xvOL7hvAEcizLEmRsM9cF1lhHohAngnW92OoICs2R5DT7C+qTqq038EI0E0UNCXQIu8cNzOcwxBJVVeoBSPJARCkwWjfZigJk5tHaveZLAhI/eIphIA7ADzjTrCICSXYymZm6kgqk9uPiyTSnmjf2xU+TCxn5ZievR9iQmbwiLxVSKqSXYsHpG6/WG07CVJ3mYF6IusyxeykuaaUTSaQBNjE02botg==', 'hasGateway': 1, 'keyboardPwdVersion': 4, 'wirelessKeypadFeatureValue': '0', 'lockVersion': {'showAdminKbpwdFlag': True, 'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'logoUrl': '', 'scene': 2}, 'lockName': 'P2_b6e866'}, {'date': 1662010386000, 'lockAlias': 'Front Door', 'groupId': 414930, 'electricQuantityUpdateDate': 1682397301000, 'lockMac': '2E:39:B6:C6:EB:C6', 'featureValue': 'F44354CD5F7', 'hasGateway': 1, 'wirelessKeypadFeatureValue': '0', 'lockName': 'S31_c6ebc6', 'specialValue': 894227959, 'noKeyPwd': '6841778', 'passageMode': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'groupName': 'House', 'bindDate': 1662010386000, 'lockData': '90+5Ige0GHfLn3P900jF1P6fgdlSrDDpa2tQdHcBPHiJUjXjy99zw3fn+XSFDpFbupIfcsDEpvcWRj+UY5/3TlTeM4j3c1uRkjmHPdE8TK+cRPlPw75KNlbK6Oh8CliKscgDnnJuRGnnJ+VCRvhWzWco2UFY2aV3LDUBkcfZFfVhtqBPmVTK9Y8b37wj9MNWqKtKDXJXr1QA3t4z6upR6eba9WKe6YfHHQfDFJQm6cx7eTHZ614BzEuaecmpV1TA/9hXUwBxzISTJdlGP7iS437xhk9X/giOwGjDPtNbtlfE4oAy8WBh7B7JLJk9G71LpA35STn9nkU5lwyN1nBvjVtNBxbcK4fdr9INKUL0Jq0Fg3uxNnCPpSdtBZEXUogS2DgLlhGSE38iRGSvdbMu9squkID1EI/ZQe/HGyj8ATM2mRj2VUmDX5mBpTBAXuSyVXH2dKLOvc5GY6XpaUs1CV7O7MyXwUl7IQPGWQCWr7mYCrDZypsJZUG17kMWae7Tncamb7nypbLTESsa7y+Fr5jQAFrzGvX4ToxIx+ppYR6PugvYj+agtm3qLISz+X1J+6S6Uo4vmpdsmu3marv2L1SxEIS8oSiQVhTnA61ESFOMetCp8OQHyOO1A0JrvoM5lm1YO+aPxEQLz6cDzTScXdxCTnjgWbszYsJvurtGC77VHgMmPPPqRngG4R4YfAzI75TfH4rJPZbiHiLKYChWGzwBbwFCi6K22dvm/jYLe8kisMB88BVqGR6LbjRTj9MT4qB5j5ihUkUUAGGPxiz0ki45tsbrxg==', 'keyboardPwdVersion': 4, 'lockVersion': {'showAdminKbpwdFlag': True, 'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'logoUrl': '', 'scene': 2}}], 'pageNo': 1, 'pageSize': 1000, 'pages': 1, 'total': 2}

2023-04-25 13:40:18.087 DEBUG (MainThread) [custom_components.ttlock.api] [a469] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 13:40:18.090 DEBUG (MainThread) [custom_components.ttlock.api] [7df0] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}

2023-04-25 13:40:18.419 DEBUG (MainThread) [custom_components.ttlock.api] [a469] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 13:40:18.420 DEBUG (MainThread) [custom_components.ttlock.api] [6d23] Sending request to https://euapi.ttlock.com/v3/lock/queryOpenState with args={'lockId': 6901284}

2023-04-25 13:40:19.718 DEBUG (MainThread) [custom_components.ttlock.api] [7df0] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}

2023-04-25 13:40:25.429 DEBUG (MainThread) [custom_components.ttlock.api] [6d23] Received response: status=200: body={'state': 0}
2023-04-25 13:40:25.430 DEBUG (MainThread) [custom_components.ttlock.api] [3d3a] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 13:40:25.433 DEBUG (MainThread) [custom_components.ttlock.api] [5971] Sending request to https://euapi.ttlock.com/v3/lock/queryOpenState with args={'lockId': 6262870}
2

2023-04-25 13:40:25.666 DEBUG (MainThread) [custom_components.ttlock.api] [3d3a] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 13:40:25.667 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 7.580 seconds (success: True)

2023-04-25 13:40:45.318 DEBUG (MainThread) [custom_components.ttlock.api] [5971] Received response: status=200: body={'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 13:40:45.318 DEBUG (MainThread) [custom_components.ttlock.api] [5971] API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 13:40:45.318 DEBUG (MainThread) [custom_components.ttlock.api] [345a] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 13:40:45.548 DEBUG (MainThread) [custom_components.ttlock.api] [345a] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 13:40:45.548 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 27.458 seconds (success: True)
2023-04-25 13:40:45.554 INFO (MainThread) [homeassistant.components.lock] Setting up lock.ttlock
2023-04-25 13:40:45.557 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ttlock

2023-04-25 13:41:46.178 INFO (MainThread) [custom_components.ttlock] Webhook registered at https://hooks.nabu.casa/gAAAAABkQJ8SB4JMinpsueivFDX7_lCrWrMhJblGHmq6t4bTtEpzk-L8DG5n4LILHDZsvL5RaBaargzp5J3QapnHOlubhxstGhWnLAMTdlT22pdvzAQbWxvRpI2YHF44vNcH0dB2qH93MQsz2-IbM82np2QbwfGc1ynBs_FcOIHHPXICOFvtTIA=

2023-04-25 13:44:15.340 DEBUG (MainThread) [custom_components.ttlock.api] [3e69] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6262870}
2023-04-25 13:44:19.745 DEBUG (MainThread) [custom_components.ttlock.api] [3e69] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 13:44:28.546 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6262870', 'notifyType': '1', 'records': '[{"lockId":6262870,"electricQuantity":69,"serverDate":1682401468235,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"2E:39:B6:C6:EB:C6","keyboardPwd":"","lockDate":1682401457000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': '2E:39:B6:C6:EB:C6')>
2023-04-25 13:44:28.547 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6262870 received id=6262870 mac='2E:39:B6:C6:EB:C6' battery_level=69 server_ts=datetime.datetime(2023, 4, 25, 13, 44, 28, 235000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 13, 44, 17, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 13:44:28.549 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 13:45:17.324 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 60 seconds
2023-04-25 13:45:17.324 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 13:45:46.289 DEBUG (MainThread) [custom_components.ttlock.api] [40b0] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
2023-04-25 13:45:49.792 DEBUG (MainThread) [custom_components.ttlock.api] [40b0] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}

2023-04-25 13:46:26.928 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682401586631,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682401552000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 13:46:26.929 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 13, 46, 26, 631000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 13, 45, 52, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 13:46:26.930 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 13:46:26.933 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 13:46:26.933 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 13:47:09.290 DEBUG (MainThread) [custom_components.ttlock.api] [6037] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}

2023-04-25 13:47:17.103 DEBUG (MainThread) [custom_components.ttlock.api] [6037] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}

2023-04-25 13:47:23.651 DEBUG (MainThread) [custom_components.ttlock.api] [bf06] Sending request to https://euapi.ttlock.com/v3/lock/lock with args={'lockId': 6901284}
2023-04-25 13:47:43.443 DEBUG (MainThread) [custom_components.ttlock.api] [bf06] Received response: status=200: body={'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 13:47:43.444 DEBUG (MainThread) [custom_components.ttlock.api] [bf06] API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 13:47:43.453 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall lock.lock (c:01GYVF7K3XQCPH8MD5B75KY62B): entity_id=['lock.server_lock_2']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1838, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/lock/__init__.py", line 96, in _async_lock
    await entity.async_lock(**remove_entity_service_fields(service_call))
  File "/config/custom_components/ttlock/lock.py", line 44, in async_lock
    await self.coordinator.lock()
  File "/config/custom_components/ttlock/coordinator.py", line 216, in lock
    res = await self.api.lock(self.lock_id)
  File "/config/custom_components/ttlock/api.py", line 129, in lock
    res = await self.get("lock/lock", lockId=lock_id)
  File "/config/custom_components/ttlock/api.py", line 101, in get
    raise RequestFailed(f"API returned: {res}")
custom_components.ttlock.api.RequestFailed: API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}

2023-04-25 13:48:09.418 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682401689129,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682401633000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 13:48:09.419 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 13, 48, 9, 129000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 13, 47, 13, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 13:48:09.421 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 13:48:09.427 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 13:48:09.427 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 14:00:17.217 DEBUG (MainThread) [custom_components.ttlock.api] [ed22] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 14:00:18.398 DEBUG (MainThread) [custom_components.ttlock.api] [ed22] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:00:18.399 DEBUG (MainThread) [custom_components.ttlock.api] [ed8f] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 14:00:18.631 DEBUG (MainThread) [custom_components.ttlock.api] [ed8f] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 14:00:18.632 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.415 seconds (success: True)

2023-04-25 14:03:09.281 DEBUG (MainThread) [custom_components.ttlock.api] [d7c8] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 14:03:09.815 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Bedroom Sockets Isolator' for shelly integration not ready yet: DeviceConnectionError(); Retrying in background
2023-04-25 14:03:10.353 DEBUG (MainThread) [custom_components.ttlock.api] [d7c8] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:03:10.354 DEBUG (MainThread) [custom_components.ttlock.api] [fff1] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 14:03:10.580 DEBUG (MainThread) [custom_components.ttlock.api] [fff1] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 14:03:10.581 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.300 seconds (success: True)

2023-04-25 14:15:18.215 DEBUG (MainThread) [custom_components.ttlock.api] [0ce0] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 14:15:18.991 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 14:15:19.378 DEBUG (MainThread) [custom_components.ttlock.api] [0ce0] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:15:19.379 DEBUG (MainThread) [custom_components.ttlock.api] [c45f] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 14:15:19.606 DEBUG (MainThread) [custom_components.ttlock.api] [c45f] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 14:15:19.607 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.392 seconds (success: True)

2023-04-25 14:18:10.281 DEBUG (MainThread) [custom_components.ttlock.api] [8769] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 14:18:11.428 DEBUG (MainThread) [custom_components.ttlock.api] [8769] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:18:11.431 DEBUG (MainThread) [custom_components.ttlock.api] [0c3d] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 14:18:11.679 DEBUG (MainThread) [custom_components.ttlock.api] [0c3d] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 14:18:11.680 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.399 seconds (success: True)

023-04-25 14:30:19.299 DEBUG (MainThread) [custom_components.ttlock.api] [ea51] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 14:30:20.580 DEBUG (MainThread) [custom_components.ttlock.api] [ea51] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:30:20.581 DEBUG (MainThread) [custom_components.ttlock.api] [e1ec] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 14:30:20.827 DEBUG (MainThread) [custom_components.ttlock.api] [e1ec] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 14:30:20.828 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.529 seconds (success: True)

2023-04-25 14:33:11.281 DEBUG (MainThread) [custom_components.ttlock.api] [2f6e] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 14:33:12.354 DEBUG (MainThread) [custom_components.ttlock.api] [2f6e] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:33:12.356 DEBUG (MainThread) [custom_components.ttlock.api] [215c] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 14:33:12.593 DEBUG (MainThread) [custom_components.ttlock.api] [215c] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 14:33:12.593 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.312 seconds (success: True)

2023-04-25 14:45:20.216 DEBUG (MainThread) [custom_components.ttlock.api] [f40d] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 14:45:21.384 DEBUG (MainThread) [custom_components.ttlock.api] [f40d] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:45:21.387 DEBUG (MainThread) [custom_components.ttlock.api] [15db] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 14:45:21.619 DEBUG (MainThread) [custom_components.ttlock.api] [15db] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 14:45:21.619 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.404 seconds (success: True)

2023-04-25 14:48:12.283 DEBUG (MainThread) [custom_components.ttlock.api] [db8e] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 14:48:13.434 DEBUG (MainThread) [custom_components.ttlock.api] [db8e] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 14:48:13.435 DEBUG (MainThread) [custom_components.ttlock.api] [8b90] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 14:48:13.671 DEBUG (MainThread) [custom_components.ttlock.api] [8b90] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 14:48:13.671 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.389 seconds (success: True)

2023-04-25 15:00:21.215 DEBUG (MainThread) [custom_components.ttlock.api] [8084] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 15:00:22.406 DEBUG (MainThread) [custom_components.ttlock.api] [8084] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 15:00:22.407 DEBUG (MainThread) [custom_components.ttlock.api] [a37d] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 15:00:22.641 DEBUG (MainThread) [custom_components.ttlock.api] [a37d] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 15:00:22.641 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.427 seconds (success: True)

2023-04-25 15:03:13.281 DEBUG (MainThread) [custom_components.ttlock.api] [ad20] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 15:03:14.429 DEBUG (MainThread) [custom_components.ttlock.api] [ad20] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 15:03:14.430 DEBUG (MainThread) [custom_components.ttlock.api] [79bd] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 15:03:14.675 DEBUG (MainThread) [custom_components.ttlock.api] [79bd] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 15:03:14.676 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.395 seconds (success: True)

2023-04-25 15:14:10.842 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6262870', 'notifyType': '1', 'records': '[{"lockId":6262870,"electricQuantity":69,"serverDate":1682406850525,"recordTypeFromLock":20,"recordType":8,"success":1,"lockMac":"2E:39:B6:C6:EB:C6","keyboardPwd":"46881467138048","lockDate":1682406844000,"username":"Steve"}]', 'admin': 'cabfc_ttlock', 'lockMac': '2E:39:B6:C6:EB:C6')>
2023-04-25 15:14:10.843 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6262870 received id=6262870 mac='2E:39:B6:C6:EB:C6' battery_level=69 server_ts=datetime.datetime(2023, 4, 25, 15, 14, 10, 525000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 14, 4, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by fingerprint')) user='Steve' success=True
2023-04-25 15:14:10.844 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 15:15:04.323 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 60 seconds
2023-04-25 15:15:04.324 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 15:18:14.282 DEBUG (MainThread) [custom_components.ttlock.api] [3a97] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}

2023-04-25 15:18:15.464 DEBUG (MainThread) [custom_components.ttlock.api] [3a97] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 15:18:15.465 DEBUG (MainThread) [custom_components.ttlock.api] [cdcf] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 15:18:15.698 DEBUG (MainThread) [custom_components.ttlock.api] [cdcf] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 15:18:15.698 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.417 seconds (success: True)

2023-04-25 15:20:44.050 DEBUG (MainThread) [custom_components.ttlock.api] [7329] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
2023-04-25 15:20:46.840 DEBUG (MainThread) [custom_components.ttlock.api] [7329] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:20:48.684 DEBUG (MainThread) [custom_components.ttlock.api] [72b3] Sending request to https://euapi.ttlock.com/v3/lock/lock with args={'lockId': 6901284}
2023-04-25 15:20:49.382 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 15:20:50.658 DEBUG (MainThread) [custom_components.ttlock.api] [72b3] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:20:59.052 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407258572,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407239000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:20:59.053 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 20, 58, 572000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 20, 39, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 15:20:59.055 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:20:59.422 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407259126,"recordTypeFromLock":26,"recordType":11,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407248000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:20:59.422 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 20, 59, 126000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 20, 48, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.lock: 2>, description='lock by app')) user='cabfc_ttlock' success=True
2023-04-25 15:20:59.423 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:21:09.495 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:21:09.496 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 15:20:44.050 DEBUG (MainThread) [custom_components.ttlock.api] [7329] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
2023-04-25 15:20:46.840 DEBUG (MainThread) [custom_components.ttlock.api] [7329] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:20:48.684 DEBUG (MainThread) [custom_components.ttlock.api] [72b3] Sending request to https://euapi.ttlock.com/v3/lock/lock with args={'lockId': 6901284}
2023-04-25 15:20:49.382 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 15:20:50.658 DEBUG (MainThread) [custom_components.ttlock.api] [72b3] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:20:59.052 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407258572,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407239000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:20:59.053 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 20, 58, 572000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 20, 39, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 15:20:59.055 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:20:59.422 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407259126,"recordTypeFromLock":26,"recordType":11,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407248000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:20:59.422 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 20, 59, 126000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 20, 48, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.lock: 2>, description='lock by app')) user='cabfc_ttlock' success=True
2023-04-25 15:20:59.423 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:21:09.495 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:21:09.496 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 15:23:49.381 DEBUG (MainThread) [custom_components.ttlock.api] [2081] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
2023-04-25 15:23:49.396 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 15:23:55.450 DEBUG (MainThread) [custom_components.ttlock.api] [2081] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:24:19.095 DEBUG (MainThread) [custom_components.ttlock.api] [d354] Sending request to https://euapi.ttlock.com/v3/lock/lock with args={'lockId': 6901284}
2023-04-25 15:24:19.397 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 15:24:33.357 DEBUG (MainThread) [custom_components.ttlock.api] [d354] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}

2023-04-25 15:27:50.660 DEBUG (MainThread) [custom_components.ttlock.api] [3748] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
2023-04-25 15:28:11.874 DEBUG (MainThread) [custom_components.ttlock.api] [3748] Received response: status=200: body={'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 15:28:11.874 DEBUG (MainThread) [custom_components.ttlock.api] [3748] API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 15:28:11.885 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall lock.unlock (c:01GYVMZGW2YJ8P0SFMV6DY61Q8): entity_id=['lock.server_lock']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1838, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1857, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 216, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 977, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/lock/__init__.py", line 106, in _async_unlock
    await entity.async_unlock(**remove_entity_service_fields(service_call))
  File "/config/custom_components/ttlock/lock.py", line 48, in async_unlock
    await self.coordinator.unlock()
  File "/config/custom_components/ttlock/coordinator.py", line 223, in unlock
    res = await self.api.unlock(self.lock_id)
  File "/config/custom_components/ttlock/api.py", line 140, in unlock
    res = await self.get("lock/unlock", lockId=lock_id)
  File "/config/custom_components/ttlock/api.py", line 101, in get
    raise RequestFailed(f"API returned: {res}")
custom_components.ttlock.api.RequestFailed: API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
2023-04-25 15:28:17.242 DEBUG (MainThread) [custom_components.ttlock.api] [2c70] Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
2023-04-25 15:28:19.423 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 15:28:19.617 DEBUG (MainThread) [custom_components.ttlock.api] [2c70] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:28:26.180 DEBUG (MainThread) [custom_components.ttlock.api] [7664] Sending request to https://euapi.ttlock.com/v3/lock/lock with args={'lockId': 6901284}
2023-04-25 15:28:41.754 DEBUG (MainThread) [custom_components.ttlock.api] [7664] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}
2023-04-25 15:28:41.765 DEBUG (MainThread) [custom_components.ttlock.api] [c69c] Sending request to https://euapi.ttlock.com/v3/lock/lock with args={'lockId': 6901284}
2023-04-25 15:28:42.924 DEBUG (MainThread) [custom_components.ttlock.api] [c69c] Received response: status=200: body={'errcode': 0, 'errmsg': 'none error message or means yes', 'description': '表示成功或是'}

2023-04-25 15:30:03.566 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407803264,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407433000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:03.567 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 3, 264000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 23, 53, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 15:30:03.569 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:03.576 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:30:03.576 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:04.215 DEBUG (MainThread) [custom_components.ttlock.api] [4452] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 15:30:04.606 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407804318,"recordTypeFromLock":20,"recordType":8,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"48177526013952","lockDate":1682407439000,"username":"steve"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:04.606 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 4, 318000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 23, 59, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by fingerprint')) user='steve' success=True
2023-04-25 15:30:04.608 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:04.617 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:30:04.618 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:05.387 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407805106,"recordTypeFromLock":20,"recordType":8,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"48177526013952","lockDate":1682407442000,"username":"steve"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:05.387 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 5, 106000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 24, 2, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by fingerprint')) user='steve' success=True
2023-04-25 15:30:05.389 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:05.394 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:30:05.395 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:05.409 DEBUG (MainThread) [custom_components.ttlock.api] [4452] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 15:30:05.409 DEBUG (MainThread) [custom_components.ttlock.api] [2f63] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 15:30:05.646 DEBUG (MainThread) [custom_components.ttlock.api] [2f63] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 15:30:05.646 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.431 seconds (success: True)
2023-04-25 15:30:16.589 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407816287,"recordTypeFromLock":20,"recordType":8,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"48194112585730","lockDate":1682407447000,"username":"Steve let thumb"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:16.589 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 16, 287000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 24, 7, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by fingerprint')) user='Steve let thumb' success=True
2023-04-25 15:30:16.590 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:16.595 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:30:16.595 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:17.337 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407817055,"recordTypeFromLock":26,"recordType":11,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407467000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:17.337 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 17, 55000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 24, 27, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.lock: 2>, description='lock by app')) user='cabfc_ttlock' success=True
2023-04-25 15:30:17.338 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:18.192 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407817905,"recordTypeFromLock":20,"recordType":8,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"48194112585730","lockDate":1682407473000,"username":"Steve let thumb"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:18.193 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 17, 905000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 24, 33, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by fingerprint')) user='Steve let thumb' success=True
2023-04-25 15:30:18.195 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:18.206 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:30:18.206 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:18.870 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407818504,"recordTypeFromLock":28,"recordType":12,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407693000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:18.871 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 18, 504000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 28, 13, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by gateway')) user='cabfc_ttlock' success=True
2023-04-25 15:30:18.873 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:18.881 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 15:30:18.881 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:19.420 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407819136,"recordTypeFromLock":26,"recordType":11,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407718000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:19.420 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 19, 136000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 28, 38, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.lock: 2>, description='lock by app')) user='cabfc_ttlock' success=True
2023-04-25 15:30:19.421 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 15:30:19.936 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682407819651,"recordTypeFromLock":26,"recordType":11,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"","lockDate":1682407720000,"username":"cabfc_ttlock"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 15:30:19.937 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 15, 30, 19, 651000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 28, 40, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.lock: 2>, description='lock by app')) user='cabfc_ttlock' success=True
2023-04-25 15:30:19.938 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data

2023-04-25 15:45:05.215 DEBUG (MainThread) [custom_components.ttlock.api] [0a59] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 15:45:06.468 DEBUG (MainThread) [custom_components.ttlock.api] [0a59] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 15:45:06.468 DEBUG (MainThread) [custom_components.ttlock.api] [28e9] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 15:45:06.714 DEBUG (MainThread) [custom_components.ttlock.api] [28e9] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 15:45:06.715 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 1.500 seconds (success: True)
2023-04-25 15:45:19.281 DEBUG (MainThread) [custom_components.ttlock.api] [e56f] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6901284}
2023-04-25 15:45:19.445 INFO (MainThread) [custom_components.blueiris.api.blue_iris_api] Updating data from BI Server (BlueIris)
2023-04-25 15:45:19.526 DEBUG (MainThread) [custom_components.ttlock.api] [e56f] Received response: status=200: body={'date': 1681786636000, 'lockAlias': 'server lock', 'lockSound': 1, 'modelNum': 'SN275-5S-250MS-6V_PV53', 'lockMac': 'D8:C4:D3:66:E8:B6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'C27442140F5F4', 'adminPwd': 'NjgsNjUsNjQsNzEsNjgsNzYsNzYsNjksNzEsNzAsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 30, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNzcsNjgsNjQsNzEsNzcsNzcsNzYsNjcsNjgsMTA=', 'isFrozen': 2, 'lockName': 'P2_b6e866', 'resetButton': 1, 'firmwareRevision': '6.4.11.220206', 'tamperAlert': 2, 'specialValue': 557905396, 'displayPasscode': 0, 'noKeyPwd': '5543703', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6901284, 'electricQuantity': 80, 'lockFlagPos': 0, 'lockUpdateDate': 1682242217000, 'keyboardPwdVersion': 4, 'aesKeyStr': '8a,df,b9,3d,fd,25,ec,2e,29,bd,54,b2,9d,9a,b6,1c', 'hardwareRevision': '1.8', 'openDirection': 2, 'lockVersion': {'groupId': 1, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 1, 'scene': 2}, 'sensitivity': 0}
2023-04-25 15:45:19.528 DEBUG (MainThread) [custom_components.ttlock.api] [338c] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6901284}
2023-04-25 15:45:19.846 DEBUG (MainThread) [custom_components.ttlock.api] [338c] Received response: status=200: body={'autoUnlock': 2, 'weekDays': [], 'passageMode': 2}
2023-04-25 15:45:19.846 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 0.565 seconds (success: True)

2023-04-25 16:00:06.215 DEBUG (MainThread) [custom_components.ttlock.api] [d770] Sending request to https://euapi.ttlock.com/v3/lock/detail with args={'lockId': 6262870}
2023-04-25 16:00:08.790 DEBUG (MainThread) [custom_components.ttlock.api] [d770] Received response: status=200: body={'date': 1662010386000, 'lockAlias': 'Front Door', 'lockSound': 1, 'modelNum': 'SN9206_PV53', 'lockMac': '2E:39:B6:C6:EB:C6', 'privacyLock': 2, 'deletePwd': '', 'featureValue': 'F44354CD5F7', 'adminPwd': 'NjgsNzcsNzYsNjcsNjksNjgsNjcsNjYsNzEsNjgsMTA=', 'soundVolume': 5, 'hasGateway': 1, 'autoLockTime': 60, 'wirelessKeypadFeatureValue': '0', 'lockKey': 'NjgsNjgsNzEsNzcsNjUsNjksNzYsNjUsNjcsNjUsMTA=', 'isFrozen': 2, 'lockName': 'S31_c6ebc6', 'resetButton': 1, 'firmwareRevision': '6.0.5.210605', 'tamperAlert': 1, 'specialValue': 894227959, 'displayPasscode': 0, 'noKeyPwd': '6841778', 'passageMode': 2, 'passageModeAutoUnlock': 2, 'timezoneRawOffset': 28800000, 'lockId': 6262870, 'electricQuantity': 65, 'lockFlagPos': 0, 'lockUpdateDate': 1682397301000, 'keyboardPwdVersion': 4, 'aesKeyStr': 'd5,59,46,b1,75,50,5e,05,0e,35,be,61,c5,6e,06,2d', 'hardwareRevision': '1.6', 'openDirection': 2, 'lockVersion': {'groupId': 10, 'protocolVersion': 3, 'protocolType': 5, 'orgId': 34, 'scene': 2}, 'sensitivity': 0}
2023-04-25 16:00:08.792 DEBUG (MainThread) [custom_components.ttlock.api] [a6d6] Sending request to https://euapi.ttlock.com/v3/lock/getPassageModeConfig with args={'lockId': 6262870}
2023-04-25 16:00:09.033 DEBUG (MainThread) [custom_components.ttlock.api] [a6d6] Received response: status=200: body={'autoUnlock': 2, 'isAllDay': 1, 'endDate': 1350, 'weekDays': [3], 'passageMode': 2, 'startDate': 700}
2023-04-25 16:00:09.034 DEBUG (MainThread) [custom_components.ttlock.coordinator] Finished fetching ttlock data in 2.819 seconds (success: True)
2023-04-25 16:00:17.329 DEBUG (MainThread) [custom_components.ttlock] Got webhook data: <MultiDict('lockId': '6901284', 'notifyType': '1', 'records': '[{"lockId":6901284,"electricQuantity":83,"serverDate":1682409617039,"recordTypeFromLock":20,"recordType":8,"success":1,"lockMac":"D8:C4:D3:66:E8:B6","keyboardPwd":"48177526013952","lockDate":1682409561000,"username":"steve"}]', 'admin': 'cabfc_ttlock', 'lockMac': 'D8:C4:D3:66:E8:B6')>
2023-04-25 16:00:17.330 DEBUG (MainThread) [custom_components.ttlock.coordinator] Lock ttlock-6901284 received id=6901284 mac='D8:C4:D3:66:E8:B6' battery_level=83 server_ts=datetime.datetime(2023, 4, 25, 16, 0, 17, 39000, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) lock_ts=datetime.datetime(2023, 4, 25, 15, 59, 21, tzinfo=zoneinfo.ZoneInfo(key='Australia/Perth')) event=Event(EventDescription(action=<Action.unlock: 3>, description='unlock by fingerprint')) user='steve' success=True
2023-04-25 16:00:17.331 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
2023-04-25 16:00:17.342 DEBUG (MainThread) [custom_components.ttlock.coordinator] Assuming lock auto locked after 30 seconds
2023-04-25 16:00:17.342 DEBUG (MainThread) [custom_components.ttlock.coordinator] Manually updated ttlock data
stevearmitage commented 1 year ago

I used to have the TTLock2MQTT integration - not sure when today I removed it, as it was not doing anything - in case these appear in the logs. Thanks @jbergler for all your work on this.

jbergler commented 1 year ago

Thanks for sharing the logs, I'm not sure how much I can do with this besides maybe adding better error handling

There's not much to these endpoints, and all we get back is this non-descript error.

Sending request to https://euapi.ttlock.com/v3/lock/unlock with args={'lockId': 6901284}
Received response: status=200: body={'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}

One thing I could recommend is removing instance of ttlock from your integrations page, resetting your client_secret in the ttlock portal and then re-adding your account from scratch in home assistant. There's no logical explanation for why this would help, but I found that this was sometimes necessary when I was having webhook issues during testing.

stevearmitage commented 1 year ago

Both door locks are working better than they have with any other integration. Let's close and see what happens. Thanks again for your work on this.