jpgorganizer / ioBroker.smartgarden

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

Sporadisch Error 429 #52

Closed LastPerfectTobi closed 2 years ago

LastPerfectTobi commented 2 years ago

Der Smartgarden Adapter erzeugt bei mir immer sporadisch folgende Errors, funktioniert aber sonst ohne Problem und wird auch alleine wieder grün.

2022-07-25 15:06:37.842 - error: smartgarden.0 (5125) Error: request returned 429
2022-07-25 15:11:38.227 - error: smartgarden.0 (5125) Error: request returned 429
2022-07-25 15:16:38.636 - error: smartgarden.0 (5125) Error: request returned 429
2022-07-25 19:21:41.050 - error: smartgarden.0 (5125) Error: request returned 429
2022-07-25 19:26:41.479 - error: smartgarden.0 (5125) Error: request returned 429
2022-07-25 22:25:00.246 - error: smartgarden.0 (5125) Error: request returned 429

Adapter: 2.0.0 NPM: 8.11.0 Node.JS: 16.15.1

reutli commented 2 years ago

Das habe ich auch, die WebSocket Verbindung ist hinreichend instabil. Die Frage ist, ob das am Adapter oder an der API von Gardena liegt.

x2on commented 2 years ago

Bei mir das gleiche. Dachte es liegt am API Key, aber nach ein paar Tagen ging es bei mir erstmal wieder. Vielleicht das Rate Limit?

reutli commented 2 years ago

Ich habe gerade massiv Probleme Ventile über die API zu steuern. Ein bis zwei Ventile gehen noch, dann kommen 429er und bad request... wollte eigentlich auf die Steuerung mit iobroker umsteigen und alles da erledigen, ... aber so ist das nicht stabil nutzbar. Fraglich ob's auf Gardena Seite liegt (API) oder die etwas geändert haben in Sachen WebSocket und limits.

sparrow1990 commented 2 years ago

Version: 2.0.0 Node.js 16.16.0 NPM 8.11.0 JS Cont: 4.0.23

Bekomme auch 429. Log wie folgt:

smartgarden.0 2022-07-28 09:47:44.255 error Error: request returned 429
smartgarden.0 2022-07-28 09:47:44.255 info 3/ Mower command failure.response.statusCode/Message=429/
smartgarden.0 2022-07-28 09:47:44.255 info 3/ Mower command failure, options.url=https://api.smart.gardena.dev/v1/command/29cdb6c5-25b4-491a-9b8a-1739ac8b558f:cbtg
smartgarden.0 2022-07-28 09:47:44.254 info 3/ request Mower ...
smartgarden.0 2022-07-28 09:47:44.215 error Error: request returned 429
smartgarden.0 2022-07-28 09:47:44.215 info 3/ Mower command failure.response.statusCode/Message=429/
smartgarden.0 2022-07-28 09:47:44.215 info 3/ Mower command failure, options.url=https://api.smart.gardena.dev/v1/command/29cdb6c5-25b4-491a-9b8a-1739ac8b558f:cbtg
smartgarden.0 2022-07-28 09:47:44.214 info 3/ request Mower ...
smartgarden.0 2022-07-28 09:47:44.169 info 3/ ---> State change by device: state sg.0.info.RateLimitCounter changed, (ack = true)
smartgarden.0 2022-07-28 09:47:44.156 info 3/ incrementLimitCounter: new counters : y2022 / m2022-07: 170 / d2022-07-28: 65 / hr07: 17 / last30days: 170 / last31days: 170
smartgarden.0 2022-07-28 09:47:44.113 info 3/ ---> Command should be sent to device: state sg.0.L_0478.D_558f.S_MOWER_cbtg.activity_control_i changed, PARK_UNTIL_FURTHER_NOTICE (ack = false)
smartgarden.0 2022-07-28 09:47:44.108 info 3/ ---> State change by device: state sg.0.info.RateLimitCounter changed, (ack = true)
javascript.0 2022-07-28 09:47:44.053 info script.js.common.Garten.Robert: Robert 20
XerXes777 commented 2 years ago

Ich bekomme auch ständig den fehler 429

Ich habe NODEJS v12.20.0 ist das ein Problem?

XerXes777 commented 2 years ago

Rate Limits

Rate limits are in place to prevent malicious use of the API that would impact other users.

Applications share a pool of keys that each are assigned certain quota. An application that behaves as a good citizen of the Gardena eco system should not exceed the following limits:

On average one call every fifteen minutes.
3'000 requests per month.

These limits should not pose a problem if you use REST calls only to update the state of your location once and then use the real time API to stay in sync (see sections below for more information). If you feel your application absolutely cannot adhere to these limits and your use case is interesting for Gardena, please get in touch to see whether we can grant you higher rate limits.

jpgorganizer commented 2 years ago

this is no bug of the adapter, it's related to the Gardena Cloud Server API

reutli commented 2 years ago

But could be handled via error handling and trying to repeat commands...?! If a device is responding with error 429 it should be possible to try re-sending, let's say three times and throw error after this try-loop. just saying ;o)