Skip to main content

Python API for GShock Watches using BLE

Project description

gshock_api

Announcement

The library now supports sending application-level notifications to watches that support it, namely:

  • DW-H5600

  • GBD-H2000

  • GBD-200

  • GBD-100

  • GBD-800

  • GBD-100BAR

  • GBX-100

The new API is send_app_notification function. See the examples/api_test.py file for usage examples.

Only the DW-H5600 watch has been tested. If you have any of the watches supporting notifications, please let me know your findings.

Version 2.0.38+: Functional Architecture

Starting from version 2.0.38, the library has been refactored to use a pure functional programming model with monoids for all data transformations. This architectural improvement provides:

  • Better composability: Data transformation operations can be easily combined and chained

  • Improved predictability: Immutable data structures reduce side effects and unexpected state changes

  • Enhanced testability: Functional components are easier to unit test in isolation

  • Cleaner code: Monoid operations simplify buffer handling and packet encoding/decoding

Overview

This is a Python API library for G-Shock watches that support Bluetooth Low Energy (BLE) communication.

G(M)W-5600, G(M)W-5000, GA-B2100, GA-B001-1AER, GST-B500, GST-B200, MSG-B100, G-B001, GBD-H1000 (Partial support), MRG-B5000, GCW-B5000, GG-B100, ABL-100WE, Edifice ECB-30, ECB-10, ECB-20, most Edifice watches, most Protrek models.

It can perform the following tasks:

  • Set watch’s time

  • Set Home Time (Home City)

  • Set Alarms

  • Set Reminders

  • Set watch’s settings.

  • Get watch’s name

  • Get watch’s battery level

  • Get Watch’s temperature

  • Get/Set watch’s Timer

  • Send notifications to watch (supported models)

Running the tests

To run the test do the following:

uv run src/examples/api_tests.py

or activate venv` first and then run using python:

source .venv/bin/activate
python src/examples/api_tests.py

Installing the library for your project:

Add dependency on this library in your pyproject.toml

dependencies = [
   "gshock-api>=2.0.38",
   ...
]

Troubleshooting:

If your watch cannot connect, and the `–multi-watch` parameter is not used, remove the `config.ini` file and try again.

Project details


Download files

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

Source Distribution

gshock_api-2.0.39.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

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

gshock_api-2.0.39-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

Details for the file gshock_api-2.0.39.tar.gz.

File metadata

  • Download URL: gshock_api-2.0.39.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for gshock_api-2.0.39.tar.gz
Algorithm Hash digest
SHA256 e66f9a02f1bfce88f2b840fe7b325478f71943911013c30abedacda16a3f1c02
MD5 0dd09a7bc7301cc94b5aebbd5f10d423
BLAKE2b-256 f8cfd3ebd34c7d3b65fe136ab19e8dc7492fbf21930ba5941826facec4e6fb4f

See more details on using hashes here.

File details

Details for the file gshock_api-2.0.39-py3-none-any.whl.

File metadata

  • Download URL: gshock_api-2.0.39-py3-none-any.whl
  • Upload date:
  • Size: 55.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for gshock_api-2.0.39-py3-none-any.whl
Algorithm Hash digest
SHA256 60fa7358d6941a1b346bf52c0472506ddd17fc8f80bbab0591bab8eb341f2319
MD5 1aaf8d04d9ad3a9d1aca5c3432f8d058
BLAKE2b-256 77b442af69fce9640f28a2e656b942f74330c2b775ff629de22f91521be59699

See more details on using hashes here.

Supported by

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