Gardena smart system + Home assistant?

Hi, I installed https://github.com/py-smart-gardena/hass-gardena-smart-system to my hassio.

I want to use the gardena irrigation control and my question maybe sounds crazy, but do I have to buy the gardena gateway? I thought this integration to hassio doesn’t make it necessary to buy the gateway or am I wrong?

1 Like

Yes your are wrong. How should the devices connect to Gardena? You need a gateway as it needs to pair all the devices and pushes all the data to the cloud.

New user of hass.io here…

I have not been able to install the gardena integration. I tried either via HACS or manually but afterwards I cannot see it in config -> integration in hass directly. It only shows up under hacs.

What am I missing?

Edit: sorry for being impatient. One day later and it successfully showed up under integrations…

I noticed the same when installing, and found that if you refresh (F5) the integrations page it shows up immediately.

Hello,

Since the HA 0.115 update, some entities no longer work

2020-09-19 19:39:09 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform gardena_smart_system.vacuum: Platform not found (cannot import name ‘UNIT_PERCENTAGE’ from ‘homeassistant.const’ (/usr/src/homeassistant/homeassistant/const.py)).
2020-09-19 19:39:09 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform gardena_smart_system.sensor: Platform not found (cannot import name ‘UNIT_PERCENTAGE’ from ‘homeassistant.const’ (/usr/src/homeassistant/homeassistant/const.py)).
2020-09-19 19:39:09 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform gardena_smart_system.switch: Platform not found (cannot import name ‘UNIT_PERCENTAGE’ from ‘homeassistant.const’ (/usr/src/homeassistant/homeassistant/const.py)).
2020-09-19 19:39:10 INFO (Thread-21) [gardena.smart_system] Connected to Gardena API

Need help !

Until https://github.com/py-smart-gardena/hass-gardena-smart-system/pull/44 is merged and released, you can work around this issue by replacing occurrences of UNIT_PERCENTAGE by PERCENTAGE in the custom_components/gardena_smart_system/sensor.py file:

sed -i s/UNIT_PERCENTAGE/PERCENTAGE/g custom_components/gardena_smart_system/sensor.py
1 Like

Thank you it works perfectly

i recently got the gardena smart system and noticed it has native support for homekit. has anybody tried to use the gerdena smart system through the homekit controller integration? i guess the only advantage is one can use it “offline” (without internet connection)…

With the HomeKit Controller integration, all you get is the Smart Gateway as a device in Home Assistant.
So to actually be able to do something or view the sensors, you need this custom integration:


(At least that is the case for my Gardena Sileno mower)

thanks for the info. apparently homekit does not support mower devices, only vacuums. nice one apple, homekit is useless in this regard…

Hi there,

I also try to get this integration up and running.
It is successfully installed via HACS but as I try to add it from Config > Integrations > (+)
and enter my credentials I see following error in the logs.

Logger: custom_components.gardena_smart_system.config_flow
Source: custom_components/gardena_smart_system/config_flow.py:133
Integration: Gardena Smart System integration (documentation, issues)
First occurred: 0:15:46 (5 occurrences)
Last logged: 0:28:24

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/gardena_smart_system/config_flow.py", line 66, in async_step_user
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/gardena_smart_system/config_flow.py", line 133, in try_connection
    smart_system.update_locations()
  File "/usr/local/lib/python3.8/site-packages/gardena/smart_system.py", line 209, in update_locations
    response_data = self.__call_smart_system_get(f"{self.SMART_HOST}/v1/locations")
  File "/usr/local/lib/python3.8/site-packages/gardena/smart_system.py", line 180, in __call_smart_system_get
    if self.__response_has_errors(response):
  File "/usr/local/lib/python3.8/site-packages/gardena/smart_system.py", line 173, in __response_has_errors
    raise Exception(msg)
Exception: Forbidden (hint: did you 'Connect an API' in your Application?)

The credentials-modal just reappears without inputs.
I rechecked my email and passwort. I also have created a new application key on https://developer.husqvarnagroup.cloud/

Any ideas?

Just upgraded Home Assistant OS to version 4.15 and immediately afterwards I started seeing this error.
Anyone else experience the same? In that case I can open an issue in github.

Logger: homeassistant.config_entries
Source: custom_components/gardena_smart_system/__init__.py:88
First occurred: 16:33:01 (1 occurrences)
Last logged: 16:33:01

Error setting up entry for gardena_smart_system
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 231, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/gardena_smart_system/__init__.py", line 51, in async_setup_entry
    await hass.async_add_executor_job(gardena_system.start)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/gardena_smart_system/__init__.py", line 88, in start
    self.smart_system.update_locations()
  File "/usr/local/lib/python3.8/site-packages/gardena/smart_system.py", line 209, in update_locations
    response_data = self.__call_smart_system_get(f"{self.SMART_HOST}/v1/locations")
  File "/usr/local/lib/python3.8/site-packages/gardena/smart_system.py", line 180, in __call_smart_system_get
    if self.__response_has_errors(response):
  File "/usr/local/lib/python3.8/site-packages/gardena/smart_system.py", line 159, in __response_has_errors
    r = response.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I experienced the same issue today. No upgrades done, I was on latest Home Assistant Docker version on Debian amd64.
Problem was related to GET https://api.smart.gardena.dev/v1/locations not returning any locations. Authentication and getting an access token worked fine however.
I have recreated the application @ https://developer.husqvarnagroup.cloud and tested with Fiddler if I could get the locations. Suddenly all started working again.
In Home Assistant, I removed the integration, restart, added the integration and all is working fine again.
I’m not sure if recreating the application solved it or there was a general issue with the API which has been fixed now…

It’s working for me as well, and I did not make any changes. So i suspect there was a general issue with the API as you mentioned.

Do I need the “Gardena smart Gateway” to be able to integrate the smart watering to HomeAssistant or can HA connect directly to Gardena’s smart Water Control (19031-28)?

I want to setup Gardena’s mechanical Water Distributor Automatic (1197-20), the one that supports up to 6 areas. It’s compatible with the less expensive Water Control Master (1892-28), but if smart Water Control (19031-28) can connect directly to HomeAssistant without any additional device needed in-between, I would be tempted to go for that one instead to be able to control and setup schedules in HomeAssistant.

1 Like

You need the Smart Gateway for that.

Am I being really daft here - have the smart gateway and the water controller and trying to set this up, but can’t find my homekit code anywhere? The only serial on the bottom of the smart gateway is much too long.

Is there any other way to find the usual 8 digit homekit code? Otherwise I don’t seem to be able to set this component up!

Thanks in advance!

Hi,
was able to setup the integration via HACS and my Gardena devices (irrigation control, sensor, pressure pump) appear in HA. Only have one issue with the pressure pump: it only as one entity (battery level, and obviously it does not have a battery), but I cannot see any other information (water flow, total consumption, currently running) and am not able to switch it on/off (respectively switch between automatic and time based mode). Is there any way to change that? thanks!

Which integration ?

I am using this one: GitHub - py-smart-gardena/hass-gardena-smart-system: Home Assistant custom component integration for Gardena Smart System

1 Like