Comments (17)
Yes, it seem very long foir the integration to connect :)
Could you put the plugin in debug mode and share the home assistant logs please ?
from hass-gardena-smart-system.
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: gardena.smart_system
Source: custom_components/gardena_smart_system/init.py:86
Integration: Gardena Smart System integration (documentation, issues)
First occurred: 20:57:31 (9 occurrences)
Last logged: 20:59:42
404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
from hass-gardena-smart-system.
Hum, have you activated the authentication api in the husqvarna website ?
Did you set the level of the logs to debug for the plugin ? (think about hiding/masking your client id client secret if there are in the logs).
from hass-gardena-smart-system.
Not sure what especially you mean:
After creating the application, I added "Gardena smart system API" as well so I see this:
Also not used to work with HA logs yet; all I could get out is the following:
2024-01-04 20:57:31.009 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:31.010 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 0.1s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:57:31.232 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:31.233 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 1.1s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:57:32.417 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:32.418 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 0.6s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:57:33.161 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:33.162 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 4.4s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:57:37.679 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:37.680 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 14.7s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:57:52.569 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:52.570 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 3.8s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:57:56.526 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:57:56.527 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 25.7s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:58:22.518 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:58:22.519 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 79.5s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 20:59:42.215 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 20:59:42.216 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 200.5s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 21:03:02.912 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 21:03:02.913 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 186.0s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 21:06:09.215 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']} 2024-01-04 21:06:09.216 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 895.9s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' 2024-01-04 21:07:02.661 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for gardena_smart_system File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 141, in __call_smart_system_get File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 131, in __response_has_errors httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations' File "/config/custom_components/gardena_smart_system/__init__.py", line 49, in async_setup_entry await gardena_system.start() File "/config/custom_components/gardena_smart_system/__init__.py", line 86, in start File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 146, in update_locations
Oh, this time I'm getting at least some feedback:
from hass-gardena-smart-system.
I have the same problem, I deactivated the integration for now (as there's not much gardening going on currently). The Husqvarna Website is not too snappy either, but I can login there and the example 'curl' commands for my application get me an authorization token.
But when I try the OpenAPI SwaggerUI at https://developer.husqvarnagroup.cloud/apis/gardena-smart-system-api?tab=openapi, I also get errors - usually "TypeError: Load failed":
Using curl from my machine, this one yields something:
$ curl -X 'GET' \ 'https://api.smart.gardena.dev/v1/health' \ -H 'accept: */*'
Yes I am alive%
So it seems as if Husqvarna/Gardena did something with their API, although I don't know what. Somehow my authentication doesn't seem to work, as I can use the "authorize" button on the SwaggerUI, but there I won't get any valid response (again: "TypeError: Load failed"). But using curl (redacted API key here, but I used mine from the Website) I get:
curl -X 'GET' \ 'https://api.smart.gardena.dev/v1/locations' \ -H 'accept: application/vnd.api+json' \ -H 'X-Api-Key: 12345678-0000-0000-0000-701ee3456666'
{"message":"Unauthorized"}%
from hass-gardena-smart-system.
hum, that is a strange behaviour.
I am not sure the health
endpoint requires a token.
Have you tried to renew your token ?
from hass-gardena-smart-system.
__call_smart_system_get
After creating the application, I added "Gardena smart system API" as well so I see this:
Yes, I was talking of these 2 APIs
from hass-gardena-smart-system.
hum, that is a strange behaviour.
I am not sure the
health
endpoint requires a token. Have you tried to renew your token ?
What I wanted to say is, that the API call via curl does work (without authentication when checking the 'health' endpoint), but their website - or the SwaggerUI frontend on the site - does not work. I can generate new authentication Tokens via curl, but they can't be used within the SwaggerUI, always resulting in the error message "TypeError: LoadFailed". Even when I authorize with both API key (see below) and a fresh token.
I generated a new client secret and tried again, which did get me a fresh token. My main problem was choosing the right UUID for the API key. In the documentation they call it , but it is not the "client secret", it's the "client id" from the developer portal. When I tried to use that, it did indeed work - but I don't have any locations set up yet:
curl -X 'GET' \ 'https://api.smart.gardena.dev/v1/locations' \ -H 'accept: application/vnd.api+json' \ -H 'X-Api-Key: <redacted, the client_id>' \ -H 'Authorization: Bearer eyJhbGci...5362KPPn'
{"errors":[{"id":"<another UUID>","status":"Not Found","title":"List Locations","detail":"No locations found for user: <redacted>"}]}%
So maybe the lag in the HomeAssistant integration might come from that.
from hass-gardena-smart-system.
i have the same issue here. try to connect to api does not work
Source: config_entries.py:406
First occurred: 09:37:23 (2 occurrences)
Last logged: 09:43:24
Error setting up entry for gardena_smart_system
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 141, in __call_smart_system_get
if self.__response_has_errors(response):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 131, in __response_has_errors
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 759, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/gardena_smart_system/__init__.py", line 49, in async_setup_entry
await gardena_system.start()
File "/config/custom_components/gardena_smart_system/__init__.py", line 86, in start
await self.smart_system.update_locations()
File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 146, in update_locations
response_data = await self.__call_smart_system_get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 183, in retry
await asyncio.sleep(seconds)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 649, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledError: Global task timeout
from hass-gardena-smart-system.
Same here. No luck installing the api, takes forever until it falls.
from hass-gardena-smart-system.
I have this Problem too. I installed the api again, deleted the authentication and tied to register ha again.
The connection originally worked, then I had to change the gateway because the mower had a defect and was replaced. I deleted the old gateway and could not connect the new gateway. I get the same error after endless authentication.
from hass-gardena-smart-system.
Could you give it another try woth latest version please ? (1.1.0-rc3)
from hass-gardena-smart-system.
I just released version 1.1.0.
Can you try with this version please ?
from hass-gardena-smart-system.
i had no luck. you can find the log attached. @grm : thank you for your support!
2024-02-11 19:54:13.609 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for gardena_smart_system
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 141, in __call_smart_system_get
if self.__response_has_errors(response):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 131, in __response_has_errors
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 759, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/gardena_smart_system/__init__.py", line 49, in async_setup_entry
await gardena_system.start()
File "/config/custom_components/gardena_smart_system/__init__.py", line 86, in start
await self.smart_system.update_locations()
File "/usr/local/lib/python3.11/site-packages/gardena/smart_system.py", line 146, in update_locations
response_data = await self.__call_smart_system_get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 183, in retry
await asyncio.sleep(seconds)
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 649, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledError
2024-02-11 19:54:28.339 DEBUG (MainThread) [custom_components.gardena_smart_system] Setting up Gardena Smart System component
2024-02-11 19:54:28.339 DEBUG (MainThread) [custom_components.gardena_smart_system] Starting GardenaSmartSystem
2024-02-11 19:54:28.899 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
2024-02-11 19:54:28.899 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 0.1s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)
2024-02-11 19:54:29.143 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
2024-02-11 19:54:29.143 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 1.4s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)
2024-02-11 19:54:30.773 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
2024-02-11 19:54:30.773 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 3.3s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)
2024-02-11 19:54:34.207 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: gardena_smart_system
2024-02-11 19:54:34.294 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
2024-02-11 19:54:34.294 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 7.6s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)
2024-02-11 19:54:42.026 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
2024-02-11 19:54:42.026 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 5.0s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)
2024-02-11 19:54:47.275 ERROR (MainThread) [gardena.smart_system] 404 : {r['errors'][0]['title']} - {r['errors'][0]['detail']}
2024-02-11 19:54:47.276 INFO (MainThread) [gardena.smart_system] Backing off __call_smart_system_get(...) for 16.9s (httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.smart.gardena.dev/v1/locations'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)
from hass-gardena-smart-system.
For me as well, results are the same errors as posted above. My logs looks the same.
from hass-gardena-smart-system.
Got it working… email adresses for Gardena Gateway and husqvarna API Must be the same, otherwise you get in the endless authentification loop
from hass-gardena-smart-system.
same issue here, email is the same for app and API
from hass-gardena-smart-system.
Related Issues (20)
- Values which will be removed in HA Core 2025.1 HOT 2
- Gardena integration not available/loaded HOT 22
- The method for providing platform translations has changed in Home Assistant Core HOT 2
- Invalid flow specified HOT 5
- Gardena - Needs attention HOT 13
- Supported Feature will be removed in 2025.1 HOT 7
- Need possibility to start stop mower with or not schedule HOT 1
- Initialization failed
- Added and installed integration, but no setup or Gardena available HOT 2
- How to install v. 1.10 or beta? HOT 3
- Not refreshing values on humidity sensor HOT 10
- Please update version number.
- Error starting integration HOT 1
- Randomly stops updating? HOT 9
- Gardena sensor wrong device class humidity instead of moisture
- ReadTimeout Error while running automation HOT 18
- Integration still maintained? HOT 9
- Detected that custom integration 'gardena_smart_system' calls async_forward_entry_setup HOT 2
- Integration stopped working HOT 1
- Error by Setup Client id
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hass-gardena-smart-system.