A library to communicate with Switchbot
Project description
pySwitchbot
Library to control Switchbot IoT devices https://www.switch-bot.com/bot
Obtaining locks encryption key
Using the script scripts/get_encryption_key.py
you can manually obtain locks encryption key.
Usage:
$ python3 get_encryption_key.py MAC USERNAME
Key ID: xx
Encryption key: xxxxxxxxxxxxxxxx
Where MAC
is MAC address of the lock and USERNAME
is your SwitchBot account username, after that script will ask for your password.
If authentication succeeds then script should output your key id and encryption key.
Examples:
- WoLock
import asyncio
from switchbot.discovery import GetSwitchbotDevices
from switchbot.devices import lock
async def main():
wolock = await GetSwitchbotDevices().get_locks()
await lock.SwitchbotLock(wolock['32C0F607-18B8-xxxx-xxxx-xxxxxxxxxx'].device, "key-id", "encryption-key").get_lock_status()
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyswitchbot-0.53.2.tar.gz
.
File metadata
- Download URL: pyswitchbot-0.53.2.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7824dafcb3570f59a82289b3cdc4f21330d0382cf2a9e9cf9e349551c63c39be |
|
MD5 | a4a8c101ae931ac8527bdb49c3b81695 |
|
BLAKE2b-256 | d452dc106ce0a3aaa33b84f5ae9d7b707a72dd5e763b1a8464cabd5a42775275 |
Provenance
The following attestation bundles were made for pyswitchbot-0.53.2.tar.gz
:
Publisher:
python-publish.yml
on sblibs/pySwitchbot
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyswitchbot-0.53.2.tar.gz
- Subject digest:
7824dafcb3570f59a82289b3cdc4f21330d0382cf2a9e9cf9e349551c63c39be
- Sigstore transparency entry: 149593008
- Sigstore integration time:
- Predicate type:
File details
Details for the file PySwitchbot-0.53.2-py3-none-any.whl
.
File metadata
- Download URL: PySwitchbot-0.53.2-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe5f14fe26b36fba53a563721c4352d568d1d4a21c0f6265f52d03133708e93f |
|
MD5 | 7aa6c96234f5797c83c74cfad991397c |
|
BLAKE2b-256 | 62a26a7a5c1577067163a798cf673250a43182c34d02812a31cab3dfacb308ae |
Provenance
The following attestation bundles were made for PySwitchbot-0.53.2-py3-none-any.whl
:
Publisher:
python-publish.yml
on sblibs/pySwitchbot
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyswitchbot-0.53.2-py3-none-any.whl
- Subject digest:
fe5f14fe26b36fba53a563721c4352d568d1d4a21c0f6265f52d03133708e93f
- Sigstore transparency entry: 149593009
- Sigstore integration time:
- Predicate type: