Finding offline key using August integration for use with the Yale Access Bluetooth integration?

The offline key should still be available via the Yale integration (unless its recently been removed from the API)

1 Like

Well, after migration I lost it. I’ll try to revert back my old backup with previous version to see if it still works.

It could be that this is just coincidence, if it is removed from the API - I don’t know how old the old offline key file was Yale Access Bluetooth was using. I think I lost the offline key (at least the file) the moment August was migrated to Yale Home in my installation.

Well, restoring old backup Yale Access Bluetooth started working again, but that is otherwise way too old for me…

Can I somehow manually retrieve the key and slot from the old, but still working august.conf -file? Just copying that over doesn’t seem to do the trick.

And again; thanks for you great work - even if I’d need to revert back to my old rooted android, this is one my most important integrations! :slight_smile:

The key will be in /config/.storage/core.config_entries

You can also enable debug logging on the Yale integration and you should be able to find the key in there.

# Example configuration.yaml entry
logger:
  default: info
  logs:
    yalexs: debug
1 Like

I think I found it (yale) in the config_entries, thanks!

{
“created_at”: “2024-09-05T19:41:48.639680+00:00”,
“data”: {
“auth_implementation”: “cloud”,
“token”: {
“access_token”: “yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy”,
“expires_in”: 10367976,
“refresh_token”: “xxxxxxxxxxxxxxxxxxxxxxxx”,
“service”: “yale”,
“expires_at”: 1735933284.6392705
}
},

Is this the correct one? Is the key either first 32 bytes of access token or refresh token? How to decipher the key slot (0-255)?

I’ll try still logger - yalexs debug as well.

the domain will be yalexs_ble that has the key in it if you already have it setup

1 Like

I did a complete reset (factory reset) and set everything up again with a new Yale Home Account. The key is therefore out of date - I tested it from a backup. From the Yale help document for integration with Yale Access Bluetooth:

Integration with Yale Access Bluetooth

  • The Yale integration must support the lock. - yes Linus Lock V1
  • The Yale Access Bluetooth integration must support the lock. - Yes Linus Lock V1
  • The Bluetooth integration must be active and functional. - Yes, everything went perfectly under August and HA 2024.8.3.
  • The lock must be discoverable by the Yale Access Bluetooth integration. - Yes, Screenshot
  • The account logged in with the Yale integration must have the offline keys. - yes, only one account all new…

Will it never read offline keys again or is this a temporary problem?

It probably depends on if the API still returns those keys. As you have also probably noticed, you can’t get new key even with previous version. I think that at just this moment in your situation you need to dig offline key with either IOS or Android phone for your new Yale Home Account, unless you are willing to wait and there is some other option for new integration coming at later date.

That’s exactly what I’m trying to do at the same time… I have an iPhone and have also temporarily disconnected the WLAN bridge from the power supply and thus established a direct connection via Bluetooth with prior unlock activation. This allows me to open and close the lock via Bluetooth with the app. This ensures that an ‘offline key’ and the slot number are stored in the iPhone.

I have already read out the backup and saved it in Application and at Yale I am already looking for the offline key and the slot number… unfortunately I haven’t got very far yet…

The Linus is not listed on that page, but thats likely not the issue.

If you open an issue with debug logging turned on, we should be able to see why the key isn’t coming over.

# Example configuration.yaml entry
logger:
  default: info
  logs:
    yalexs: debug

Hello, thank you very much for your feedback. I am happy to provide the data - but it is definitely not due to yalex_ble, because the task of Yale is to save the offline key and the slot in the ‘core.config_entries’ so that yalex_ble can retrieve the data. Before the update to 2024.8.x, this data was also included by August and was provided (old backup checked). Now the lines are missing:

    "data": {
      "local_name": "L60000S",
      "address": "XXX",
      "key": "XXX",
      "slot": XXX

Now I just followed your advice again, activated the debugs, added the old information to core.config_entries and here are the logs:

2024-09-07 10:08:26.240 ERROR (MainThread) [yalexs_ble.push] Kellertür BLE (L60000S): Disconnected while updating
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/session.py", line 271, in execute
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/session.py", line 139, in _write
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/session.py", line 197, in _locked_write
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 1020, in _execute_deferred_update
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 113, in _async_wrap_operation_lock
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 157, in _async_wrap_retry_bluetooth_connection_error
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 707, in _update
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 566, in _ensure_connected
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/lock.py", line 188, in connect
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/lock.py", line 246, in _setup_session
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/session.py", line 268, in execute
yalexs_ble.session.DisconnectedError: Kellertür BLE (L60000S): Disconnected
2024-09-07 10:09:51.556 ERROR (MainThread) [yalexs_ble.lock] Kellertür BLE (L60000S): Failed to connect to the lock: Kellertür BLE (L60000S) - XX:9C:XX:XX:XX:XX: Failed to connect after 1 attempt(s): Timeout waiting for connect response while connecting to XX:9C:XX:XX:XX:XX after 20.0s, disconnect timed out: False,  after 20.0s
2024-09-07 10:09:51.557 ERROR (MainThread) [yalexs_ble.push] Kellertür BLE (L60000S): Bluetooth error updating
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 1020, in _execute_deferred_update
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 113, in _async_wrap_operation_lock
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 157, in _async_wrap_retry_bluetooth_connection_error
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 707, in _update
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 566, in _ensure_connected
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/lock.py", line 155, in connect
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/lock.py", line 144, in connect
2024-09-07 10:10:21.969 ERROR (MainThread) [yalexs_ble.lock] Kellertür BLE (L60000S): Failed to connect to the lock: Kellertür BLE (L60000S) - XX:9C:XX:XX:XX:XX: Failed to connect after 1 attempt(s): Timeout waiting for connect response while connecting to XX:9C:XX:XX:XX:XX after 20.0s, disconnect timed out: False,  after 20.0s
2024-09-07 10:10:21.970 ERROR (MainThread) [yalexs_ble.push] Kellertür BLE (L60000S): Bluetooth error updating
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 1020, in _execute_deferred_update
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 113, in _async_wrap_operation_lock
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 157, in _async_wrap_retry_bluetooth_connection_error
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 707, in _update
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/push.py", line 566, in _ensure_connected
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/lock.py", line 155, in connect
  File "/usr/local/lib/python3.12/site-packages/yalexs_ble/lock.py", line 144, in connect
2024-09-07 10:11:22.456 ERROR (MainThread) [yalexs_ble.push] Kellertür BLE (L60000S): Disconnected while updating

Important: Of course, the last data and information in the offline key and slot are no longer up to date because I completely reset my lock (that was really stupid…), deleted my account and created everything again…

If I want to add it again, it is also found… However, I then need the offline key and the slot manually…

2024-09-07 10:21:17.778 DEBUG (MainThread) [yalexs.api_async] Received API response from url: https://api.aaecosystem.com/websocket/subscribers, code: 200, headers: <CIMultiDict('Date': 'Sat, 07 Sep 2024 08:21:17 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'origin,access-control-request-method,access-control-request-headers', 'content-security-policy': "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests", 'x-dns-prefetch-control': 'off', 'expect-ct': 'max-age=0', 'x-frame-options': 'SAMEORIGIN', 'strict-transport-security': 'max-age=15552000; includeSubDomains', 'x-download-options': 'noopen', 'x-content-type-options': 'nosniff', 'x-permitted-cross-domain-policies': 'none', 'referrer-policy': 'no-referrer', 'x-xss-protection': '0', 'api-version': '0.0.1', 'x-august-access-token': '****', 'x-access-token': '****', 'x-response-time': '109', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': 'XXX', 'Content-Encoding': 'gzip')>, content: b'{"subscriberID":"XXX","userPayload":"","scopes":["lock"]}'
2024-09-07 10:21:17.778 DEBUG (MainThread) [yalexs.manager.socketio] sub_info: {'subscriberID': 'XXX', 'userPayload': '', 'scopes': ['lock']}
2024-09-07 10:21:17.778 DEBUG (MainThread) [yalexs.manager.socketio] subscriberID: XXX
2024-09-07 10:21:17.818 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up yale.binary_sensor
2024-09-07 10:21:17.822 INFO (MainThread) [homeassistant.components.button] Setting up yale.button
2024-09-07 10:21:17.824 INFO (MainThread) [homeassistant.components.camera] Setting up yale.camera
2024-09-07 10:21:17.825 INFO (MainThread) [homeassistant.components.event] Setting up yale.event
2024-09-07 10:21:17.826 INFO (MainThread) [homeassistant.components.lock] Setting up yale.lock
2024-09-07 10:21:17.828 INFO (MainThread) [homeassistant.components.sensor] Setting up yale.sensor
2024-09-07 10:21:18.206 DEBUG (MainThread) [yalexs.manager.socketio] websocket connection established
2024-09-07 10:21:30.828 INFO (SyncWorker_3) [homeassistant.loader] Loaded yalexs_ble from homeassistant.components.yalexs_ble

and here from the correctly functioning Yale, which also reads out everything well.

There are many more log entries, but I don’t want to post them unfiltered. I would be happy to provide specific data.

Did you manage to find the key and slot values? The new Yale integration is not completing the Yale ble config for me (I went into the Yale app yesterday and everything blew up). Right now I’m a bit shafted as everything is going by cloud rather than local access.

@bdraco i even went into Yale Home on my phone (to add more NFC tags), deleted my daughter as an owner, deleted the HA Yale integration, rebooted HA, went back into Yale app, set daughter up as an owner and enable Auto Unlock, then logged her phone out, in HA setup the integration with her email and password. But still can’t get Yale ble to complete setup - I keep getting asked for key and slot. My lock is Conexis L2, was working fine when it was setting with August integration/Yale ble. Any other suggestions?

Hello @Townsmcp
I still haven’t found a way to do this today. I would prefer to have my August integration with the other connection again. Everything worked perfectly and transferred the key and slot to me…

Damn. Thats not good. Cloud is so slow to react. Agreed the August integration would have allowed this to work and BLE to grab the slot and key. I only have iOS devices so cant grab the code from Android :frowning:

I’m so annoyed with the Linus Yale lock right now… It’s such great hardware but the the way Yale tries to force people into their flawed, restricted and inferior ecosystem really p*sses me off…

Mostly a rant because that lock completely ruined my Sunday

Yesterday I “accidentally” upgraded the locks firmware and now it appears like the offline keys have changed. I spent hours trying find them (in the logs, on an Android phone and on an iPhone - all as described in the documentation) - it’s impossible.
Also I configured the Yale integration - I created a new user, on a new (factory reset, just to be sure) phone, activated the auto-unlock function and used it (a couple of times by now). Nothing.

The lock is found by HA and waits to be set up, but requires the offline-key and slot number (whatever that is), because the new Yale integration appearently doesn’t provide it any more…

Also adding it as a HomeKit device “works” but accessing the lock functionality appears to be impossible, because there’s some security key that Yale only shares with Apple (or something like that)

Eventually I gave up and did damage control … countless automations needed to be adjusted so the core functionality of my home was restored - Yale is dead to me - this just can’t happen with an essential device like a lock - not being able to easily integrate it into a home automation system WITHOUT the need for tinkering, or additional bridges and/or cloud connectivity is just ridiculous and reduces that product to a gimmick or fun party trick (what’s the benefit of a smart lock, if you still have to take out your phone, search for the app, wait until it connects and then press a button to un/lock the door … I’d be faster with a regular key … especially since the lock by itself can’t really be controlled from away, which is one reason I got a smart-lock in the first place)

… it would be different, if it was something like a weather-station … no biggie if that fails to work…

A cobbler should stick to his last. Yale, build a lock - not an ecosystem.

Has anyone ever actually found the offline-key and slot number?! From reading countless threads about it, it seems that obtaining them manually is just kind of a myth…

Is there maybe a way to force the August integration to work again temporarily, so I can get the key this way? Yale Home and August are not working for me any more at all - the login fails (I already tried an older version of HA)

2 Likes

@Farnsworth was the Android device rooted? I was considering buying a cheap Android phone just so I can get the 2 variables out but now Im not so sure.
Also, did you look in the correct place for the Android slot and key? There is a closed Github ‘View pending feedback’ that might be of some help? New Android Location · Issue #30673 · home-assistant/home-assistant.io · GitHub

Also, on Pending Feedback (bottom right of Yale Access Bluetooth - Home Assistant), there is a github thread which might be of some use with Android device? Yale Access Bluetooth - how to obtain Yale Home offline key on Android with NO root access · Issue #31823 · home-assistant/home-assistant.io · GitHub

@Farnsworth I can confirm everything (Finding offline key using August integration for use with the Yale Access Bluetooth integration? - #73 by Matze89x) you have written. I read a backup from the iPhone and found no keys or slots. I have connected via Homekit but it can only read but not execute a command without a code. It really is an imposition that we are left with the offline key. I really don’t blame the developers here. Everything is great! You are the best, but I don’t understand why YALE/August is making such a fuss here. Theoretically, YALE could offer an interface in the web console to generate an offline key online on the platform… Therefore, the key is apparently created anyway and not in the lock.

No - it’s my my daily driver with banking apps and other important stuff an it - rooting it would be too insecure. However I did manage to get access to /data/data/com.assaabloy.yale/ (EDIT: no, I didn’t … it was Android\data\com.assaabloy.yale … something completely different :woman_facepalming:) but there’s no databases folder (maybe only this one requires root access). I did find a database and opened it with the suggested program - but there was no key in there.

In the iPhone I did find countless .plist files. Some even include multiple 32bit hex keys. But no slot number. I tried all of them and slot numbers 1-10. No success.

Sounds like a lot of work, but I will give this a try.

My anger is exclusively directed at Yale. Not the HA devs! They do great work and I’m sure, no matter how big the next stone is, Yale throws into their path, they will find a way to make it work again :wink:

2 Likes

In case anyone else wants to add any info, I have created an issue on Github

1 Like

I have no Idea how he did that … there’s something called AndroidManifest.xml which has an entry allowBackup=false which disallows creating backups from apps. (I tried via ADB and it results in a dummy 1kb file)
And apparently it’s usually set to false by default by most manufacturers (I only have Samsung devices to try).
This also seems to affect complete device backups.

So maybe it could work with a cheep Chinese phone or something like that.

The only way to move an app (including all user data) to another phone in this case is to make a direct device-to-device backup via Google’s “Set Up & Restore” function, which seems to be impossible from a hardware phone to an emulated Android device.

So it might work if I get a rooted device and then restore it device-to-device …

Another way I could think of, but keep in mind that I have no idea what I’m doing, is to install Yale Home on the SD card of a phone. And then try to read the data from a PC … No idea if that’s possible. Is there even a separate /data/data folder on the SD card, or is it only on the device itself?!