Library to connect to Garena Smart
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.
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())
All object (except GardenaSmartAccount) have attributes which can be retrieved by either:
Which retuns a named list, or:
#[attribute] needs to be replaced by the detail name. object.get_[attribute].()
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.
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.
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.
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
Available methods: none Available info: ambient_temperature, ambient_frost_warning, soil_temperature, soil_humidity, light
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
- 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
###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
- Reverted: Removed object_path dependency that occured just once
- Changed API endpoint (old one was broken)
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size wt.pygardena-0.9.6-py3-none-any.whl (13.6 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size wt.pygardena-0.9.6.tar.gz (8.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for wt.pygardena-0.9.6-py3-none-any.whl