iobroker-community-adapters / ioBroker.pvforecast

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

SolarPredictionAPI not working #73

Closed klein0r closed 12 months ago

klein0r commented 1 year ago

The problem

Response:

{"messages":"The API is unreachable, please contact the API provider", "info": "Your Client (working) ---> Gateway (working) ---> API (not working)"}

Version of nodejs

16.18.1

Version of ioBroker js-controller

4.0.23

Version of Adapter

2.4.0

Operating system running ioBroker

Linux Debian Bullseye

Checklist of files to include below

Additional information & file uploads

2022-12-09 11:00:24.747  - debug: pvforecast.0 (3835) longitude and/or latitude not set, loading system configuration
2022-12-09 11:00:24.776  - info: pvforecast.0 (3835) using system latitude: 52.5 longitude: 13.28
2022-12-09 11:00:24.786  - debug: pvforecast.0 (3835) Existing plant devices: [{"type":"device","common":{"name":"PV"},"native":{},"from":"system.adapter.pvforecast.0","user":"system.user.admin","ts":1670579987085,"_id":"pvforecast.0.plants.pv"}] - configured: ["pvforecast.0.plants.pv"]
2022-12-09 11:00:24.788  - warn: pvforecast.0 (3835) The interval is set to less than 60 minutes. Please set a higher value in the adapter configuration!
2022-12-09 11:00:24.805  - debug: pvforecast.0 (3835) creating states for plant: "PV" (pv)
2022-12-09 11:00:25.125  - debug: pvforecast.0 (3835) init done
2022-12-09 11:00:25.134  - debug: pvforecast.0 (3835) plant "PV" - last update: 0, service url: https://solarenergyprediction.p.rapidapi.com/v2.0/solar/prediction?decoration=forecast.solar&lat=52.5&lon=13.28&deg=45&az=0&wp=9900
2022-12-09 11:00:25.135  - debug: pvforecast.0 (3835) Starting update of PV
2022-12-09 11:00:25.785  - error: pvforecast.0 (3835) Axios Error AxiosError: Request failed with status code 403
klein0r commented 1 year ago

@zoernert

zoernert commented 1 year ago

@klein0r : Please check again. As your error message indicates, it might be due to a cluster switch a temporary issue.

n3roGit commented 1 year ago

i have the same problem: ` 17:00:00":3297},"watt_hours_day":{"2023-02-14":4794,"2023-02-15":4488,"2023-02-16":1358,"2023-02-17":299,"2023-02-18":3297}} pvforecast.2 | 2023-02-14 09:07:04.184 | debug | (COMPACT) [updateActualDataInterval] starting update (today: 14, tomorrow: 15) pvforecast.2 | 2023-02-14 09:07:04.182 | debug | (COMPACT) received all data pvforecast.2 | 2023-02-14 09:07:04.181 | debug | (COMPACT) Last update of "PV" is within refresh interval - skipping pvforecast.2 | 2023-02-14 09:07:04.180 | debug | (COMPACT) plant "PV" - last update: 1676361115382, service url: https://solarenergyprediction.p.rapidapi.com/v2.0/solar/prediction?decoration=forecast.solar&lat=53.xxx&lon=8.xxx&deg=45&az=67&wp=2000 pvforecast.2 | 2023-02-14 09:07:04.175 | debug | (COMPACT) init done pvforecast.2 | 2023-02-14 09:07:02.787 | debug | (COMPACT) creating states for plant: "PV" (pv) pvforecast.2 | 2023-02-14 09:07:02.744 | debug | (COMPACT) The interval is set to 60 minutes pvforecast.2 | 2023-02-14 09:07:02.742 | debug | (COMPACT) Existing plant devices: [{"type":"device","common":{"name":"PV"},"native":{},"from":"system.adapter.pvforecast.2","user":"system.user.admin","ts":1676361963462,"_id":"pvforecast.2.plants.pv","acl":{"object":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}}] - configured: ["pvforecast.2.plants.pv"] pvforecast.2 | 2023-02-14 09:07:02.682 | info | (COMPACT) InfluxDB logging is enabled - forecast summary will be available @ "pvforecast.2.summary.power" pvforecast.2 | 2023-02-14 09:07:02.681 | info | (COMPACT) InfluxDB logging is enabled - forecast for plant "PV" will be available @ "pvforecast.2.plants.pv.power" pvforecast.2 | 2023-02-14 09:07:02.676 | debug | (COMPACT) instance config: {"service":"spa","interval":60,"apiKey":"xxx","weatherEnabled":false,"latitude":"53.0854377746582","longitude":"xxx","everyhourEnabled":true,"everyhourStepsize":"full","watt_kw":true,"influxinstace":"influxdb.0","chartingEnabled":false,"chartingJustToday":true,"chartingLabelFormat":"DD.MM. HH:mm","chartingLabelSize":12,"chartingRoation":270,"chartingAxisStepY":1,"devices":[{"name":"PV","azimuth":67,"tilt":45,"peakpower":2,"graphcolor":"#000000","labelcolor":"#000000"}]} pvforecast.2 | 2023-02-14 09:07:02.673 | info | (COMPACT) starting. Version 2.5.1 (non-npm: iobroker-community-adapters/ioBroker.pvforecast) in /opt/iobroker/node_modules/iobroker.pvforecast, node: v16.19.0, js-controller: 4.0.24 pvforecast.2 | 2023-02-14 09:06:58.335 | info | (COMPACT) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason pvforecast.2 | 2023-02-14 09:06:58.332 | debug | (COMPACT) Plugin sentry destroyed pvforecast.2 | 2023-02-14 09:06:58.330 | info | (COMPACT) terminating pvforecast.2 | 2023-02-14 09:06:58.329 | debug | (COMPACT) stopped updateActualDataInterval pvforecast.2 | 2023-02-14 09:06:58.328 | info | (COMPACT) Got terminate signal TERMINATE_YOURSELF

`

abeggled commented 1 year ago

In the meantime values from api are no more 0 but the adapter does not interpret the data: Adapter Version: v2.5.1

`

pvforecast.2 | 2023-03-02 11:00:00.032 | debug | finished plants update -- | -- | -- | -- pvforecast.2 | 2023-03-02 11:00:00.032 | debug | unable to update "PV A38 Sued": TypeError: Cannot convert undefined or null to object pvforecast.2 | 2023-03-02 11:00:00.031 | debug | [updateActualDataInterval] current service data for plants.pvA38Sued.service.data ("PV A38 Sued"): {"watts":{"2023-03-02 07:00:00":299,"2023-03-02 08:00:00":648,"2023-03-02 09:00:00":3810,"2023-03-02 10:00:00":5118,"2023-03-02 11:00:00":5752,"2023-03-02 12:00:00":6081,"2023-03-02 13:00:00":6051,"2023-03-02 14:00:00":5123,"2023-03-02 15:00:00":3802,"2023-03-02 16:00:00":2206,"2023-03-02 17:00:00":643,"2023-03-02 18:00:00":2,"2023-03-03 07:00:00":324,"2023-03-03 08:00:00":1927,"2023-03-03 09:00:00":3824,"2023-03-03 10:00:00":5400,"2023-03-03 11:00:00":5448,"2023-03-03 12:00:00":4478,"2023-03-03 13:00:00":2865,"2023-03-03 14:00:00":1920,"2023-03-03 15:00:00":1561,"2023-03-03 16:00:00":967,"2023-03-03 17:00:00":332,"2023-03-03 18:00:00":2,"2023-03-04 07:00:00":322,"2023-03-04 08:00:00":1887,"2023-03-04 09:00:00":3795,"2023-03-04 10:00:00":5116,"2023-03-04 11:00:00":4455,"2023-03-04 12:00:00":4159,"2023-03-04 13:00:00":4119,"2023-03-04 14:00:00":3216,"2023-03-04 15:00:00":2850,"2023-03-04 16:00:00":1917,"2023-03-04 17:00:00":646,"2023-03-04 18:00:00":2,"2023-03-05 07:00:00":347,"2023-03-05 08:00:00":2234,"2023-03-05 09:00:00":4146,"2023-03-05 10:00:00":5734,"2023-03-05 11:00:00":6719,"2023-03-05 12:00:00":7315,"2023-03-05 13:00:00":7016,"2023-03-05 14:00:00":6078,"2023-03-05 15:00:00":4769,"2023-03-05 16:00:00":2875,"2023-03-05 17:00:00":965,"2023-03-05 18:00:00":5,"2023-03-06 07:00:00":332,"2023-03-06 08:00:00":1892,"2023-03-06 09:00:00":2867,"2023-03-06 10:00:00":4159,"2023-03-06 11:00:00":5757,"2023-03-06 12:00:00":6375,"2023-03-06 13:00:00":5744,"2023-03-06 14:00:00":3839,"2023-03-06 15:00:00":2872,"2023-03-06 16:00:00":2236,"2023-03-06 17:00:00":663,"2023-03-06 18:00:00":5},"watt_hours":{"2023-03-02 07:00:00":299,"2023-03-02 08:00:00":947,"2023-03-02 09:00:00":4757,"2023-03-02 10:00:00":9875,"2023-03-02 11:00:00":15627,"2023-03-02 12:00:00":21708,"2023-03-02 13:00:00":27759,"2023-03-02 14:00:00":32882,"2023-03-02 15:00:00":36684,"2023-03-02 16:00:00":38890,"2023-03-02 17:00:00":39533,"2023-03-02 18:00:00":39535,"2023-03-03 07:00:00":324,"2023-03-03 08:00:00":2251,"2023-03-03 09:00:00":6075,"2023-03-03 10:00:00":11475,"2023-03-03 11:00:00":16923,"2023-03-03 12:00:00":21401,"2023-03-03 13:00:00":24266,"2023-03-03 14:00:00":26186,"2023-03-03 15:00:00":27747,"2023-03-03 16:00:00":28714,"2023-03-03 17:00:00":29046,"2023-03-03 18:00:00":29048,"2023-03-04 07:00:00":322,"2023-03-04 08:00:00":2209,"2023-03-04 09:00:00":6004,"2023-03-04 10:00:00":11120,"2023-03-04 11:00:00":15575,"2023-03-04 12:00:00":19734,"2023-03-04 13:00:00":23853,"2023-03-04 14:00:00":27069,"2023-03-04 15:00:00":29919,"2023-03-04 16:00:00":31836,"2023-03-04 17:00:00":32482,"2023-03-04 18:00:00":32484,"2023-03-05 07:00:00":347,"2023-03-05 08:00:00":2581,"2023-03-05 09:00:00":6727,"2023-03-05 10:00:00":12461,"2023-03-05 11:00:00":19180,"2023-03-05 12:00:00":26495,"2023-03-05 13:00:00":33511,"2023-03-05 14:00:00":39589,"2023-03-05 15:00:00":44358,"2023-03-05 16:00:00":47233,"2023-03-05 17:00:00":48198,"2023-03-05 18:00:00":48203,"2023-03-06 07:00:00":332,"2023-03-06 08:00:00":2224,"2023-03-06 09:00:00":5091,"2023-03-06 10:00:00":9250,"2023-03-06 11:00:00":15007,"2023-03-06 12:00:00":21382,"2023-03-06 13:00:00":27126,"2023-03-06 14:00:00":30965,"2023-03-06 15:00:00":33837,"2023-03-06 16:00:00":36073,"2023-03-06 17:00:00":36736,"2023-03-06 18:00:00":36741},"watt_hours_day":{"2023-03-02":39535,"2023-03-03":29048,"2023-03-04":32484,"2023-03-05":48203,"2023-03-06":36741}} pvforecast.2 | 2023-03-02 11:00:00.022 | debug | [updateActualDataInterval] starting update (today: 2, tomorrow: 3)

`