Giter Club home page Giter Club logo

Comments (26)

pdecat avatar pdecat commented on June 30, 2024 6

The issue was resolved, affected users need to click the Renew API key on the Home Assistant Gardena app.

curl -X GET "https://api.smart.gardena.dev/v1/locations" -H  "accept: application/vnd.api+json" -H "Authorization-Provider: husqvarna" -H "X-Api-Key: $GARDENA_CLIENT_ID" -H "Authoriz
ation: Bearer $GARDENA_AUTHORIZATION_BEARER"
{"data":[{"id":"86277b80-****-****-****-**********","type":"LOCATION","attributes":{"name":"My Garden"}}]}

The Gardena integration has to be removed then re-added to update the Client ID:

image

See openhab/openhab-addons#7169 (comment)

from hass-gardena-smart-system.

Djebouh avatar Djebouh commented on June 30, 2024 4

Same issue.
I contacted GARDENA Developer Portal who's confirmed today an issue:

Hello

Thank you for using our Integration API. We are currently having technical difficulties with our Smart Garden API. Our team is actively working on fixing this issue. We hope to have this resolved very soon and I will contact you again when it is.

Thank you for your patience.

Best,
XXX
Software Engineer

Gardena DIGITALhub
Räffelstrasse 26
8045 Zürich

from hass-gardena-smart-system.

grm avatar grm commented on June 30, 2024 2

Great news,

I am currently speaking with gardena devs so we can be part of a program about issues. I am not sure what they will be able to provide us to be able to react more quickly !

Btw, thanks a lot @pdecat for the rapid follow up

from hass-gardena-smart-system.

awirtz avatar awirtz commented on June 30, 2024 2

Same here, module working fine, thanks for the support!

EDIT:
One comment on the HomeKit approach from ApplesandPears: I tried this, got it working in no time, but it lacks some of the sensors like battery and soil temperature, at least I wasn't able to immediately find them. Also the namings of the devices are not transported, so I will prefer this module here over HomeKit.

from hass-gardena-smart-system.

pdecat avatar pdecat commented on June 30, 2024 1

Same issue here, apparently new API keys do not work immediately, see openhab/openhab-addons#7169 (comment)

Failing using curl or the online API tools too:

curl -i -X GET "https://api.smart.gardena.dev/v1/locations" -H  "accept: application/vnd.api+json" -H  "X-Api-Key: f993435b-****-****-****-********" -H  "Authorization: Bearer eyJh****G3Ug" -H  "Authorization-Provider: husqvarna"
HTTP/2 403
content-type: application/json
content-length: 23
date: Mon, 01 Jun 2020 15:21:50 GMT
x-amzn-requestid: e54b0b96-****-****-****-********"
x-amzn-errortype: ForbiddenException
x-amz-apigw-id: Nd******=
x-cache: Error from cloudfront
via: 1.1 a93cc4cff5c450718aa682ae0fc55be3.cloudfront.net (CloudFront)
x-amz-cf-pop: CDG50-C1
x-amz-cf-id: Uz******==

from hass-gardena-smart-system.

awirtz avatar awirtz commented on June 30, 2024 1

Hi,

just would like to confirm the issue. I have a Gardena Smart account, just today created everything in the developer webplatform at Husqvarna and am now not able to connect the HA integration with my credentials - 403 just like above.

from hass-gardena-smart-system.

sabbatho avatar sabbatho commented on June 30, 2024 1

Hi,
I have the same errors as described above with 403 error in logs, and the no location found.
Installed through HACS.
Just wanted to make a comment that i have the same problem.
Have had my Gardena account for a few weeks, but configured the key a couple of hours ago in Husqvarna developer and connected the two apis as described in the installation notes. Tried to redo the integration in Home assistant but have the same errors still.
I'm on version 110.4. And i have restarted Home Assistant after integration added.
Did not attach any logs since its the same as above, hope thats ok.

from hass-gardena-smart-system.

ApplesandPears avatar ApplesandPears commented on June 30, 2024 1

Guys, for everyone who wants to integrate Gardena Smart System into Home Assistant. There is an alternative way of doing this.

Go to "Configuration / Einstellungen" then to "Integrations / Integrationen", click the "+" in the bottom right corner, Search for "HomeKit Controller", Click on it and then choose from the drop down menu the Gardena Smart System. Enter the HomeKit code, printed on the back of the Gardena Smart Gateway - et voilà the Gardena Bridge including all Switches and Sensors is now available in Home Assistant.

From there, if you're an iOS User, you can expose those devices to the HA HomeBridge.

image

from hass-gardena-smart-system.

dueltschi avatar dueltschi commented on June 30, 2024 1

it works perfectly. thanks a lot!

from hass-gardena-smart-system.

sabbatho avatar sabbatho commented on June 30, 2024 1

Confirmed, works fine now according to @pdecat's post

from hass-gardena-smart-system.

osks avatar osks commented on June 30, 2024

Do you have the Gardena app and have added/included device, and are using the same username/password as there?

from hass-gardena-smart-system.

trtmr avatar trtmr commented on June 30, 2024

When testing in terminal, I get the following reply:

{"error":"invalid_grant","error_description":"The provided access grant is invalid, expired, or revoked."}DEVICENAME-13:~ benutzer$
(I have not replaced after copying text into terminal, don't know if that's correct or not)

@osks Yes, I can log in to the Gardena App, also logged in to Husqvarna website using same email/pw
I have several devices connected to the Gardena Bridge. One Sensor, three water controls and a mower

from hass-gardena-smart-system.

trtmr avatar trtmr commented on June 30, 2024

If there is anything else I can provide, which helps navigate to the problem, please let me know ;)

from hass-gardena-smart-system.

grm avatar grm commented on June 30, 2024

Did you create an application there : https://developer.husqvarnagroup.cloud/apps?
Does your application id matches the application key from https://developer.husqvarnagroup.cloud/apps ?

from hass-gardena-smart-system.

osks avatar osks commented on June 30, 2024

And did you connect the APIs?

from hass-gardena-smart-system.

newlund avatar newlund commented on June 30, 2024

I'm running the latest version (commit ebb01e5)
Get this when trying to add the integration in HA:

Traceback (most recent call last):
File "/config/custom_components/gardena_smart_system/config_flow.py", line 70, in async_step_user
user_input[CONF_CLIENT_ID])
File "/usr/local/lib/python3.7/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.7/site-packages/gardena/smart_system.py", line 168, in update_locations
response_data = self.__call_smart_system_get(f"{self.SMART_HOST}/v1/locations")
File "/usr/local/lib/python3.7/site-packages/gardena/smart_system.py", line 163, in __call_smart_system_get
if self.__response_has_errors(response):
File "/usr/local/lib/python3.7/site-packages/gardena/smart_system.py", line 156, in __response_has_errors
raise Exception(msg)
Exception: Forbidden (hint: did you 'Connect an API' in your Application?)

I have connected the APIs in "My application"
image

from hass-gardena-smart-system.

osks avatar osks commented on June 30, 2024

Thank you for that information! Very helpful!

The API documentation for https://api.smart.gardena.dev/v1/locations does not mention the 403 status code, so it's probably not something that has occurred in testing.

from hass-gardena-smart-system.

ApplesandPears avatar ApplesandPears commented on June 30, 2024

Did you create an application there : https://developer.husqvarnagroup.cloud/apps?
Does your application id matches the application key from https://developer.husqvarnagroup.cloud/apps ?

Using another user account. Working together with @trtmr .

Husqvarna app created, application key is correct!

from hass-gardena-smart-system.

grm avatar grm commented on June 30, 2024

Ok, not sure about the reason.

My key was created a long time ago. Can you keep us informed tomorrow if it now works for you ? (we'll update the readme accordingly if that is the case)

from hass-gardena-smart-system.

ApplesandPears avatar ApplesandPears commented on June 30, 2024

@grm @osks have you anything configured in the API on the Husqvarna website?

I am open for a zoom session if we want to do hands on... if this helps...

Cheers,

from hass-gardena-smart-system.

grm avatar grm commented on June 30, 2024

Maybe one of you would you agree to send me your creds and API key by mail (from my profile) so i can debug more deeply ?
(you can change them before and will be able to change them afterwards)

Grm

from hass-gardena-smart-system.

awirtz avatar awirtz commented on June 30, 2024

FYI, I've tried the "Sample Websocket Client" at https://developer.husqvarnagroup.cloud/apis/GARDENA+smart+system+API#/readme, I can obtain an access token, but the subsequent call to obtain the location also fails with a status code 200 and HTTP Error 403.

The access token I'm getting is rather lengthy and not in the format as seen in the authentication API documentation (i.e. access_token: '1ff71952-53e8-4d19-a837-b4a5f09829be'), might this be the reason?

EDIT:
I've checked if I receive the same error on adding the Smart System API to my application and indeed I'm getting a status 500, same as in the openHAB thread. I will file an inquiry with Husqvarna and see what comes out of this.

from hass-gardena-smart-system.

pdecat avatar pdecat commented on June 30, 2024

From https://developer.husqvarnagroup.cloud/:

We are currently experiencing technical difficulties with the Smart Garden API. Our team is actively working to fix the issue. We hope to have this resolved soon. Thank you for your patience.

from hass-gardena-smart-system.

newlund avatar newlund commented on June 30, 2024

Working for me as well. Thanks! :)

from hass-gardena-smart-system.

lukasvermeer avatar lukasvermeer commented on June 30, 2024

+1 Works.

from hass-gardena-smart-system.

grm avatar grm commented on June 30, 2024

Thx for the update and the homekit intégration !
It is a pleasure to have positive feedback like this.

I will now close this ticket as the original issue has been solved.
If you want to have a discussion over homekit vs hass-gardena-smart-system, I let you open another ticket ;)

from hass-gardena-smart-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.