@maralex: I know…time is often very tight but maybe my thread helps.
I opened a feature request for Gardena / Husqvarna integration. It is already integrated in OpenHab. I have the Java source code and a german description of what has to be respected.
I’m working on a proper home assistant component for the gardena smart ecosystem.
My goal is to make it a default home-assistant component but time is limited so I like to share my progress with you.
Currently I have all the code in a custom_component (which later should become a pypi library), it currently only supports the lawn mower, and registers it as a vacum cleaner.
I’m running Hass.io 0.77.1 in a docker container on Ubuntu.
I copied the contents of your git repo to /config/custom_components, but when restarting home assistant I get an error message saying:
Fri Aug 31 2018 12:39:17 GMT+0200 (centraleuropeisk sommartid)
Error loading custom_components.gardena. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 94, in get_component
module = importlib.import_module(path)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/gardena.py", line 16, in <module>
from custom_components.pygardena.account import *
File "/config/custom_components/pygardena/account.py", line 2, in <module>
from custom_components.pygardena.location import *
File "/config/custom_components/pygardena/location.py", line 2, in <module>
from custom_components.pygardena.mower import *
File "/config/custom_components/pygardena/mower.py", line 1, in <module>
from custom_components.pygardena.device import *
File "/config/custom_components/pygardena/device.py", line 2, in <module>
import objectpath
ModuleNotFoundError: No module named 'objectpath'
Are there any special dependencies and how do I install them?
Good one, I installed this dependency myself during development.
Just updated the code and added them to the requirements of the module, which should result in an auto install of this module (haven’t tested it yet, still want to check the custom_component with a clean install)
Just give the latest version a try! Let me know if it did work and with which device / mower you tried.
B.t.w. did quite some updates last few days, as a result: more reliable updates and support for the Watering computer.
I spun up a new test VM, installed hass.io and your custom component, but I had to do pip3.6 install objectpath to get it to work.
I have a smart sileno+ 1600 and I’m able to control it via HA now.
Thanks a lot for the project! We just got a smart sileno and we still have do the actual physical install, but at least the smart gateway seems to have connected.
Tested on my Sileno Smart City 500, and it seems to work fine Really hoping youre planning to take this to an official component and continue development on it!
hi, is that your problem? you have to rename your files and folder:
rename / move…
binary_sensor/gardena.py to gardena/binary_sensor.py
sensor/gardena.py to gardena/sensor.py
switch/gardena.py to gardena/switch.py
vacuum/gardena.py to gardena/vacuum.py
gardena.py to gardena/init.py
is gardena already working after firmware update with HomeKit integration?
in my case its not
could you check that please?
Error during setup of component gardena
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File "/usr/local/lib/python3.5/asyncio/futures.py", line 381, in iter
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
future.result()
File "/usr/local/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/hass/.homeassistant/custom_components/gardena/init.py", line 39, in setup
hass.data[GARDENA_LOGIN] = GardenaHub(hass, config[DOMAIN], GardenaSmartAccount)
File "/home/hass/.homeassistant/custom_components/gardena/init.py", line 59, in init
self.my_gardena = gardena(domain_config[CONF_USERNAME], domain_config[CONF_PASSWORD])
File "/home/hass/.homeassistant/deps/lib/python3.5/site-packages/wt/pygardena/account.py", line 14, in init
self.update_authtokens()
File "/home/hass/.homeassistant/deps/lib/python3.5/site-packages/wt/pygardena/account.py", line 42, in update_authtokens
self.AuthToken = response_data['sessions']['token']
KeyError: 'sessions'