jpgorganizer / ioBroker.smartgarden

GARDENA smart system adapter for ioBroker
Other
21 stars 8 forks source link

Mower command failure.response.statusCode/Message=400/Bad Request #66

Closed pellenbeck closed 1 year ago

pellenbeck commented 1 year ago

Hello,

I am using v2.0.0 since some weeks now. Last weekend the service stops working for me (error 403). So I renewed the API credentials (new application). Now the service is working again. I raised the configured intervals to avoid rate limits (a trigger for error 403).

But before I changed the loglevel of smartgarden adapter and now I can finde this error:

smartgarden.0 | 2023-06-19 11:50:59.493 | error | Error: request returned 400 Bad Request
smartgarden.0 | 2023-06-19 11:50:59.493 | info | 3/ Mower command failure.response.statusCode/Message=400/Bad Request
smartgarden.0 | 2023-06-19 11:50:59.493 | info | 3/ Mower command failure, options.url=https://api.smart.gardena.dev/v1/command/5751a42a-XXXXXXXXXXXXXXXXX-fe5730010bf5:cbtl
smartgarden.0 | 2023-06-19 11:50:59.492 | info | 3/ request Mower ...

Belongs it to the (new) version 1.1 of Gardena Smart System API? https://developer.husqvarnagroup.cloud/apis/gardena-smart-system-api#release-notes

Regards Philipp

jpgorganizer commented 1 year ago

this seems to be a common problem with the Gardena web services. No problem with the adapter.

pellenbeck commented 1 year ago

@jpgorganizer I would like to re open the issue.

I have contacted the Husqvarna Developer Portal with the problem. After exchanging the information about the RateLimitCounter and some log files, I received the following answer from Husqvarna:

Wir können den Fehler reproduzieren, indem Sie «activity_control_i» nur START_SECONDS_TO_OVERRIDE schicken. Sobald Sie diesen Parameter mit einer Zahl konfigurieren (oder Zahl unmittelbar vom command gefolgt), tritt der Fehler nicht mehr auf. Damit können Sie diesen Umstand (der offenbar «nur» diesen Command betrifft) überbrücken, bis ioBroker ggf. zu einem späteren Zeitpunkt das Verhalten für diesen Command korrigiert.

The answer looks to me like a wrong implementation in the adapter or something that can be adjusted in the adapter. Is there a manual workaround via the adapter?

The problem is that the error "Error: request returned 400 Bad Request" leads to a constant repetition of the requests and thus the RateLimit is exceeded very quickly - which then ends in the error image "Error: request returned 403 Forbidden".

Regards Philipp