custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.93k stars 248 forks source link

[New Sensor]: Lockin S50F #1326

Open snaulh opened 9 months ago

snaulh commented 9 months ago

Sensor Description

loock.lock.s50f

Additional information

MODEL: loock.lock.s50f (Same as v16 but contain faceID feature) https://www.lockin.com.sg/product-page/lockin-push-pull-smart-lock-s50 This lock can be added in MiHome app. Will grab more adv if insufficient. I though I can use SV40(#1267) for testing but donno how to do that. Thank you

BLE advertisements

INFO (MainThread) [custom_components.ble_monitor] Attention! Option report_unknown is enabled for sensor with id(s): ['************']
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b"\x19\x16\x95\xfeXU\x87\x1dCg\xea)\xd7k\x08\xf5\xfb'\xb2\xa2\x04\x00\xbc-3u"]manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x0e\x16\x95\xfe\x10U\x87\x1dDg\xea)\xd7k\x08']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x0e\x16\x95\xfe\x10U\x87\x1dEg\xea)\xd7k\x08']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x0e\x16\x95\xfe\x10U\x87\x1dGg\xea)\xd7k\x08']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x0e\x16\x95\xfe\x10U\x87\x1dIg\xea)\xd7k\x08']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x0e\x16\x95\xfe\x10U\x87\x1dKg\xea)\xd7k\x08']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x0e\x16\x95\xfe\x10U\x87\x1dLg\xea)\xd7k\x08']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x17\x16\x95\xfeHU\x87\x1dM\xa4\x98U*\x03>\x97\xcc\xa2\x04\x00\\e\xb6\xb4']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x19\x16\x95\xfeXU\x87\x1dFg\xea)\xd7k\x08K\xec\x82K\xa2\x04\x00\xe5&8G']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x19\x16\x95\xfeXU\x87\x1dHg\xea)\xd7k\x08\x9e\xaf\xbc\x04\xa2\x04\x00\xd9\xbc`\xb3']manufacturer specific data: []local name: UUID16: None,UUID128: None
INFO (Thread-2) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ************: service data: [b'\x19\x16\x95\xfeXU\x87\x1dJg\xea)\xd7k\x08\x0f (\x02\xa2\x04\x00h\x97\\\x03']manufacturer specific data: []local name: UUID16: None,UUID128: None
Ernst79 commented 9 months ago

Hi,

Looks like U can add this, but I need an encryption key to verify. After sending the encryption key, you can create a new key by re-adding it to MiHome (or whatever app you use).

mesh device 0
object included 1
version device 5
included mac 1
device_id 7559
device type S50F
object_include 1
MiVer: 5, DevID: 0x1d87 : S50F, FnCnt: 67, Registered and bound, Safety certification, Encryption
snaulh commented 9 months ago

Hi, I sent you an email that contains encryption key and mac address also. Sent to e.klamer at gmail

Ernst79 commented 9 months ago

Hi, The key you have send is 24 characters long, it needs to be 32 characters. You will need the BLE KEY when you use xiaomi cloud token extractor.

snaulh commented 9 months ago

Hi, I did use token extractor for getting information that sent you. All other devices has 32-char token but this only has 24char, and it shows as TOKEN, not BLE_KEY. I have one other temp device, that contains BLE_KEY but this lock just have TOKEN Is there anything I did wrong?

Ernst79 commented 9 months ago

Did you add it to MiHome? If so, it should sync the BLE_KEY to the cloud and after that you should be able to see it with xiaomi cloud token extractor.

The BLE advertisements do say it is in MiBeacon V5 format with encryption, so we do need a 32 char key.

MiVer: 5, DevID: 0x1d87 : S50F, FnCnt: 67, Registered and bound, Safety certification, Encryption

If you still can't find it, you could also try to use method 2a from the FAQ https://custom-components.github.io/ble_monitor/faq#how-to-get-the-mibeacon-v4v5-encryption-key

The Telink Flasher should allow you to activate the lock and set and get the encryption key. Note that you will have to send new logs afterwards, as the encryption key will change with this method and I do need logs that match the encryption key, of course. It will also be removed from MiHome, but you can always add it again (which will again regenerate the encryption key).

snaulh commented 9 months ago

I sent you another email, please help to check it. I only found the BLE_KEY that inside my sensor paragraph. For using 2a method, how can I connect to my door lock? Sorry I am confusing about this right now

snaulh commented 9 months ago

Do I need to unpair this lock out of MiHome before scanning using Telink Flashing?

Ernst79 commented 9 months ago

Normally not. Ill look at your mail tonight

snaulh commented 9 months ago

Thank you, I will try other methods to see whether I can get it or not. Thank for your hard work.

Ernst79 commented 9 months ago

Very strange. Normally the output of the token extractor should look like the temperature sensor, with a BLE_KEY. Perhaps you used a different server?

snaulh commented 9 months ago

I did run scanning in all servers, but the same result

Ernst79 commented 9 months ago

We also had some trouble finding the BLE_KEY for anothoer lock in the past, see #805 Perhaps @rezmus can help you out how to get the key?

snaulh commented 8 months ago

Hello Thank you for supporting I will contact you again whether I know the way to get ble key Thank you.