Pythgon API for GShock Watches using BLE
Project description
GShockTimeServer
Overview
GShockTimeServer allows you to set the correct time on your Casio G-Shock watches, including:
Additionally, this repository provides an API for developing applications for these watches. While still a work in progress, you can refer to the api_tests.py file for usage examples.
Usage
This app can run on any device with Python and Bluetooth capabilities—from a desktop to a Raspberry Pi Zero. It has been tested on Linux but should also work on Windows.
Setting the Time
Ensure the app is running on your device.
Short-press the lower-right button on your G-Shock watch to connect.
Once connected, the app will automatically set the correct time on your watch.
If AUTO TIME ADJUSTMENT is enabled, the watch will sync up to four times daily.
Dependencies
This project requires the following Python packages: ` pytz bleak `
So you can install them using the following command: ` pip3 install -r requirements.txt `
Virtual Environment Setup
To run the server in a virtual environment:
Create a virtual environment:
# Create a virtual environment
python3 -m venv myenv
# Activate it (Mac/Linux)
source myenv/bin/activate
# Install dependencies
pip3 install -e .
Run the tests:
python3 src/examples/api_tests.py [--multi-watch]
Run the server:
python3 src/examples/gshock_server.py [--multi-watch]
The optional `–multi-watch` parameter allows you to connect if you have multiple watches.
Installing the library for your project:
` pip3 install gshock-api `
Troubleshooting:
If your watch cannot connect, and the `–multi-watch` parameter is not used, remove the `config.ini` file and try again.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gshock_api-2.0.2.tar.gz.
File metadata
- Download URL: gshock_api-2.0.2.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bae06ae513a80e672f9d208bb1fed584b3013452b23fb143bf9e08d613e4a263
|
|
| MD5 |
136d19f56e1ba2e42726cc28723c0f3c
|
|
| BLAKE2b-256 |
a5aaff6aa09ef83f8b870f4ac45d3b8bbde42b7306d9e05c3e7ff397a1df1578
|
File details
Details for the file gshock_api-2.0.2-py3-none-any.whl.
File metadata
- Download URL: gshock_api-2.0.2-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b44c1074573ea59e58ff72602eaa08e849aaf5162eec6f951a221f3c4cb89ff
|
|
| MD5 |
fbbe8066a2668584c89d51863debbca7
|
|
| BLAKE2b-256 |
fe09cec3a96ff62d3a1007421705f3a17aa45880bb545ada3f2523da91d0b8bc
|