{"id":15450756,"url":"https://github.com/koenvervloesem/bluetooth-clocks","last_synced_at":"2026-02-24T00:06:23.473Z","repository":{"id":65386316,"uuid":"591417159","full_name":"koenvervloesem/bluetooth-clocks","owner":"koenvervloesem","description":"Set and get the time on various Bluetooth Low Energy clocks","archived":false,"fork":false,"pushed_at":"2023-10-28T16:03:51.000Z","size":567,"stargazers_count":28,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-25T15:49:07.782Z","etag":null,"topics":["ble","bluetooth","bluetooth-low-energy","clocks","current-time-service","infinitime","pinetime","pvvx-firmware","python","python3","qingping","thermopro","time-sync","time-synchronization","xiaomi"],"latest_commit_sha":null,"homepage":"https://bluetooth-clocks.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koenvervloesem.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-20T17:52:36.000Z","updated_at":"2025-08-06T18:48:26.000Z","dependencies_parsed_at":"2024-10-23T08:36:50.873Z","dependency_job_id":"545128a0-caf5-427c-bc4c-01e49418c158","html_url":"https://github.com/koenvervloesem/bluetooth-clocks","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"5085e7a9fea384e04b2a2e472ad37b8759c17f52"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/koenvervloesem/bluetooth-clocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenvervloesem%2Fbluetooth-clocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenvervloesem%2Fbluetooth-clocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenvervloesem%2Fbluetooth-clocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenvervloesem%2Fbluetooth-clocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koenvervloesem","download_url":"https://codeload.github.com/koenvervloesem/bluetooth-clocks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenvervloesem%2Fbluetooth-clocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29762001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T21:02:23.375Z","status":"ssl_error","status_checked_at":"2026-02-23T20:58:31.539Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","bluetooth","bluetooth-low-energy","clocks","current-time-service","infinitime","pinetime","pvvx-firmware","python","python3","qingping","thermopro","time-sync","time-synchronization","xiaomi"],"created_at":"2024-10-01T21:15:13.877Z","updated_at":"2026-02-24T00:06:23.456Z","avatar_url":"https://github.com/koenvervloesem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://github.com/koenvervloesem/bluetooth-clocks/workflows/tests/badge.svg\n    :alt: Continuous Integration\n    :target: https://github.com/koenvervloesem/bluetooth-clocks/actions\n.. image:: https://img.shields.io/pypi/v/bluetooth-clocks.svg\n    :alt: Python package version\n    :target: https://pypi.org/project/bluetooth-clocks/\n.. image:: https://img.shields.io/pypi/pyversions/bluetooth-clocks.svg\n    :alt: Supported Python versions\n    :target: https://python.org/\n.. image:: https://readthedocs.org/projects/bluetooth-clocks/badge/?version=latest\n    :target: https://bluetooth-clocks.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n.. image:: https://codecov.io/gh/koenvervloesem/bluetooth-clocks/branch/main/graph/badge.svg?token=RQNLC3OTFN\n    :alt: Codecov coverage\n    :target: https://codecov.io/gh/koenvervloesem/bluetooth-clocks\n.. image:: https://img.shields.io/github/license/koenvervloesem/bluetooth-clocks.svg\n    :alt: License\n    :target: https://github.com/koenvervloesem/bluetooth-clocks/blob/main/LICENSE.txt\n\n|\n\n================\nBluetooth Clocks\n================\n\n\n    Set and get the time on various Bluetooth Low Energy clocks\n\n\nThis project offers a way to easily recognize Bluetooth Low Energy (BLE) clocks from\ntheir advertisements and has a device-independent API to set and get the time on them.\n\n.. image:: https://github.com/koenvervloesem/bluetooth-clocks/raw/main/docs/_static/synchronized-clocks.jpg\n    :alt: Synchronize all your Bluetooth Low Energy clocks\n\n.. inclusion-marker-after-intro\n\nSupported devices\n=================\n\nBluetooth Clocks supports the following devices:\n\n+--------------------------+------------+-------------------+-----------+\n| Device                   | Set time   | Set 12/24h format | Read time |\n+==========================+============+===================+===========+\n| `Current Time Service`_  | Yes        | No                | Yes       |\n| (e.g. PineTime with      |            |                   |           |\n| InfiniTime firmware)     |            |                   |           |\n+--------------------------+------------+-------------------+-----------+\n| `PVVX firmware`_         | Yes        | No                | Yes       |\n| (LYWSD03MMC, MHO-C401,   |            |                   |           |\n| CGG1, CGDK2, MJWSD05MMC, |            |                   |           |\n| MHO-C122)                |            |                   |           |\n+--------------------------+------------+-------------------+-----------+\n| Qingping BT Clock Lite   | Yes        | No                | No        |\n+--------------------------+------------+-------------------+-----------+\n| ThermoPro TP358/TP393    | Yes        | Yes               | No        |\n+--------------------------+------------+-------------------+-----------+\n| Xiaomi LYWSD02           | Yes        | No                | Yes       |\n+--------------------------+------------+-------------------+-----------+\n\n.. _Current Time Service: https://www.bluetooth.com/specifications/specs/current-time-service-1-1/\n.. _PVVX firmware: https://github.com/pvvx/ATC_MiThermometer\n\n.. inclusion-marker-before-installation\n\nInstallation\n============\n\nYou can install bluetooth-clocks as a package from PyPI with pip::\n\n    pip install bluetooth-clocks\n\nUsage of the command-line program\n=================================\n\nIf you have installed the package with ``pip``, you can run the program as ``bluetooth-clocks``::\n\n    $ bluetooth-clocks -h\n    usage: bluetooth-clocks [-h] [--version] [-v] [-vv] {discover,get,set} ...\n\n    Bluetooth Clocks\n\n    options:\n      -h, --help           show this help message and exit\n      --version            show program's version number and exit\n      -v, --verbose        set loglevel to INFO\n      -vv, --very-verbose  set loglevel to DEBUG\n\n    Subcommands:\n      {discover,get,set}\n        discover           discover supported Bluetooth clocks\n        get                get the time from a Bluetooth clock\n        set                set the time of a Bluetooth clock\n\nDiscovering Bluetooth clocks\n----------------------------\n\nYou can discover supported Bluetooth clocks with ``bluetooth-clocks discover``::\n\n    $ bluetooth-clocks discover\n    Scanning for supported clocks...\n    Found a ThermoPro TP358: address BC:C7:DA:6A:52:C6, name TP358 (52C6)\n    Found a Xiaomi LYWSD02: address E7:2E:00:B1:38:96, name LYWSD02\n    Found a ThermoPro TP393: address 10:76:36:14:2A:3D, name TP393 (2A3D)\n    Found a Qingping BT Clock Lite: address 58:2D:34:54:2D:2C, name Qingping BT Clock Lite\n    Found a Current Time Service: address EB:76:55:B9:56:18, name F15\n\nThese are the options that the ``discover`` subcommand recognizes::\n\n    $ bluetooth-clocks discover -h\n    usage: bluetooth-clocks discover [-h] [-s SCAN_DURATION]\n\n    options:\n      -h, --help            show this help message and exit\n      -s SCAN_DURATION, --scan-duration SCAN_DURATION\n                            scan duration (default: 5 seconds)\n\nSetting the time\n----------------\n\nSet the time of a clock with a given Bluetooth address::\n\n    $ bluetooth-clocks set -a E7:2E:00:B1:38:96\n    Scanning for device E7:2E:00:B1:38:96...\n    Writing time to device...\n    Synchronized time\n\nIf you want to regularly synchronize the time on the device, you can run this command as a service, e.g. with a systemd service or in a cron job in Linux.\n\nThese are the options that the ``set`` subcommand recognizes::\n\n    $ bluetooth-clocks set -h\n    usage: bluetooth-clocks set [-h] -a ADDRESS [-s SCAN_DURATION] [-t TIME] [-p]\n\n    options:\n      -h, --help            show this help message and exit\n      -a ADDRESS, --address ADDRESS\n                            Bluetooth address (e.g. 12:34:56:78:9A:BC)\n      -s SCAN_DURATION, --scan-duration SCAN_DURATION\n                            scan duration (default: 5 seconds)\n      -t TIME, --time TIME  the time to set, in ISO 8601 format (e.g. 2023-01-10T16:20,\n                            default: current time)\n      -p, --am-pm           use AM/PM format (default: 24-hour format)\n\n.. warning::\n\n  Don't be a jerk by changing the time of other people's clocks. Use this tool responsibly.\n\nGetting the time\n----------------\n\nGet the time from a clock with a given Bluetooth address::\n\n    $ bluetooth-clocks get -a E7:2E:00:B1:38:96\n    Scanning for device E7:2E:00:B1:38:96...\n    Reading time from device...\n    2023-01-14T17:54:17\n\nThese are the options that the ``get`` subcommand recognizes::\n\n    $ bluetooth-clocks get -h\n    usage: bluetooth-clocks get [-h] -a ADDRESS [-s SCAN_DURATION]\n\n    options:\n      -h, --help            show this help message and exit\n      -a ADDRESS, --address ADDRESS\n                            Bluetooth address (e.g. 12:34:56:78:9A:BC)\n      -s SCAN_DURATION, --scan-duration SCAN_DURATION\n                            scan duration (default: 5 seconds)\n\nUsage of the library\n====================\n\nThe functionality of the command-line program can also be used in your own Python programs by using this project as a library.\n\nSee the `module reference \u003chttps://bluetooth-clocks.readthedocs.io/en/latest/api/modules.html\u003e`_ for complete API documentation.\n\n.. inclusion-marker-before-license\n\nDocumentation\n=============\n\nRead the `online documentation \u003chttps://bluetooth-clocks.readthedocs.io\u003e`_ of Bluetooth Clocks.\n\nLearn more about Bluetooth Low Energy development\n=================================================\n\nIf you want to learn more about Bluetooth Low Energy development, read the book `Develop your own Bluetooth Low Energy Applications for Raspberry Pi, ESP32 and nRF52 with Python, Arduino and Zephyr \u003chttps://koen.vervloesem.eu/books/develop-your-own-bluetooth-low-energy-applications/\u003e`_ and the accompanying GitHub repository `koenvervloesem/bluetooth-low-energy-applications \u003chttps://github.com/koenvervloesem/bluetooth-low-energy-applications\u003e`_.\n\nLicense\n=======\n\nThis project is provided by Koen Vervloesem as open source software with the MIT license. See the `LICENSE \u003chttps://github.com/koenvervloesem/bluetooth-clocks/blob/main/LICENSE.txt\u003e`_ file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoenvervloesem%2Fbluetooth-clocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoenvervloesem%2Fbluetooth-clocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoenvervloesem%2Fbluetooth-clocks/lists"}