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.
- π 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
pip install gecko-iot-clientimport 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())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
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)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
- Python 3.13+
- Poetry (recommended) or pip
# 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# Run the demo script
python gecko_iot_client/examples/demo.py- π 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
We welcome contributions! Please see our Contributing Guide for details.
- 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
- β 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
This project is licensed under the MIT License - see the LICENSE file for details.
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
This project follows Semantic Versioning (SemVer) combined with PEP 440 for Python compatibility.
MAJOR.MINOR.PATCH[-PRERELEASE]
- MAJOR: Breaking changes (incompatible API changes)
- MINOR: New features (backward-compatible functionality)
- PATCH: Bug fixes (backward-compatible fixes)
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| 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 |
π§ 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
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)
- 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
See CHANGELOG.md for a detailed version history.
Made with β€οΈ by the Gecko Team
Powering the future of smart pool and spa control