A Python client library for Gecko IoT devices with AWS IoT integration
Project description
๐ฆ Gecko IoT Client
[!CAUTION] ๐จ HEAVY DEVELOPMENT IN PROGRESS ๐จ
This project is under heavy active development and the API is rapidly changing.
- โ ๏ธ Breaking changes expected in the coming days/weeks
- ๐ซ Not recommended for production use until v1.0.0
- ๐ฏ Use at your own risk for development/testing only
- ๐ API stability target: Within November 2025
A modern, asynchronous Python client library for Gecko IoT devices with AWS IoT integration. Control and monitor your Gecko-powered spas, hot tubs, and pool equipment with ease.
โจ Features
- ๐ AWS IoT Integration: Secure MQTT communication via AWS IoT Core
- ๐ Multi-Zone Control: Temperature, lighting, and flow zone management
- ๐ก Real-time Updates: Event-driven state synchronization
- ๐ Async/Await Support: Modern Python async programming patterns
- ๐ก๏ธ Type Safety: Full type hints and mypy compatibility
- ๐ Comprehensive Logging: Detailed debug and monitoring capabilities
- ๐งช Well Tested: Extensive test suite with code coverage
- ๐ Rich Documentation: Auto-generated API docs and examples
๐ Quick Start
Installation
pip install gecko-iot-client
Basic Usage
import asyncio
from gecko_iot_client import GeckoIotClient
from gecko_iot_client.transporters.mqtt import MqttTransporter
async def main():
# Create MQTT transporter with your AWS IoT endpoint
transporter = MqttTransporter(
endpoint="wss://your-endpoint.iot.region.amazonaws.com/mqtt",
device_id="your-device-id"
)
# Initialize client
client = GeckoIotClient(idd="your-device-id", transporter=transporter)
async with client:
# Get all temperature control zones
temp_zones = client.get_zones_by_type(ZoneType.TEMPERATURE_CONTROL_ZONE)
for zone in temp_zones:
print(f"Zone {zone.name}: {zone.temperature}ยฐC (target: {zone.target_temperature}ยฐC)")
# Control lighting
lighting_zones = client.get_zones_by_type(ZoneType.LIGHTING_ZONE)
if lighting_zones:
light = lighting_zones[0]
await light.activate() # Turn on
await light.set_color(255, 0, 0) # Set to red
if __name__ == "__main__":
asyncio.run(main())
๐๏ธ Architecture
Zone Types
The client supports three main zone types:
- ๐ก๏ธ Temperature Control Zones: Heater and temperature management
- ๐ก Lighting Zones: LED lighting control with color support
- ๐ Flow Zones: Pump and circulation control
Event System
def on_temperature_change(zone, old_temp, new_temp):
print(f"Temperature changed from {old_temp}ยฐC to {new_temp}ยฐC")
client.register_zone_callbacks(lambda zone_name: on_temperature_change)
๐ Project Structure
gecko-iot-client/
โโโ .github/workflows/ # CI/CD pipelines
โโโ gecko_iot_client/ # Main package
โ โโโ src/ # Source code
โ โ โโโ gecko_iot_client/
โ โ โโโ models/ # Data models and zone types
โ โ โโโ transporters/ # Communication layers
โ โโโ tests/ # Test suite
โ โโโ docs/ # Sphinx documentation
โ โโโ examples/ # Usage examples
โโโ README.md # This file
๐ ๏ธ Development
Prerequisites
- Python 3.13+
- Poetry (recommended) or pip
Setup
# Clone the repository
git clone https://github.com/geckoal/gecko-iot-client.git
cd gecko-iot-client
# Install dependencies
cd gecko_iot_client
pip install -e ".[dev,docs]"
# Run tests
pytest tests/ --cov=gecko_iot_client
# Format code
black src/ tests/
isort src/ tests/
# Build documentation
sphinx-build docs/source docs/build/html
# Generate changelog from git history
./scripts/generate-changelog.sh
# or using the Python entry point
gecko-build-changelog
Running Examples
# Run the demo script
python gecko_iot_client/examples/demo.py
๐ Documentation
- ๐ Full Documentation - Complete API reference and guides
- ๐ฏ Quick Start Guide - Get up and running fast
- ๐ง Configuration - Setup and configuration options
- ๐ก Examples - Code examples and use cases
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ Testing & Quality
- โ Automated Testing: GitHub Actions run tests on every push and PR
- ๐ Code Coverage: Monitored via SonarCloud with detailed quality reports
- ๐ Code Quality: SonarCloud analysis with Black, isort, and flake8 for consistent style
- ๐ Documentation: Auto-generated and deployed on every release
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
๐ท๏ธ Versioning Strategy
This project follows Semantic Versioning (SemVer) combined with PEP 440 for Python compatibility.
Version Format
MAJOR.MINOR.PATCH[-PRERELEASE]
- MAJOR: Breaking changes (incompatible API changes)
- MINOR: New features (backward-compatible functionality)
- PATCH: Bug fixes (backward-compatible fixes)
Git Tag Format
All releases use the v prefix in git tags:
# Release versions
v1.0.0 # Major release
v1.1.0 # Minor release
v1.1.1 # Patch release
# Pre-release versions
v1.0.0-alpha.1 # Alpha release
v1.0.0-beta.1 # Beta release
v1.0.0-rc.1 # Release candidate
Release Lifecycle
| Stage | Git Tag Example | PyPI Version | Purpose |
|---|---|---|---|
| Alpha | v0.1.0-alpha.1 |
0.1.0a1 |
Early development, internal testing |
| Beta | v0.1.0-beta.1 |
0.1.0b1 |
Feature complete, external testing |
| Release Candidate | v0.1.0-rc.1 |
0.1.0rc1 |
Final validation before release |
| Stable Release | v0.1.0 |
0.1.0 |
Production ready |
| Patch Release | v0.1.1 |
0.1.1 |
Bug fixes only |
| Minor Release | v0.2.0 |
0.2.0 |
New features, backward compatible |
| Major Release | v1.0.0 |
1.0.0 |
Breaking changes |
Current Development Phase
๐ง Alpha Stage - The project is currently in alpha development:
- API Stability: โ ๏ธ APIs may change without notice
- Production Use: โ Not recommended until v1.0.0
- Testing: โ Suitable for development and testing
- Feedback: ๐ฏ Highly appreciated via GitHub Issues
Version Detection
Versions are automatically determined from git tags using setuptools-scm:
import gecko_iot_client
print(gecko_iot_client.__version__) # e.g., "0.1.0a2.post1"
Version Components:
0.1.0a2- Alpha version 2 of release 0.1.0.post1- 1 commit after the tagged release+dirty- Local uncommitted changes (development builds)
Release Process
- Development happens on the
developbranch - Tagging creates releases:
git tag v0.1.0-alpha.3 && git push origin v0.1.0-alpha.3 - GitHub Actions automatically builds and publishes to PyPI
- Documentation is automatically updated and deployed
๐ท๏ธ Version History
See CHANGELOG.md for a detailed version history.
Made with โค๏ธ by the Gecko Team
Powering the future of smart pool and spa control
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 gecko_iot_client-0.2.0.tar.gz.
File metadata
- Download URL: gecko_iot_client-0.2.0.tar.gz
- Upload date:
- Size: 86.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01e8c7627c795a841af52ba4750b3b6e541a9a267ccce9ce3dd48f1b48bda81a
|
|
| MD5 |
19ed5114fef11b2897ca3dfa65dc400c
|
|
| BLAKE2b-256 |
dd7898a4e6afc2dc09de6bda24c7cedc164c350dee4747a10cfaa7e2402cf3d9
|
File details
Details for the file gecko_iot_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gecko_iot_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 63.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5889143729479fdab0106ba55708e9040249de1580592bfa9d3e3e27e11f387a
|
|
| MD5 |
035868896f35f94ea84c13678b239678
|
|
| BLAKE2b-256 |
41c240c7312fa73dd5a685083fe62fc1cc999cde6bb1b328c31bc9b175d8cb4d
|