Library to interact with the local GARDENA smart API.
Project description
Python library for GARDENA smart local API
Enables controlling and monitoring GARDENA smart devices in the local network, without going through the cloud.
Supported Devices
| Device | Article Number | Model (EAN suffix) | Stack |
|---|---|---|---|
| smart Sensor | 19030-20 | 18845 | 1st gen |
| smart Sensor II | 19040-20 | 19040 | 1st gen |
| smart Water Control | 19031-20 | 18869 | 1st gen |
| smart Water Control | 19033-20 | 2812 | 2nd gen |
| smart Dual Water Control | 19034-20 | 2814 | 2nd gen |
| smart Pipeline Water Control | 19050-20 | 2826 | 2nd gen |
| smart Automatic Home & Garden Pump | 19080-20 | 22538 | 1st gen |
| smart Irrigation Control | 19032-20 | 31653 | 1st gen |
| smart Irrigation Control | 19035-20 | 469 | 2nd gen |
| smart Power Adapter | 19095-20 | 35279 | 1st gen |
| smart SILENO | 19060-20, 19060-60 | 6146 | 1st gen |
| smart SILENO+ | 19061-20, 19061-60, 19064-60, 19065-60 | 6146 | 1st gen |
| smart SILENO city | 19066-20, 19069-20 | 29694 | 1st gen |
| smart SILENO life | 19113-20, 19114-20, 19115-20 | 29694 | 1st gen |
| smart SILENO city (with LONA) | 19602-66, 19603-60, 19605-60 | 53988 | 1st gen |
| smart SILENO life (with LONA) | 19701-60, 19702-60, 19703-66, 19704-60 | 53988 | 1st gen |
| smart SILENO pro | 19802-20, 19802-22 | 488 | 2nd gen |
| smart SILENO max | 19901-22 | 488 | 2nd gen |
| smart SILENO free | 19921-22, 19922-22, 19923-22 | 488 | 2nd gen |
| Flymo UltraLife | 970620501, 970620701, 970715101, 970715201 | 488 | 2nd gen |
Installation
pip install gardena-smart-local-api
Using the Library
Have a look at our example code.
You can run the examples from within the repository as follows:
uv sync --group examples
uv run gardena_smart_local_api/examples/irrigation.py --help
Contributing
Debugging
Various strategies exist to figure out why things are not working the way you want them to. This section lists some common ones.
Verbose logging on the gateway
websocketd:
mkdir -p /etc/systemd/system/websocketd.service.d
cat << EOF > /etc/systemd/system/websocketd.service.d/debug.conf
[Service]
Environment=RUST_LOG=debug
EOF
systemctl daemon-reload && systemctl restart websocketd.service
lemonbeatd:
mkdir -p /etc/systemd/system/lemonbeatd.service.d
cat << EOF > /etc/systemd/system/lemonbeatd.service.d/debug.conf
[Service]
Environment=RUST_LOG=debug
EOF
systemctl daemon-reload && systemctl restart lemonbeatd.service
lwm2mserver (add --log-level=lwm2mserver.event=DEBUG as a argument to lwm2mserver):
mkdir -p /etc/systemd/system/lwm2mserver.service.d
cat << EOF > /etc/systemd/system/lwm2mserver.service.d/debug.conf
[Service]
ExecStart=
ExecStart=/usr/bin/lwm2mserver ppp0 --bind-to-device \\
--server-uri "coap://[fc00::6:100:0:0]" \\
--port 20017 \\
--lemonbeat-dongle-connection \\
--state-storage /var/lib/lwm2mserver \\
--lb-key-file /var/lib/lemonbeatd/Network_management/Network_key.json \\
--ipso-directories "\${IPSO_REGISTRY_DIR}/base" "\${IPSO_REGISTRY_DIR}/fwrolloutd" "\${IPSO_REGISTRY_DIR}/dev" \\
--log-level=lwm2mserver.event=DEBUG \\
EOF
systemctl daemon-reload && systemctl restart lwm2mserver.service
cloudadapter:
mkdir -p /etc/systemd/system/cloudadapter.service.d
cat << EOF > /etc/systemd/system/cloudadapter.service.d/debug.conf
[Service]
ExecStart=
ExecStart=/usr/bin/cloudadapter --verbosity --debug
EOF
systemctl daemon-reload && systemctl restart cloudadapter.service
[!TIP] Cloudadapter is not needed for local usage and disabling the service saves resources. However, for reverse-engineering how the services react to actions in the app, keeping the cloudadapter running and increasing its verbosity is helpful.
Commits
Try to keep commits reviewable, i.e. they should only contain one logical change and generally not be too big.
As we use rebase to integrate pull requests, clean commits matter. Use commands like git commit --amend,
git commit --fixup ... and git rebase --interactive ... to rework your commits. Should this be too advanced for you,
just push temporary commits and when review is done, run e.g.:
git fetch
git rebase origin/main
git reset origin/main
git commit --all
git push --force-with-lease
For the commit message(s), follow these guidelines. If you are unsure how to formulate your commit messages,
look at git log for inspiration.
Linting
uv sync --all-groups
uv run ruff check
uv run ruff format --check
uv run ty check
Running Tests
uv sync --group test
uv run python -m pytest
Licensing Compliance
uv run reuse lint
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 gardena_smart_local_api-0.1.0.tar.gz.
File metadata
- Download URL: gardena_smart_local_api-0.1.0.tar.gz
- Upload date:
- Size: 107.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dcb418c8ad545dfd14551b5d92b76daf25c58a832941060a19465e91abdd015
|
|
| MD5 |
b639b25dce1d24ee591e2c92ad49c5e0
|
|
| BLAKE2b-256 |
198fccbe3ca3b3487be9fb6e854b1c5398f00ef8dafe7441ecaca6b2161df611
|
Provenance
The following attestation bundles were made for gardena_smart_local_api-0.1.0.tar.gz:
Publisher:
publish.yml on cloudless-garden/gardena-smart-local-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gardena_smart_local_api-0.1.0.tar.gz -
Subject digest:
3dcb418c8ad545dfd14551b5d92b76daf25c58a832941060a19465e91abdd015 - Sigstore transparency entry: 2167395677
- Sigstore integration time:
-
Permalink:
cloudless-garden/gardena-smart-local-api@5976dbe5ad2eccdeef86fd9aa39fc22367471978 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cloudless-garden
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5976dbe5ad2eccdeef86fd9aa39fc22367471978 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gardena_smart_local_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gardena_smart_local_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 78.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
260e6057aeb91f1cd21510e4329862943e12e86e3a5923fb6ba959eca2a54397
|
|
| MD5 |
de8cc001e3b2b8578e98158f09a3fb9c
|
|
| BLAKE2b-256 |
633eeeb7f849f09b7dedeb94cd7b0b48011196539b02b5ce0474c910bc50c162
|
Provenance
The following attestation bundles were made for gardena_smart_local_api-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on cloudless-garden/gardena-smart-local-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gardena_smart_local_api-0.1.0-py3-none-any.whl -
Subject digest:
260e6057aeb91f1cd21510e4329862943e12e86e3a5923fb6ba959eca2a54397 - Sigstore transparency entry: 2167395684
- Sigstore integration time:
-
Permalink:
cloudless-garden/gardena-smart-local-api@5976dbe5ad2eccdeef86fd9aa39fc22367471978 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cloudless-garden
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5976dbe5ad2eccdeef86fd9aa39fc22367471978 -
Trigger Event:
push
-
Statement type: