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 以降が必要です。

Metadata

Release files for gomalock 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gomalock 2.1.0
File Size Uploaded
gomalock-2.1.0.tar.gz 26.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gomalock 2.1.0
File Interpreter ABI Platform
gomalock-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.5 kB

Release files / gomalock-2.1.0.tar.gz

Download URL gomalock-2.1.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb038812dbcff3b8d06e70b246ab6e2ee8041f871387343eaedc899217c3a5a7
BLAKE2b-256 checksum
How to use checksums
a73152e0235c6643be3231eddf34ad67be381e9ad528e31ac8e97cccddec6699
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / gomalock-2.1.0-py3-none-any.whl

Download URL gomalock-2.1.0-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ca2094de45c3f8e40d81fc55b2f7771ebafe955a59061bd60e431b359058311
BLAKE2b-256 checksum
How to use checksums
1320a9f014482842977d12c8d80bb4f1666eefba4c747378d8c79f2859ad809e
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page