Package: wt.pygardena
wt.pygardenaPython 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 inhttps://www.home-assistant.iocurrently using my custom_componenthttps://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_smartIt is build to have limited interaction with the API of gardena. Fetching information is done via 2 calls.get all locationsget devices per locationObjects fetch data from the internal state, update of internal state has to be explicitly triggered.usagehub=GardenaSmartAccount("username","password")forlocationinhub.get_locations():formowerinlocation.get_mowers():print(mower.get_info())forsensorinlocation.get_sensors():print(sensor.get_info())forwatering_computerinlocation.get_watering_computers():print(watering_computer.get_info())Object informationAll 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].()GardenaSmartAccountAvailable methods:account.get_locations()# returns list of GardenaSmartLocation objects, if there is no internal state it will call the Gardena APIaccount.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.GardenaSmartLocationAvailable 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 devicesHave 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.GardenaSmartMowerAvailable methods:mower.start()#starts mowing for a full day (can be specified)mower.park_until_timer()#stop mowing and  wait for next schedulemower.park()#stop mower, don't continue scheduleAvailable info: manual_operation, status, error, battery_charging, last_error_code, source_for_next_start,
timestamp_next_start, cutting_time, charging_cycles, collisions, running_timeGardenaSmartSensorAvailable methods: none
Available info: ambient_temperature, ambient_frost_warning, soil_temperature, soil_humidity, lightGardenaSmartWateringComputerAvailable methods:watering_computer.start()#starts watering for a 30 (can be specified)watering_computer.stop()#stop watering and  wait for next scheduleAvailable 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_decisiontested 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 yetSince I do not own the devices, but feel free to sponsor me ;-)smart irrigation control (on top of my wishlist)Smart pressure pumpsmart power adaptersmart batteryChangelog###0.9.3Initial version###0.9.4 - brokenChange license to Apache 2.0RestAPI class that encapsulates API accessRemoved object_path dependency that occured just onceupdate metadata###0.9.5Reverted: Removed object_path dependency that occured just once###0.9.6Changed API endpoint (old one was broken)