kind3r / hass-addons

Integration of the offline TTLock sdk into Home Assistant
59 stars 21 forks source link

Pairing completed but not working #41

Open mabrochu-helpox opened 2 years ago

mabrochu-helpox commented 2 years ago

I was able to pair the lock with the addon, but its not working i got this in the log

Peripheral connect start
Peripheral connect triggered
Peripheral state: connected
Device emiting connected
BLE Device reading basic info
BLE Device discover services start
BLE Device discover services end
BLE Device read characteristics start
BLE Device read characteristics end
BLE Device read characteristics start
BLE Device read characteristics end
BLE Device read basic info
BLE Device subscribed
Lock waiting for connection to be completed
========= init
========= init
========= AES key
Bad CRC should be 133 and we got 178
========= AES key: c8a46e421d407c5fd0c24bee6a3d6fe2
========= admin
Setting adminPs 73617176 and unlockKey 82622422
========= admin: { adminPs: 73617176, unlockKey: 82622422 }
========= time
========= time
========= feature list
<Buffer 64 71 c4 f5 f1 00 00 05 10 00 00 00 00 00 00 00 00>
========= feature list Set(18) {
  0,
  4,
  5,
  6,
  7,
  8,
  10,
  12,
  13,
  14,
  15,
  18,
  22,
  23,
  24,
  28,
  29,
  30
}
========= lockSound
Error: Failed to set audio mode
    at TTLock.audioManageCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:234:23)
    at async TTLock.initLock (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:172:33)
    at async Manager.initLock (/app/src/manager.js:167:19)
    at async WebSocket.<anonymous> (/app/api/index.js:52:30)
========= lockSound: undefined
========= autoLockTime
========= autoLockTime: 0
========= getAdminCode
========= getAdminCode 
========= set adminPasscode
Generated adminPasscode: 6746702
SetAdminKeyboardPwdCommand received: <Buffer 64>
========= set adminPasscode: 6746702
========= remoteUnlock
========= remoteUnlock: 1
========= finished
========= finished
========= device info
========= device info: {
  featureValue: '',
  modelNum: 'SN138-D-T2-1S-GT312-T20-YD_PV53',
  hardwareRevision: '1.8',
  firmwareRevision: '5.3.3.210601',
  nbNodeId: '',
  nbOperator: '',
  nbCardNumber: '',
  nbRssi: -1,
  factoryDate: '29e41a46',
  lockClock: ''
}
========= check admin
========= check admin: 48263
========= check random
========= check random
========= autoLockTime
========= autoLockTime: 0
========= lockSound
Error getting lock sound status Error: Failed to set audio mode
    at TTLock.audioManageCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:234:23)
    at async TTLock.getLockSound (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:428:38)
    at async Function.fromTTLock (/app/api/Lock.js:51:22)
    at async Function.getLocks (/app/api/WsApi.js:182:20)
    at async Function.sendStatus (/app/api/WsApi.js:29:14)
Disconnected from lock D0:52:B3:9B:E3:06
Connect allready in progress
Connect to lock failed D0:52:B3:9B:E3:06
Connect allready in progress
Connect to lock failed D0:52:B3:9B:E3:06
Connect allready in progress
Connect to lock failed D0:52:B3:9B:E3:06
Connect allready in progress
Connect to lock failed D0:52:B3:9B:E3:06
greyslater commented 2 years ago

exactly the same for me Lock is paired and confirmed by the lock with beep sound but after that it refuses to work

Seems that after "Disconnected from lock" it won't connect anymore

Disconnected from lock DE:32:AD:CE:D5:CC Connect allready in progress Connect to lock failed DE:32:AD:CE:D5:CC Connect allready in progress Connect to lock failed DE:32:AD:CE:D5:CC Connect allready in progress Connect to lock failed DE:32:AD:CE:D5:CC

kfchoong commented 1 year ago

Facing similar issue with Raspberry Pi 4. Any updates or potential solutions?