iobroker-community-adapters / ioBroker.pvforecast

Forecast for your photovoltaic plant in ioBroker
Other
24 stars 13 forks source link

AxiosError: Request failed with status code 400 #81

Closed RALFISBORN closed 1 year ago

RALFISBORN commented 1 year ago

The problem

Hallo, es kommt in regelmäßigen Abständen vor, dass folgende Fehlermeldung in den Logs auftritt: Axios Error AxiosError: Request failed with status code 400 Und dann nur noch 0 als Wert in den den Objekten drin steht. Die Instanz bleibt dabei grün und es hilft nur ein Neustart des Adapters. Dann kommen sofort wieder aktuelle Werte. Der Zeitpunkt der Fehlermeldung lässt sich an kein erkennbares Ereignis knüpfen. VG

Version of nodejs

v14.17.6

Version of ioBroker js-controller

4.0.24

Version of Adapter

2.3.0

Operating system running ioBroker

Docker Synology

Checklist of files to include below

Additional information & file uploads

log.log

klein0r commented 1 year ago

Normalerweise sollte service.data nicht gefüllt werden wenn es ein Fehler gab und dann trotzdem die states korrekt (mit den alten Daten) gefüllt werden. Da kein Debug-Log angehängt wurde kann ich das hier nicht nachvollziehen und mache zu. Gerne nachreichen.

RALFISBORN commented 1 year ago

iobroker-log.log

Heute wieder aufgetreten. Anbei die .log Datei.

klein0r commented 1 year ago

Das Log hilft leider nicht (bitte Loglevel Debug einstellen)

jonnycastaway commented 1 year ago

Same Problem here but with Adapter Version 2.7.1. AxiosError: Request failed with status code 400 and no data.

`

pvforecast.0 | 2023-07-03 15:15:00.104 | debug | global time: {"pv":[]} -- | -- | -- | -- pvforecast.0 | 2023-07-03 15:15:00.038 | debug | finished plants update pvforecast.0 | 2023-07-03 15:15:00.007 | debug | [updateActualDataInterval] starting update (today: 3, tomorrow: 4) pvforecast.0 | 2023-07-03 15:10:49.284 | debug | [updateActualDataCron] next execution: 2023-07-03T15:15:00.000+02:00 pvforecast.0 | 2023-07-03 15:10:49.275 | info | Starting internal update cron (every 15 Minutes) for timezone: Europe/Berlin pvforecast.0 | 2023-07-03 15:10:49.207 | debug | global time: {"pv":[]} pvforecast.0 | 2023-07-03 15:10:49.140 | debug | finished plants update pvforecast.0 | 2023-07-03 15:10:49.139 | debug | [updateActualDataInterval] starting update (today: 3, tomorrow: 4) pvforecast.0 | 2023-07-03 15:10:49.137 | debug | received all data pvforecast.0 | 2023-07-03 15:10:49.137 | error | Axios Error AxiosError: Request failed with status code 400 pvforecast.0 | 2023-07-03 15:10:49.027 | debug | Starting update of PV pvforecast.0 | 2023-07-03 15:10:49.027 | debug | plant "PV" - last update: 0, service url: https://api.forecast.solar/estimate/50.5000/8.3000/10/0/1.8?time=utc pvforecast.0 | 2023-07-03 15:10:48.976 | debug | init done pvforecast.0 | 2023-07-03 15:10:48.485 | debug | creating states for plant: "PV" (pv) pvforecast.0 | 2023-07-03 15:10:48.468 | debug | The interval is set to 60 minutes pvforecast.0 | 2023-07-03 15:10:48.468 | debug | Existing plant devices: [{"type":"device","common":{"name":"PV"},"native":{},"from":"system.adapter.pvforecast.0","user":"system.user.admin","ts":1688389220810,"_id":"pvforecast.0.plants.pv"}] - configured: ["pvforecast.0.plants.pv"] pvforecast.0 | 2023-07-03 15:10:48.452 | info | using system latitude: 50.5000 longitude: 8.3000 pvforecast.0 | 2023-07-03 15:10:48.440 | debug | [onReady] longitude and/or latitude not set, loading system configuration pvforecast.0 | 2023-07-03 15:10:48.440 | debug | instance config: {"service":"forecastsolar","interval":60,"apiKey":"","weatherEnabled":false,"latitude":"","longitude":"","everyhourEnabled":true,"everyhourStepsize":"full","watt_kw":true,"influxinstace":"","chartingEnabled":false,"chartingSummary":false,"chartingJustToday":true,"chartingLabelFormat":"DD.MM. HH:mm","chartingLabelSize":12,"chartingRoation":270,"chartingAxisStepY":1,"devices":[{"name":"PV","azimuth":0,"tilt":10,"peakpower":1.8,"graphcolor":"#000000","labelcolor":"#000000"}]} pvforecast.0 | 2023-07-03 15:10:48.428 | info | starting. Version 2.7.1 in /opt/iobroker/node_modules/iobroker.pvforecast, node: v16.18.0, js-controller: 4.0.24 pvforecast.0 | 2023-07-03 15:10:48.288 | debug | Plugin sentry Initialize Plugin (enabled=true) pvforecast.0 | 2023-07-03 15:10:48.227 | debug | States connected to redis: 127.0.0.1:9000 pvforecast.0 | 2023-07-03 15:10:48.165 | debug | States create User PubSub Client pvforecast.0 | 2023-07-03 15:10:48.165 | debug | States create System PubSub Client pvforecast.0 | 2023-07-03 15:10:48.154 | debug | Redis States: Use Redis connection: 127.0.0.1:9000 pvforecast.0 | 2023-07-03 15:10:48.138 | debug | Objects connected to redis: 127.0.0.1:9001 pvforecast.0 | 2023-07-03 15:10:48.135 | debug | Objects client initialize lua scripts pvforecast.0 | 2023-07-03 15:10:48.103 | debug | Objects create User PubSub Client pvforecast.0 | 2023-07-03 15:10:48.103 | debug | Objects create System PubSub Client pvforecast.0 | 2023-07-03 15:10:48.102 | debug | Objects client ready ... initialize now pvforecast.0 | 2023-07-03 15:10:48.082 | debug | Redis Objects: Use Redis connection: 127.0.0.1:9001

`

klein0r commented 1 year ago

AxiosError: Request failed with status code 400 and no data.

Momentan bekomme ich für alle Anfragen Status 400 zurück. Egal ob mit key oder ohne. Da hat der Dienst wohl ein Problem.

jonnycastaway commented 1 year ago

AxiosError: Request failed with status code 400 and no data.

Momentan bekomme ich für alle Anfragen Status 400 zurück. Egal ob mit key oder ohne. Da hat der Dienst wohl ein Problem.

Danke für die Info. Heute Morgen funktioniert es. Ich bekomme nun Daten. Dafür bekomme ich den gleichen Fehler beim lg-thing Adapter. Aber das ist ja ein anderer Dienst der wohl das selbe API-SDK benutzt...