Giter Site home page Giter Site logo

hass-addons's People

Contributors

kind3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hass-addons's Issues

Backup / restore lock data

Ability to download and upload private lock configuration data (AES key, admin, pwdInfo) in order to be able to restore on a new (or 2nd) HA instalation.

Config settings for G2 Gateway

Hey, hoping I can get this working, because it will be awesome. Is there any way to find the config settings for the G2 Gateway? I saw you mentioned it in the notes but I can find out how to add my gateway. Thanks.

Can not paired another lock

Hi,

I've add one lock on the Home assistant and it working fine.
When I want to add another lock, WebUI can not find it.

But I open the lock via fingerprint, the messages is show
"Emmiting paramsChanged { batteryCapacity: false, newEvents: false, lockedStatus: true }" -> unlocked
"Emmiting paramsChanged { batteryCapacity: false, newEvents: false, lockedStatus: true }" -> locked

Can you help me?

Thank you.

Problem during building addon

Hello

I can not install this addon, because failed on build.

The detail log is

21-04-28 18:51:47 INFO (SyncWorker_4) [supervisor.docker.addon] Starting build for 8dc774ce/armv7-addon-ttlock-hass-integration:0.4.0
21-04-28 18:51:54 ERROR (SyncWorker_4) [supervisor.docker.addon] Can't build 8dc774ce/armv7-addon-ttlock-hass-integration:0.4.0: The command '/bin/ash -o pipefail -c apk update' returned a non-zero code: 2
21-04-28 18:51:54 ERROR (SyncWorker_4) [supervisor.docker.addon] Build log:
Step 1/19 : ARG BUILD_FROM

Step 2/19 : FROM $BUILD_FROM

---> 4217c0d7148d

Step 3/19 : ENV LANG C.UTF-8

---> Using cache

---> 88662ca0cd2b

Step 4/19 : RUN apk update

---> Running in b95642071aaf

fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/armv7/APKINDEX.tar.gz

ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: No such file or directory

fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/armv7/APKINDEX.tar.gz

ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/community: temporary error (try again later)

WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: No such file or directory

2 errors; 43 distinct packages available

Removing intermediate container b95642071aaf

Please help me to solve, Thank you.

STATUS UPDATE ISSUE

Locking and unlocking actually working but interface is getting wrong status from the lock.
After pressing "unlock" the lock is moving and status correctly changed to "locked" while after couple of seconds it changes back to "unlocked" but the lock is locked....

under configuration I've tried to play with "autoLockTime" moving from "-1" to "0" but nothing happened.
wondering what "lockedStatus = 0" means...

pairing issue

Error while initialising lock Error: Failed setting lock time
    at TTLock.calibrateTimeCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:174:23)
    at async TTLock.initLock (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:143:13)
    at async Manager.initLock (/app/src/manager.js:167:19)
    at async WebSocket.<anonymous> (/app/api/index.js:52:30)

lock adds administrator then deletes administrator

can't use a lock

Debug communication ON

[email protected] start
node ./index.js
MQTT connected
Monitor started
Server started
Monitor stopped
BLE Scan started
Discovered new lock: {"id":"debcaa1245ba","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"DE:BC:AA:12:45:BA","rssi":-63,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":100,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
New lock found, stopping scan
BLE Scan stopped
Refreshing paired locks
Monitor started
Monitor stopped
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
at async Manager._connectLock (/app/src/manager.js:583:21)
at async Manager.initLock (/app/src/manager.js:163:13)
at async WebSocket. (/app/api/index.js:52:30)
Connect failed
Lock connect failed
Connect to lock failed DE:BC:AA:12:45:BA
Connect allready in progress
Connect to lock failed DE:BC:AA:12:45:BA

I'm at a loss.

Pairing completed but not working

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

Connect allready in progress

Slightly different issue from the ones already posted I think.

My lock has firmware 5.1.200320, no updates available according when paired with official app.

Like others are reporting, pairing is OK, but no other operation works.
But I get a different error message: Connect allready in progress

Below log is from server restart followed by an attempt to save settings:

IGNORE CRC TRUE
Debug communication ON
> [email protected] start
> node ./index.js
MQTT connected
Monitor started
Discovered paired lock: D4:39:49:D6:A4:7A
Monitor stopped
Peripheral connect start
Server started
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
Connected to known lock, reading general data
========= feature list
Sending command: 7f5a0503010001000101aa001c0d0a
Lock waiting for connection to be completed
Received response: 7f5a050302000a002254aa103ea4bffddd9a325e5c57a2589208a0c57a0d0a
Command: 64344cd1f7
<Buffer 64 34 4c d1 f7>
========= feature list Set(16) { 0, 1, 2, 4, 5, 6, 7, 8, 12, 14, 15, 18, 19, 22, 28, 29 }
========= check admin
Sending command: 7f5a0503010001000141aa10999654050bdc0d7a8406cc051d050ae3150d0a
Received response: 7f5a050302000a002254aa10119c0dc3122c0be64d0caef2e0719789c50d0a
Bad CRC should be 8 and we got 197
Command: 000063d2
========= check admin: 25554
========= check random
Sending command: 7f5a0503010001000130aa10b173031c39cdcb545df86a3a29a3cee3230d0a
Received response: 7f5a050302000a002254aa103c91574436208cd41258e39abc5ee517080d0a
Command: 64
========= check random
========= autoLockTime
Sending command: 7f5a0503010001000136aa1056d696acf03a377dff7af39bd517cf0b5e0d0a
Received response: 7f5a050302000a002254aa103ce00ba816151803490574c73bda8671c30d0a
Command: 6401000500050384
========= autoLockTime: 5
========= lockSound
Sending command: 7f5a0503010001000162aa1056d696acf03a377dff7af39bd517cf0ba00d0a
Received response: 7f5a050302000a002254aa104228f8011225b9a71a2c219f2b363433480d0a
Command: 640101
========= lockSound: 1
Connected to paired lock D4:39:49:D6:A4:7A
Successful connect attempt to paired lock D4:39:49:D6:A4:7A
Disconnected from lock D4:39:49:D6:A4:7A
Connect allready in progress
Connect to lock failed D4:39:49:D6:A4:7A

Cant pair lock

lock

Cant seem to get the lock to show any options. Am I missing something?

LOG:

[email protected] start /app
node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Monitor started
Server started
Discovered new lock: {"id":"fa4f7fdd6db7","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"FA:4F:7F:DD:6D:B7","rssi":-79,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":true,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":30,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Monitor stopped
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
at async Manager._connectLock (/app/src/manager.js:583:21)
at async Manager.initLock (/app/src/manager.js:163:13)
at async WebSocket. (/app/api/index.js:52:30)
Connect failed
Lock connect failed
Connect to lock failed FA:4F:7F:DD:6D:B7
Peripheral connect triggered
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
at async Manager._connectLock (/app/src/manager.js:583:21)
at async Manager.initLock (/app/src/manager.js:163:13)
at async WebSocket. (/app/api/index.js:52:30)
Connect failed
Lock connect failed
Connect to lock failed FA:4F:7F:DD:6D:B7
Peripheral connect triggered
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 basic info
BLE Device subscribed
Lock connect failed
Connect to lock failed FA:4F:7F:DD:6D:B7
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 basic info
BLE Device subscribed
Lock connect failed
Connect to lock failed FA:4F:7F:DD:6D:B7
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
at async Manager._connectLock (/app/src/manager.js:583:21)
at async Manager.initLock (/app/src/manager.js:163:13)
at async WebSocket. (/app/api/index.js:52:30)
Connect failed
Lock connect failed
Connect to lock failed FA:4F:7F:DD:6D:B7
Peripheral connect triggered

Device Paired but no functions work

> [email protected] start /app
> node ./index.js

MQTT connected
Monitor started
Discovered new lock: {"id":"xxxxxxxxxxxx","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"xxxxxxxxxxxx","rssi":-76,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":76,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Server started
Monitor stopped
Connect to lock failed xxxxxxxxxxxx
========= init
========= init
========= AES key
Bad CRC should be 216 and we got 172
========= AES key: xxxxxxxxxxxxxxxxxxxxxxxxxx
========= admin
Setting adminPs xxxxxxx and unlockKey xxxxxxx
Error while initialising lock Error: Failed AddAdmin
    at TTLock.addAdminCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:147:23)
    at async TTLock.initLock (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:139:27)
    at async Manager.initLock (/app/src/manager.js:167:19)
    at async WebSocket.<anonymous> (/app/api/index.js:52:30)
========= init
Bad CRC should be 19 and we got 184
Bad CRC should be 19 and we got 184
Bad CRC should be 19 and we got 184
========= init
========= AES key
Bad CRC should be 220 and we got 90
========= AES key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
========= admin
Setting adminPs xxxxxxxxx and unlockKey xxxxxxx
========= admin: { adminPs: xxxxxxxx, unlockKey: xxxxxxxxx }
========= time
========= time
========= feature list
<Buffer 4c 04 4c d5 f7>
========= feature list Set(15) { 0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 14, 15, 18, 19, 22 }
========= lockSound
========= lockSound: 1
========= autoLockTime
Error while initialising lock Error: Failed to set/get autoLockTime
    at TTLock.searchAutoLockTimeCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:316:23)
    at async TTLock.initLock (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:176:32)
    at async Manager.initLock (/app/src/manager.js:167:19)
    at async WebSocket.<anonymous> (/app/api/index.js:52:30)
Emmiting paramsChanged { batteryCapacity: true, newEvents: false, lockedStatus: false }


> [email protected] start /app
> node ./index.js

MQTT connected
Monitor started
Server started
Discovered new lock: {"id":"xxxxxxxxxxxx","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"xxxxxxxxxxxxxx","rssi":-61,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":100,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Discovered new lock: {"id":"xxxxxxxxxxxx","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"xxxxxxxxxxxxxx","rssi":-69,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":74,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Monitor stopped
========= init
========= init
========= AES key
========= AES key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
========= admin
Setting adminPs xxxxxx and unlockKey xxxxxxxx
========= admin: { adminPs: xxxxxxxx, unlockKey: xxxxxxxxx }
========= time
========= time
========= feature list
<Buffer 4a 04 4c d5 f7>
========= feature list Set(15) { 0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 14, 15, 18, 19, 22 }
========= lockSound
========= lockSound: 1
========= autoLockTime
========= autoLockTime: 5
========= getAdminCode
========= getAdminCode 
========= set adminPasscode
Generated adminPasscode: xxxxxx
SetAdminKeyboardPwdCommand received: <Buffer 4a>
========= set adminPasscode: xxxxxxx
========= remoteUnlock
========= remoteUnlock: 1
========= finished
========= finished
========= device info
Bad CRC should be 30 and we got 73
Bad CRC should be 30 and we got 73
Bad CRC should be 30 and we got 73
========= device info: {
  featureValue: '',
  modelNum: 'SN238_PV53',
  hardwareRevision: '1.1',
  firmwareRevision: '4.4.2.190705',
  nbNodeId: '',
  nbOperator: '',
  nbCardNumber: '',
  nbRssi: -1,
  factoryDate: '20190706',
  lockClock: ''
}
Disconnected from lock xxxxxxxxxxxxxx
Monitor started
Monitor stopped
Disconnected from lock xxxxxxxxxxxxxx
Monitor started
Monitor stopped

have the below in supervisor - not sure if related?

21-05-01 06:03:47 INFO (SyncWorker_0) [supervisor.docker.addon] Starting Docker add-on xxxxxxxx/amd64-addon-ttlock-hass-integration with version 0.4.0
21-05-01 06:03:48 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:55099 ssl:default [Connect call failed ('172.30.32.1', 55099)]
21-05-01 06:03:50 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:55099 ssl:default [Connect call failed ('172.30.32.1', 55099)]

Can't search for lock

When I go to the to the Web UI the search icon doesn't do anything.
This are the logs it doesn't do anything after server start

[email protected] start
node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Server started

If I go to the MQTT logs iget this error

1631846492: Socket error on client < unknown >, disconnecting.

Paired but disconnected inmediately. Sound and general error

Hi. First of all thanks for the big effort of doing something like this addon. Trying many times I coud paired my lock with the addon, but then I get disconnected and nothing works. The worst thing is that I cannot unpair it and I use it for my first front door. Could you help me? This is my log file:

[email protected] start
node ./index.js
MQTT connected
Monitor started
Server started
Discovered paired lock: E3:14:2E:D2:A5:64
Monitor stopped
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
Connected to known lock, reading general data
========= feature list
Lock waiting for connection to be completed
<Buffer 62 00 44 d1 e6>
========= feature list Set(11) { 1, 2, 5, 6, 7, 8, 12, 14, 15, 18, 22 }
========= lockSound
Failed reading all general data from lock Error: Failed to set audio mode
at TTLock.audioManageCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:234:23)
at async TTLock.onConnected (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:1252:38)
Connected to paired lock E3:14:2E:D2:A5:64
========= lockSound
Successful connect attempt to paired lock E3:14:2E:D2:A5:64
Disconnected from lock E3:14:2E:D2:A5:64
Error getting lock sound status Error: Disconnected while waiting for response
at TTBluetoothDevice.sendCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:193:39)
at async TTLock.audioManageCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:229:34)
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.sendLockStatus (/app/api/WsApi.js:43:21)

Thank you very much

Do i need to unpair with my phone for this to work?

I have setup the lock with my phone and the app. To use the HomeAssistant integration, do I need to reset the lock and disconnect from the app? It looks like my Bluetooth can see the phone, but not pair/connect

Is there a way I can maintain existing fingerprints?

Thanks!

Lock discovered but not showing up

Hi,

From the log seems that the lock was discovered but it does not apper in the UI. Can you help?

'''
[email protected] start
node ./index.js
[Error: ENOENT: no such file or directory, access โ€˜/data/lockData.jsonโ€™] {
errno: -2,
code: โ€˜ENOENTโ€™,
syscall: โ€˜accessโ€™,
path: โ€˜/data/lockData.jsonโ€™
}
[Error: ENOENT: no such file or directory, access โ€˜/data/aliasData.jsonโ€™] {
errno: -2,
code: โ€˜ENOENTโ€™,
syscall: โ€˜accessโ€™,
path: โ€˜/data/aliasData.jsonโ€™
}
MQTT connected
Monitor started
Server started
Discovered unknown lock: {โ€œidโ€:โ€œ2572f0f9aeacโ€,โ€œmanufacturerโ€:โ€œunknownโ€,โ€œmodelโ€:โ€œunknownโ€,โ€œhardwareโ€:โ€œunknownโ€,โ€œfirmwareโ€:โ€œunknownโ€,โ€œaddressโ€:โ€œ25:72:F0:F9:AE:ACโ€,โ€œrssiโ€:-51,โ€œprotocolTypeโ€:5,โ€œprotocolVersionโ€:3,โ€œsceneโ€:2,โ€œgroupIdโ€:0,โ€œorgIdโ€:0,โ€œlockTypeโ€:5,โ€œisTouchโ€:true,โ€œisUnlockโ€:false,โ€œhasEventsโ€:false,โ€œisSettingModeโ€:false,โ€œtxPowerLevelโ€:0,โ€œbatteryCapacityโ€:60,โ€œdateโ€:0,โ€œisWristbandโ€:false,โ€œisRoomLockโ€:true,โ€œisSafeLockโ€:false,โ€œisBicycleLockโ€:false,โ€œisLockcarโ€:false,โ€œisGlassLockโ€:false,โ€œisPadLockโ€:false,โ€œisCyLinderโ€:false,โ€œisRemoteControlDeviceโ€:false,โ€œisDfuModeโ€:false,โ€œisNoLockServiceโ€:false,โ€œremoteUnlockSwitchโ€:0,โ€œdisconnectStatusโ€:0,โ€œparkStatusโ€:0,โ€œlockSoundโ€:-1,โ€œautoLockTimeโ€:-1,โ€œprivateDataโ€:{},โ€œoperationLogโ€:[]} โ€˜โ€™โ€™

No user interface after clean install

I installed the add-on, but when I go to the UI, I get this:

https://sun9-63.userapi.com/impg/wjnRd83rUXw7--PDxRysn104f0gkVXQ8PLTThg/6l-UxkPfXwM.jpg?size=986x925&quality=96&sign=227d3d3f5db54482195893fe31105129&type=album]

And it always enpty...

Here is log:
`> [email protected] start

node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Monitor started
Server started
Discovered unknown lock: {"id":"e62f125b5ca6","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"E6:2F:12:5B:5C:A6","rssi":-68,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":true,"isSettingMode":false,"txPowerLevel":0,"batteryCapacity":65,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}`

Lock not updating status correctly

I have this set up and working pretty well with raykube k8 lock
The lock controller work fairly well but the issue I'm getting is that the lock always dufults to locked after a few minutes no matter the status.
I have the lock set up to not auto relock and it is in fack unlocked but the status is not correct.
It also does not change when I manually unlock if with a fingerprint, code, or card

[email protected] start
node ./index.js
MQTT connected
Monitor started
Discovered paired lock: REDACTED
Monitor stopped
Peripheral connect start
Server started
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
Connected to known lock, reading general data
========= feature list
Lock waiting for connection to be completed
<Buffer REDACTED>
========= feature list Set(19) {
0,
1,
2,
4,
5,
6,
7,
8,
12,
13,
14,
15,
18,
19,
22,
24,
28,
29,
30
}
========= check admin
========= check admin: REDACTED
========= check random
========= check random
========= autoLockTime
========= autoLockTime: 0
========= lockSound
========= lockSound: 0
Connected to paired lock REDACTED
Successful connect attempt to paired lock REDACTED
========= get OperationLog 65535
========= get OperationLog 21
========= get OperationLog 22
========= get OperationLog 22
========= get OperationLog 22

Lock was unlocked <<<<<<
Lock was unlocked <<<<<<
Lock is now locked <<<<<<
Disconnected from lock

Can't install on RPi 4

Trying to install on RPi 4 (Debian 10 Supervised HA) but got an error:
The command '/bin/bash -o pipefail -c apk update' returned a non-zero code: 2

Losing Connection after sometime with ESP32 gateway

I have the integration setup with the ESP32 gateway and have most the functionality i need. My problem in that the addon will periodically stop communicating with the lock and i have to restart the addon to to regain communication. bellow is the log when it stops communication.

Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
__at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
__at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
__at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
__at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
__at async Timeout.reconnectToLock [as _onTimeout] (/app/src/manager.js:837:22)
Connect failed
Lock connect failed
Unsuccessful connect attempt to paired lock xx:xx:xx:10:0C:54

Cannot pair after reinstall the addon

I installed the addon and paired my lock successfully.
Then I had some errors, and tried to reinstall the addon. But I forgot to unpair the lock first, and now I cant pair again.
The TTLock Integration page is empty, and the log prints the following:

MQTT connected
Monitor started
Server started
Discovered unknown lock: {"id":"61f620a47597","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"61:F6:20:A4:75:97","rssi":0,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":true,"isSettingMode":false,"txPowerLevel":0,"batteryCapacity":30,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Monitor stopped

The lock is this: YRHAND X5 (https://pt.aliexpress.com/item/4001361899702.html)

I apreciate if someone can help me with this.

Able To Lock/Unlock and recognize lock but no other functions seem to work

I got the Lock to pair, but I cant seem to unpair it, or do any "admin" functions on the lock and the lock timer changed for -1 for some reason.

Connected to known lock, reading general data
========= check admin
Lock waiting for connection to be completed
macro_adminLogin: Error: Failed checkAdmin response
at TTLock.checkAdminCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:551:23)
at async TTLock.macro_adminLogin (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:1329:32)
at async TTLock.onConnected (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:1239:111)
========= lockSound
Failed reading all general data from lock Error: Failed to set audio mode
at TTLock.audioManageCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:234:23)
at async TTLock.onConnected (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:1252:38)
Connected to paired lock D3:D9:13:9B:FF:06
========= check admin
========= check admin
macro_adminLogin: Error: Command already in progress
at TTBluetoothDevice.sendCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:146:19)
at TTLock.checkAdminCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:546:52)
at TTLock.macro_adminLogin (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:1329:43)
at TTLock.resetLock (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:474:28)
at Manager.resetLock (/app/src/manager.js:560:32)
at async WebSocket. (/app/api/index.js:254:27)
macro_adminLogin: Error: Failed checkAdmin response
at TTLock.checkAdminCommand (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:551:23)
at async TTLock.macro_adminLogin (/app/node_modules/ttlock-sdk-js/dist/device/TTLockApi.js:1329:32)
at async TTLock.getAutolockTime (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:371:29)
at async Function.fromTTLock (/app/api/Lock.js:49:27)
at async Function.sendLockStatus (/app/api/WsApi.js:43:21)
========= 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.sendLockStatus (/app/api/WsApi.js:43:21)

Can't get this configured

I know I am missing something in the configuration .... this is my log ....

[email protected] start /app
node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Server started

How about the bluetooth gateway?

Hi, first, amazing project.

I started looking for smart locks to buy and integrate with my HA, and then I found your project and #3. The model suggested there is very cool, but my door would not be close to my HA server, so direct connection via Bluetooth would not work for me.

I see that there is a gateway: https://aliexpress.com/item/33014871696.html

Any advice on this? Would it work with this project? I guess no, as it says that it requires Bluetooth.

Thank you!

Remote rpi

It would be fantastic to be able to run the actual comms on an Rpi (zero, maybe) close to the lock, in case the main Hassio location isn't close enough.

Can we make this capable of using a remote container with a comms gateway of some kind?

HA Ver 2022.9.0

will the new ESPHome Bluetooth Proxies work with this to help with the BT range ??? thanks jeff

Pairing Issue

Just wondered if there are any ideas for getting it to pair?

RPI 4b

Log:

`> [email protected] start

node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Monitor started
Server started
Discovered new lock: {"id":"74d3207f21cf","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"74:D3:20:7F:21:CF","rssi":-66,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":100,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Monitor stopped
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
at async Manager._connectLock (/app/src/manager.js:583:21)
at async Manager.initLock (/app/src/manager.js:163:13)
at async WebSocket. (/app/api/index.js:52:30)
Connect failed
Lock connect failed
Connect to lock failed 74:D3:20:7F:21:CF`

Using the TTLock addon without hassio

Hey! Thanks for making this addon. I have a couple of these locks and would love to help with testing and improvements, but I don't use hassio and it's not an option for me to switch to it. I made a container image based on the Dockerfile in the repository, with the same set of dependencies (bluez etc), and passed through the environment variables that start.sh sets from bashio config vars, as follows:

- name: LANG
  value: C.UTF-8
- name: MQTT_HOST
  value: mosquitto.default.svc.cluster.local
- name: MQTT_PORT
  value: "1883"
- name: GATEWAY
  value: none
- name: TTLOCK_DEBUG_COMM
  value: "1"
- name: MQTT_DEBUG
  value: "1"
- name: WEBSOCKET_DEBUG
  value: "1"

(The DEBUG ones are part of an attempt to get more logging, but they don't seem to have any effect.)

I can pull up the frontend on :55099/frontend/ and it appears functional but nothing happens when I click the scan button. I can see that the websocket connection is active, and the scan message is sent when I click the button.

hciconfig inside the container gives this output:

/ # hciconfig
hci0:	Type: Primary  Bus: USB
	BD Address: XX:XX:XX:XX:XX:XX  ACL MTU: 1021:4  SCO MTU: 96:6
	UP RUNNING 
	RX bytes:18145 acl:0 sco:0 events:2861 errors:0
	TX bytes:686715 acl:0 sco:0 commands:2859 errors:0

I have tried running node both as root and as an ordinary user after using setcap to give the node binary the needed capabilities as per the noble docs.

In the logs of the container there is just:

$ kubectl --context=home logs deployment/ttlock-hass
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'access',
  path: '/data/lockData.json'
}
Server started

From what I can see, the error is nothing to worry about because the data file just hasn't been created yet. Nothing is written to the log when I click the scan button. Is there any way to increase log verbosity?

Error: ENOENT - I find the smart lock but I can't connect

Hi

I find the smart lock but I can't connect

I did the clean installation in a new home assistant, from what I understand in the logs my lock is being found, however the shortcut to configure (in the left menu) does not respond.

image

LOG:
`> [email protected] start

node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Monitor started
Discovered unknown lock: {"id":"e255f3a57f52","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"E2:55:F3:A5:7F:52","rssi":-97,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":false,"txPowerLevel":0,"batteryCapacity":59,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
Server started`

TTLock: add names for fingerprints

Please could we allow adding a name for each fingerprint added, like they do in the TTLock app.

This would make it easy to know which items to remove when revoking access.

See screenshot below. Thanks!!

6C7AF180-07D7-4274-84DA-64065ACB71F3

Can't add the repository

Hi,

i try to add your work to HA via HACS but i receive this error "Repostitory structure for master is not compliant"

can you help me? Thanks

Can't pair the lock with restored HA snapshot

I had paired my lock and it was working as expected but due to some reason, I had to revert to an older snapshot. Now I am trying to reset the lock and it is asking me initialization passcode. Any idea as to what could be the default passcode?

Paired but hangs when attempting any function

Hello,

Thank you so much for this project, was over the moon when I saw all you have done.

I have managed to pair my lock but cannot seem to get any functions to work. The UI also seems to become unresponsive (some screens don't load) after I attempt any actions. Here is my log for a an unlock action:

`IGNORE CRC TRUE
Debug communication ON
Debug MQTT
Debug gateway

[email protected] start
node ./index.js
MQTT connected
Monitor started
Discovered paired lock: F8:08:70:XX:XX:XX
Monitor stopped
Peripheral connect start
Server started
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
Connected to known lock, reading general data
========= feature list
Sending command: 7f5a0503010001000101aa001c0d0a
Lock waiting for connection to be completed
Received response: 7f5a050302000a000c54aa1026033ba449ce33205035b7504424240fc20d0a
Bad CRC should be 68 and we got 194
Command: 640004f1f1
<Buffer 64 00 04 f1 f1>
========= feature list Set(11) { 0, 4, 5, 6, 7, 8, 12, 13, 14, 15, 18 }
========= check admin
Sending command: 7f5a0503010001000141aa10ae91280a07b04f38d02c4f7a9bda4a5e100d0a
Received response: 7f5a050302000a000c54aa1091630a32759dcd907ce9088185c8715ed30d0a
Command: 000096da
========= check admin: 38618
========= check random
Sending command: 7f5a0503010001000130aa1052ca51236963709b3fd58b4ef981cdbd9a0d0a
Received response: 7f5a050302000a000c54aa10f37ef645a01bd7a0ef05cc4a6704983a090d0a
Command: 64
========= check random
========= autoLockTime
Sending command: 7f5a0503010001000136aa10edbdb44f6c2d8af816a9a0a56872924a930d0a
Received response: 7f5a050302000a000c54aa1099a17f00e9aedb75158e4a64b748e29b490d0a
Command: 640100000005007801
========= autoLockTime: 0
========= lockSound
Sending command: 7f5a0503010001000162aa10edbdb44f6c2d8af816a9a0a56872924a6d0d0a
Received response: 7f5a050302000a000c54aa109b5f3473eb9c01dfdab986abfee228da580d0a
Command: 640101
========= lockSound: 1
Connected to paired lock F8:08:70:XX:XX:XX
MQTT Publish homeassistant/lock/f80870xxxxxx/lock/config {"unique_id":"ttlock_f80870xxxxxx","name":"BL01_xxxxxx","device":{"identifiers":["ttlock_f80870xxxxxx"],"name":"BL01_xxxxxx","manufacturer":"Sciener","model":"SN138-AOEL","sw_version":"4.3.3.190429"},"state_topic":"ttlock/f80870xxxxxx","command_topic":"ttlock/f80870xxxxxx/set","payload_lock":"LOCK","payload_unlock":"UNLOCK","state_locked":"LOCK","state_unlocked":"UNLOCK","value_template":"{{ value_json.state }}","optimistic":false,"retain":false}
MQTT Publish homeassistant/sensor/f80870xxxxxx/battery/config {"unique_id":"ttlock_f80870xxxxxx_battery","name":"BL01_xxxxxx Battery","device":{"identifiers":["ttlock_f80870xxxxxx"],"name":"BL01_xxxxxx","manufacturer":"Sciener","model":"SN138-AOEL","sw_version":"4.3.3.190429"},"device_class":"battery","unit_of_measurement":"%","state_topic":"ttlock/f80870xxxxxx","value_template":"{{ value_json.battery }}"}
MQTT Publish homeassistant/sensor/f80870xxxxxx/rssi/config {"unique_id":"ttlock_f80870xxxxxx_rssi","name":"BL01_xxxxxx RSSI","device":{"identifiers":["ttlock_f80870xxxxxx"],"name":"BL01_xxxxxx","manufacturer":"Sciener","model":"SN138-AOEL","sw_version":"4.3.3.190429"},"unit_of_measurement":"dB","icon":"mdi:signal","state_topic":"ttlock/f80870xxxxxx","value_template":"{{ value_json.rssi }}"}
MQTT Publish ttlock/f80870xxxxxx {"battery":100,"rssi":-53,"state":"LOCK"}
Successful connect attempt to paired lock F8:08:70:XX:XX:XX
========= get OperationLog 65535
Sending command: 7f5a0503010001000125aa10082c5f08e62ee0de3b76d24f6fa2809e230d0a
Received response: 7f5a050302000a000c54aa2035160523704298e4ebece5c18bb035fdae936f7019e3648f1de852231ca946f83c0d0a
Command: 001000060d07150a12101618640438353835
========= get OperationLog 6
Sending command: 7f5a0503010001000125aa10b5deafa0ea08bbcaa53dc86256bcd5a9780d0a
Received response: 7f5a050302000a000c54aa20c51c38103fcfdfc2d5b176192d8f0684dd3e45fb1533d521040e37732d71e3327a0d0a
Bad CRC should be 99 and we got 122
Command: 001000070d07150a12101622640435353835
========= get OperationLog 7
Sending command: 7f5a0503010001000125aa10b3cc3215c277fbb25c7205135cfc545e990d0a
Received response: 7f5a050302000a000c54aa10c4c708fbbbd73873542a4b60b45b44b50a0d0a
Command: 0000
Disconnected from lock F8:08:70:XX:XX:XX`

What am I missing?

Error adding repository.

Please your help. I am receiving the error below after adding the repository:

21-04-18 18:32:02 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/kind3r/hass-addons repository
21-04-18 18:32:02 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/kind3r/hass-addons repository: Cmd('git') failed due to: exit code(128)
cmdline: git clone --depth=1 --recursive --shallow-submodules -v https://github.com/kind3r/hass-addons /data/addons/git/ba66f6d0
stderr: 'Cloning into '/data/addons/git/ba66f6d0'...
fatal: unable to access 'https://github.com/kind3r/hass-addons /': The requested URL returned error: 400
'.

Thanks.

Importing an RFID card not physically present

Hi, thanks for the great cloud-free implementation! We have around 100 RFID cards and a dozen locks distributed over 5 floors. Is it possible to import all the card IDs (our old lock system stored them in a database in hexadecimal format) into all the locks without swiping every card at every lock?

Cheers

Simon from ProVeg

The command '/bin/ash -o pipefail -c apk update' returned a non-zero code: 2

I got this error when installing addon

The command '/bin/ash -o pipefail -c apk update' returned a non-zero code: 2

If i try executed this comand into the hhass container

/bin/ash -o pipefail -c apk update
apk-tools 2.12.7, compiled for armv7.

usage: apk [...] COMMAND [...]

Package installation and removal:
add Add packages to WORLD and commit changes
del Remove packages from WORLD and commit changes

pip --version
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

apk --version
apk-tools 2.12.7, compiled for armv7.

Log from haas

21-12-26 19:37:52 ERROR (SyncWorker_1) [supervisor.docker.addon] Can't build 8dc774ce/armv7-addon-ttlock-hass-integration:0.4.11: The command '/bin/ash -o pipefail -c apk update' returned a non-zero code: 2
21-12-26 19:37:52 ERROR (SyncWorker_1) [supervisor.docker.addon] Build log:
Step 1/19 : ARG BUILD_FROM
Step 2/19 : FROM $BUILD_FROM
---> a267e8678e44
Step 3/19 : ENV LANG C.UTF-8
---> Using cache
---> aa012e50b80b
Step 4/19 : RUN apk update
---> Running in c4b2a7861267
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.14/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory

Not able to Pair

I bought a hornbill door lock on amazon. I configured the lock in ttlock successfully. Then I reset the lock to factory settings. I see the lock in the addon but i was not able to complete the pairing.

[email protected] start
node ./index.js
[Error: ENOENT: no such file or directory, access '/data/lockData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/lockData.json'
}
[Error: ENOENT: no such file or directory, access '/data/aliasData.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/data/aliasData.json'
}
MQTT connected
Monitor started
Server started
Monitor stopped
BLE Scan started
Discovered new lock: {"id":"d052b39be306","manufacturer":"unknown","model":"unknown","hardware":"unknown","firmware":"unknown","address":"D0:52:B3:9B:E3:06","rssi":-59,"protocolType":5,"protocolVersion":3,"scene":2,"groupId":0,"orgId":0,"lockType":5,"isTouch":true,"isUnlock":false,"hasEvents":false,"isSettingMode":true,"txPowerLevel":0,"batteryCapacity":100,"date":0,"isWristband":false,"isRoomLock":true,"isSafeLock":false,"isBicycleLock":false,"isLockcar":false,"isGlassLock":false,"isPadLock":false,"isCyLinder":false,"isRemoteControlDevice":false,"isDfuMode":false,"isNoLockService":false,"remoteUnlockSwitch":0,"disconnectStatus":0,"parkStatus":0,"lockSound":-1,"autoLockTime":-1,"privateData":{},"operationLog":[]}
New lock found, stopping scan
BLE Scan stopped
Refreshing paired locks
Monitor started
Monitor stopped
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: Unknown Connection Identifier (0x2)
at NobleBindings.onLeConnComplete (/app/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:240:13)
at Hci.emit (events.js:400:28)
at Hci.processLeConnComplete (/app/node_modules/@abandonware/noble/lib/hci-socket/hci.js:795:8)
at Hci.processLeMetaEvent (/app/node_modules/@abandonware/noble/lib/hci-socket/hci.js:766:10)
at Hci.onSocketData (/app/node_modules/@abandonware/noble/lib/hci-socket/hci.js:596:12)
at BluetoothHciSocket.emit (events.js:400:28)
Connect failed
Lock connect failed
Connect to lock failed D0:52:B3:9B:E3:06

I'm Buying one, and want to help :)

Man, i really liked this project.

I'm about to buy one, and i created this issue because i found on aliexpress the lock with the gateway with the same price or lower.

Probably i'm gonna buy this one, and maybe i can help you.

What are the chances that we will achieve nothing with the gateway?

Here is the link for the lock + gateway: https://www.aliexpress.com/item/4000730028210.html?spm=a2g0s.8937460.0.0.f95b2e0eTdxabT

PS: Sorry if i did something wrong ๐Ÿ˜ฌ

Is there any way to call the passage mode commands in home assistant

i somehow managed to get the ttlock integration to work with a vmware /hassos setup with a BCM20702A1 usb bluetooth module passed through (and on a usb extension cord that puts it within 2 feet of the lock keep my door unlocked when i'm home would be my most obvious automation to make but i can't figure out how to call passage mode commands in ha.

Lock cannot communicate with my Raspberry Pi 4 when door is closed

The door lock cannot communicate with my Raspberry Pi 4 when the door is closed.
Does this seem to be a connectivity problem? Although RSSI remains at -64dB

drawing

Here are the logs:

Monitor started
noble: unknown peripheral undefined RSSI update!
noble warning: unknown handle 11 disconnected!
Monitor stopped
noble: unknown peripheral undefined RSSI update!
noble warning: unknown handle 11 disconnected!
noble: unknown peripheral undefined RSSI update!
noble warning: unknown handle 11 disconnected!
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
    at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
    at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
    at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
    at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
    at async Manager._connectLock (/app/src/manager.js:583:21)
    at async Manager.unlockLock (/app/src/manager.js:187:13)
Connect failed
Lock connect failed
Connect to lock failed F7:7A:64:56:2E:82
Peripheral connect triggered
Peripheral connect start
Peripheral connect triggered
Peripheral connect error: Error: connection canceled!
    at Peripheral.cancelConnect (/app/node_modules/@abandonware/noble/lib/peripheral.js:61:26)
    at NobleDevice.connect (/app/node_modules/ttlock-sdk-js/dist/scanner/noble/NobleDevice.js:91:37)
    at async TTBluetoothDevice.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTBluetoothDevice.js:47:17)
    at async TTLock.connect (/app/node_modules/ttlock-sdk-js/dist/device/TTLock.js:53:27)
    at async Manager._connectLock (/app/src/manager.js:583:21)
    at async Manager.unlockLock (/app/src/manager.js:187:13)
    at async WebSocket.<anonymous> (/app/api/index.js:78:30)
Connect failed
Lock connect failed
Connect to lock failed F7:7A:64:56:2E:82
Peripheral connect triggered
noble: unknown peripheral undefined RSSI update!
noble warning: unknown handle 11 disconnected!
noble: unknown peripheral undefined RSSI update!

I am aware of the esp32 gateway option but at the current time, the instructions are too complex for me to execute. I will try out all the alternatives

ESP32 gateway connection issues

Hello,

I have been attempting to get the addon to work with an esp32 gateway with your https://github.com/kind3r/esp32-ble-gateway however once connected to the gateway, I cannot seem to find the lock. In the addon logs I get an endless repeat of the following two lines:
Sent: {"action":"auth","response":"8775f9276320b2780170215f3958ad3e"}
Received: {"type":"auth","challenge":"34464436393139454231423245324134"}
Is this the expected output with the gateway?

Without the gateway I am at issue #34

No MQ messages

Hello, I set up the addon in a second instance on a raspberry pi 3 and got the lock connected but I never see any MQ messages come through. I am not seeing the "MQTT connected" message in the logs so something isn't working but I'm not sure why. I get my birth/will messages when HA starts/stops so I know the MQ stuff is working but nothing from this addon. Thoughts?

Here is my entire configuration.yaml (note I did try adding the default_config entry in case that was important but I didn't see anything different)

configuration.yaml

config:
frontend:
hassio:
http:
webhook:

mqtt:
  discovery: false
  discovery_prefix: hass2
  birth_message:
    topic: "hass2/status"
    payload: "online"

  will_message:
    topic: "hass2/status"
    payload: "offline"
  broker: 192.168.1.55
  port: 1883
  client_id: hass2
  username: !secret mqtt_username
  password: !secret mqtt_password

I also see this in the logs and I am wondering if the service is not enabled but I'm not sure what Service it is referring to.

[08:12:28] ERROR: Got unexpected response from the API: Service not enabled
Debug MQTT
> [email protected] start
> node ./index.js
Monitor started
Server started

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.