Skip to main content

wt.pygardena

Python library to communicate with Gardana Smart It gives an object oriented interface towards the Gardena Smart API (API usage is not officially supported by Gardena). This library is written to be used to support gardena devices in https://www.home-assistant.io currently using my custom_component https://github.com/wijnandtop/home_assistant_gardena. It can be used for other purposes as well, since it doesn't have any home assistent specific implementations.

Inspired by: https://github.com/rcastberg/gardena_smart

It is build to have limited interaction with the API of gardena. Fetching information is done via 2 calls.

  • get all locations
  • get devices per location

Objects fetch data from the internal state, update of internal state has to be explicitly triggered.

usage

hub = GardenaSmartAccount("username", "password")
for location in hub.get_locations(): 
    for mower in location.get_mowers():
        print (mower.get_info())
    for sensor in location.get_sensors():
        print (sensor.get_info())
    for watering_computer in location.get_watering_computers():
        print (watering_computer.get_info())

Object information

All object (except GardenaSmartAccount) have attributes which can be retrieved by either:

object.get_info()

Which retuns a named list, or:

#[attribute] needs to be replaced by the detail name.
object.get_[attribute].() 

GardenaSmartAccount

Available methods:

account.get_locations() # returns list of GardenaSmartLocation objects, if there is no internal state it will call the Gardena API
account.update_devices() # Loops over all locations and updates the internal state.
account.get_all_mowers() # Get all mowers from all locations.
account.get_all_sensors() # Get all sensors from all locations.
account.get_all_watering_computers() # Get all watering computers from all locations.

GardenaSmartLocation

Available methods:

location.update_devices() # updates the internal state of all devices in this location.
location.get_mowers() # Get all mowers from this location.
location.get_sensors() # Get all sensors from this location.
location.get_watering_computers() # Get all watering computers from this location.

All devices

Have these details: category, battery_level, radio_quality, radio_connection_status Extend from GardenaSmartDevice. Currently it is not possible to update the internal state from a device.

GardenaSmartMower

Available methods:

mower.start() #starts mowing for a full day (can be specified)
mower.park_until_timer() #stop mowing and  wait for next schedule
mower.park() #stop mower, don't continue schedule

Available info: manual_operation, status, error, battery_charging, last_error_code, source_for_next_start, timestamp_next_start, cutting_time, charging_cycles, collisions, running_time

GardenaSmartSensor

Available methods: none Available info: ambient_temperature, ambient_frost_warning, soil_temperature, soil_humidity, light

GardenaSmartWateringComputer

Available methods:

watering_computer.start() #starts watering for a 30 (can be specified)
watering_computer.stop() #stop watering and  wait for next schedule 

Available info: ambient_temperature, ambient_frost_warning, valve_open, manual_override, button_manual_override_time, last_manual_override_time, scheduled_watering_next_start, scheduled_watering_end, adaptive_scheduling_last_decision

tested with:

  • Mower: smart SILENO Set (Article No. : 19060-60)
  • Watering computer: GARDENA smart Water Control (Article No. : 19031-20)
  • Sensor: GARDENA smart Sensor (Article No. : 19030-20)

not planned yet

Since I do not own the devices, but feel free to sponsor me ;-)

  • smart irrigation control (on top of my wishlist)
  • Smart pressure pump
  • smart power adapter
  • smart battery

Changelog

###0.9.3

Initial version

###0.9.4 - broken

  • Change license to Apache 2.0
  • RestAPI class that encapsulates API access
  • Removed object_path dependency that occured just once
  • update metadata

###0.9.5

  • Reverted: Removed object_path dependency that occured just once

###0.9.6

  • Changed API endpoint (old one was broken)

Metadata

Release files for wt.pygardena 0.9.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wt.pygardena 0.9.6
File Size Uploaded Provenance Actions
wt.pygardena-0.9.6.tar.gz 8.6 kB Without provenance Details for wt.pygardena-0.9.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wt.pygardena 0.9.6
File Interpreter ABI Platform Actions
wt.pygardena-0.9.6-py3-none-any.whl Python 3 none any Details for wt.pygardena-0.9.6-py3-none-any.whl

Total release size: 22.2 kB

Release files / wt.pygardena-0.9.6.tar.gz

Download URL wt.pygardena-0.9.6.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
537ed9ceb60bc3b231f50388ad4f87fafd93786e0a26246a83461cb37f0e91d6
BLAKE2b-256 checksum
How to use checksums
fb146b8f64043144f9f09cd1bef0a63f72c030ecbc8f51829420bd13886eea34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / wt.pygardena-0.9.6-py3-none-any.whl

Download URL wt.pygardena-0.9.6-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf84c7f8676cf08ab5a4879dbdb4576dde211915dd97e47e9fa14a5d00b1c9d3
BLAKE2b-256 checksum
How to use checksums
3340f0af35e85425217591231eb31b1d0ef16dd79d02831cf1f283b37bc27781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for wt.pygardena 0.9.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page