Skip to main content

gomalock

PyPI - Version Python Version from PEP 621 TOML License Test

Sesame スマートロックを Bluetooth Low Energy で操作する Python ライブラリ。

主な機能

  • Sesame 5 / Sesame 5 Pro / Sesame 5 USA の施錠、解錠、トグル操作
  • Sesame 5 系の角度、バッテリー残量、オートロック設定の取得と変更
  • Sesame Touch / Sesame Touch Pro / Sesame Touch 2 / Sesame Touch 2 Pro のバッテリー残量と登録済みカード、指紋、パスワード数の取得
  • 周囲の Sesame デバイスのスキャン
  • 新規 Sesame デバイスの登録
  • 共有用 QR URL の作成
  • 予期しない切断後の自動再接続

インストール

pip install gomalock

最新のソースからインストールする場合:

pip install git+https://github.com/meronepy/gomalock.git

クイックスタート

import asyncio

import gomalock

ADDRESS = "XX:XX:XX:XX:XX:XX"
SECRET_KEY = "0123456789abcdef0123456789abcdef"


async def main():
    async with gomalock.Sesame5(ADDRESS, secret_key=SECRET_KEY) as sesame5:
        await sesame5.unlock("gomalock")


if __name__ == "__main__":
    asyncio.run(main())

注意事項

  • Raspberry Pi OS では Bluetooth がブロックされていることがあります。BleakBluetoothNotAvailableError が出る場合は、次を試してください。
sudo rfkill unblock bluetooth
  • Bluetooth は距離が近いほど安定します。スキャンできない、接続に失敗する、操作だけ失敗する場合は、デバイスとの距離を近づけて試してください。
  • Linux では BlueZ 5.82 (Raspberry Pi OS Trixie) 以降 が必要です。
  • 履歴機能は公式アプリとの連携が難しいため実装していません。
  • 非公式ライブラリです。動作保証はありません。自己責任で使用してください。

開発環境

  • Windows 11 24H2, Python 3.13.3
  • Raspberry Pi Zero 2W, Raspberry Pi OS Trixie (64bit), Python 3.13.3
  • Sesame 5, 3.0-5-ad26ee
  • Sesame 5 Pro, 3.0-7-ad26ee

対応機種

対応状況 機種
Sesame 5
Sesame 5 Pro
⚠️ Sesame 5 US (未検証)
Sesame 4以前
対応状況 機種
Sesame Touch
⚠️ Sesame Touch Pro (未検証)
⚠️ Sesame Touch 2 (未検証)
⚠️ Sesame Touch 2 Pro (未検証)
Sesame Face
Sesame Face Pro

対応環境

対応状況 OS
Windows 11 version 22000 以降
Linux with BlueZ 5.82 以降
⚠️ macOS 10.15 以降 (未検証)

Python 3.12 以降が必要です。

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gomalock-2.1.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gomalock-2.1.0-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file gomalock-2.1.0.tar.gz.

File metadata

  • Download URL: gomalock-2.1.0.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gomalock-2.1.0.tar.gz
Algorithm Hash digest
SHA256 bb038812dbcff3b8d06e70b246ab6e2ee8041f871387343eaedc899217c3a5a7
MD5 6d588dd98827f0e4f61bca1500f91733
BLAKE2b-256 a73152e0235c6643be3231eddf34ad67be381e9ad528e31ac8e97cccddec6699

See more details on using hashes here.

File details

Details for the file gomalock-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: gomalock-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gomalock-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ca2094de45c3f8e40d81fc55b2f7771ebafe955a59061bd60e431b359058311
MD5 67a76be8093ef19c2826ac285a6f84f5
BLAKE2b-256 1320a9f014482842977d12c8d80bb4f1666eefba4c747378d8c79f2859ad809e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 files

2.0.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page