File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,29 @@ Using the script `scripts/get_encryption_key.py` you can manually obtain locks e
66
77Usage:
88``` shell
9- python3 get_encryption_key.py MAC USERNAME
9+ $ python3 get_encryption_key.py MAC USERNAME
10+ Key ID: xx
11+ Encryption key: xxxxxxxxxxxxxxxx
1012```
13+
1114Where ` MAC ` is MAC address of the lock and ` USERNAME ` is your SwitchBot account username, after that script will ask for your password.
1215If authentication succeeds then script should output your key id and encryption key.
1316
17+ Examples:
18+
19+ * WoLock
20+
21+ ``` python
22+ import asyncio
23+ from switchbot.discovery import GetSwitchbotDevices
24+ from switchbot.devices import lock
25+
1426
27+ async def main ():
28+ wolock = await GetSwitchbotDevices().get_locks()
29+ await lock.SwitchbotLock(wolock[' 32C0F607-18B8-xxxx-xxxx-xxxxxxxxxx' ].device, " key-id" , " encryption-key" ).get_lock_status()
30+
31+
32+ asyncio.run(main())
33+
34+ ```
You can’t perform that action at this time.
0 commit comments