Neue 59_Weather, OpenWeatherMapAPI - Tester gesucht

Begonnen von CoolTux, 21 Dezember 2022, 08:39:12

Vorheriges Thema - Nächstes Thema

softwear

#30
Internals:
   .FhemMetaInternals 1
   API        OpenWeatherMapAPI
   APIKEY     ...
   APIOPTIONS cachemaxage:600
   CFGFN     
   DEF        API=OpenWeatherMapAPI,cachemaxage:600 apikey=... interval=3600 lang=de
   FUUID      63a6edb1-f33f-527b-34e2-70d293ea817408f2
   INTERVAL   3600
   LANG       de
   MODEL      OpenWeatherMapAPI
   NAME       HeWeather
   NOTIFYDEV  global
   NR         333
   NTFY_ORDER 50-HeWeather
   STATE      T: 9 °C F: 91 % W: 13 km/h P: 1014 hPa
   TYPE       Weather
   VERSION    v2.2.10
   eventCount 7
   .attraggr:
   .attrminint:
   READINGS:
     2022-12-24 13:36:00   .license        none
     2022-12-24 13:36:00   apiMaintainer   Marko Oldenburg (<a href=https://forum.fhem.de/index.php?action=profile;u=13684>CoolTux</a>)
     2022-12-24 13:36:00   apiVersion      v3.0.10
     2022-12-24 13:36:00   city           
     2022-12-24 13:36:00   cloudCover      75
     2022-12-24 13:36:00   code            26
     2022-12-24 13:36:00   condition       Überwiegend bewölkt
     2022-12-24 13:36:00   current_date_time Sa, 24 Dez 2022 13:36
     2022-12-24 13:36:00   dewpoint        7.6
     2022-12-24 13:36:00   hfc1_cloudCover 83
     2022-12-24 13:36:00   hfc1_code       26
     2022-12-24 13:36:00   hfc1_condition  Überwiegend bewölkt
     2022-12-24 13:36:00   hfc1_day_of_week Sa, 16:00
     2022-12-24 13:36:00   hfc1_high_c     -264
     2022-12-24 13:36:00   hfc1_humidity   89
     2022-12-24 13:36:00   hfc1_icon       cloudy
     2022-12-24 13:36:00   hfc1_iconAPI    04d
     2022-12-24 13:36:00   hfc1_low_c      8
     2022-12-24 13:36:00   hfc1_pressure   1014
     2022-12-24 13:36:00   hfc1_pubDate    Sa, 24 Dez 2022 16:00
     2022-12-24 13:36:00   hfc1_tempHigh   -264
     2022-12-24 13:36:00   hfc1_tempLow    -265
     2022-12-24 13:36:00   hfc1_temp_c     9
     2022-12-24 13:36:00   hfc1_temperature 9
     2022-12-24 13:36:00   hfc1_wind       16
     2022-12-24 13:36:00   hfc1_wind_gust  32
     2022-12-24 13:36:00   hfc1_wind_speed 16
     2022-12-24 13:36:00   hfc2_cloudCover 92
     2022-12-24 13:36:00   hfc2_code       28
     2022-12-24 13:36:00   hfc2_condition  Bedeckt
     2022-12-24 13:36:00   hfc2_day_of_week Sa, 19:00
     2022-12-24 13:36:00   hfc2_high_c     -265
     2022-12-24 13:36:00   hfc2_humidity   85
     2022-12-24 13:36:00   hfc2_icon       mostlycloudy
     2022-12-24 13:36:00   hfc2_iconAPI    04n
     2022-12-24 13:36:00   hfc2_low_c      8
     2022-12-24 13:36:00   hfc2_pressure   1015
     2022-12-24 13:36:00   hfc2_pubDate    Sa, 24 Dez 2022 19:00
     2022-12-24 13:36:00   hfc2_tempHigh   -265
     2022-12-24 13:36:00   hfc2_tempLow    -265
     2022-12-24 13:36:00   hfc2_temp_c     8
     2022-12-24 13:36:00   hfc2_temperature 8
     2022-12-24 13:36:00   hfc2_wind       14
     2022-12-24 13:36:00   hfc2_wind_gust  29
     2022-12-24 13:36:00   hfc2_wind_speed 14
     2022-12-24 13:36:00   hfc3_cloudCover 100
     2022-12-24 13:36:00   hfc3_code       28
     2022-12-24 13:36:00   hfc3_condition  Bedeckt
     2022-12-24 13:36:00   hfc3_day_of_week Sa, 22:00
     2022-12-24 13:36:00   hfc3_high_c     -266
     2022-12-24 13:36:00   hfc3_humidity   89
     2022-12-24 13:36:00   hfc3_icon       mostlycloudy
     2022-12-24 13:36:00   hfc3_iconAPI    04n
     2022-12-24 13:36:00   hfc3_low_c      7
     2022-12-24 13:36:00   hfc3_pressure   1017
     2022-12-24 13:36:00   hfc3_pubDate    Sa, 24 Dez 2022 22:00
     2022-12-24 13:36:00   hfc3_tempHigh   -266
     2022-12-24 13:36:00   hfc3_tempLow    -266
     2022-12-24 13:36:00   hfc3_temp_c     7
     2022-12-24 13:36:00   hfc3_temperature 7
     2022-12-24 13:36:00   hfc3_wind       14
     2022-12-24 13:36:00   hfc3_wind_gust  34
     2022-12-24 13:36:00   hfc3_wind_speed 14
     2022-12-24 13:36:00   hfc4_cloudCover 100
     2022-12-24 13:36:00   hfc4_code       28
     2022-12-24 13:36:00   hfc4_condition  Bedeckt
     2022-12-24 13:36:00   hfc4_day_of_week So, 01:00
     2022-12-24 13:36:00   hfc4_high_c     -266
     2022-12-24 13:36:00   hfc4_humidity   93
     2022-12-24 13:36:00   hfc4_icon       mostlycloudy
     2022-12-24 13:36:00   hfc4_iconAPI    04n
     2022-12-24 13:36:00   hfc4_low_c      7
     2022-12-24 13:36:00   hfc4_pressure   1016
     2022-12-24 13:36:00   hfc4_pubDate    So, 25 Dez 2022 01:00
     2022-12-24 13:36:00   hfc4_tempHigh   -266
     2022-12-24 13:36:00   hfc4_tempLow    -266
     2022-12-24 13:36:00   hfc4_temp_c     7
     2022-12-24 13:36:00   hfc4_temperature 7
     2022-12-24 13:36:00   hfc4_wind       17
     2022-12-24 13:36:00   hfc4_wind_gust  41
     2022-12-24 13:36:00   hfc4_wind_speed 17
     2022-12-24 13:36:00   hfc5_cloudCover 85
     2022-12-24 13:36:00   hfc5_code       28
     2022-12-24 13:36:00   hfc5_condition  Bedeckt
     2022-12-24 13:36:00   hfc5_day_of_week So, 04:00
     2022-12-24 13:36:00   hfc5_high_c     -267
     2022-12-24 13:36:00   hfc5_humidity   96
     2022-12-24 13:36:00   hfc5_icon       mostlycloudy
     2022-12-24 13:36:00   hfc5_iconAPI    04n
     2022-12-24 13:36:00   hfc5_low_c      6
     2022-12-24 13:36:00   hfc5_pressure   1015
     2022-12-24 13:36:00   hfc5_pubDate    So, 25 Dez 2022 04:00
     2022-12-24 13:36:00   hfc5_tempHigh   -267
     2022-12-24 13:36:00   hfc5_tempLow    -267
     2022-12-24 13:36:00   hfc5_temp_c     6
     2022-12-24 13:36:00   hfc5_temperature 6
     2022-12-24 13:36:00   hfc5_wind       18
     2022-12-24 13:36:00   hfc5_wind_gust  46
     2022-12-24 13:36:00   hfc5_wind_speed 18
     2022-12-24 13:36:00   hfc6_cloudCover 92
     2022-12-24 13:36:00   hfc6_code       28
     2022-12-24 13:36:00   hfc6_condition  Bedeckt
     2022-12-24 13:36:00   hfc6_day_of_week So, 07:00
     2022-12-24 13:36:00   hfc6_high_c     -266
     2022-12-24 13:36:00   hfc6_humidity   97
     2022-12-24 13:36:00   hfc6_icon       mostlycloudy
     2022-12-24 13:36:00   hfc6_iconAPI    04n
     2022-12-24 13:36:00   hfc6_low_c      7
     2022-12-24 13:36:00   hfc6_pressure   1013
     2022-12-24 13:36:00   hfc6_pubDate    So, 25 Dez 2022 07:00
     2022-12-24 13:36:00   hfc6_tempHigh   -266
     2022-12-24 13:36:00   hfc6_tempLow    -266
     2022-12-24 13:36:00   hfc6_temp_c     7
     2022-12-24 13:36:00   hfc6_temperature 7
     2022-12-24 13:36:00   hfc6_wind       13
     2022-12-24 13:36:00   hfc6_wind_gust  42
     2022-12-24 13:36:00   hfc6_wind_speed 13
     2022-12-24 13:36:00   high_c          11
     2022-12-24 13:36:00   humidity        91
     2022-12-24 13:36:00   icon            cloudy
     2022-12-24 13:36:00   iconAPI         04d
     2022-12-24 13:36:00   lastError       
     2022-12-24 13:36:00   lat             50.489
     2022-12-24 13:36:00   long            6.448
     2022-12-24 13:36:00   low_c           9
     2022-12-24 13:36:00   pressure        1014
     2022-12-24 13:36:00   pubDate         Sa, 24 Dez 2022 13:35
     2022-12-24 13:36:00   state           T: 9 °C F: 91 % W: 13 km/h P: 1014 hPa
     2022-12-24 13:36:00   status          ok
     2022-12-24 13:36:00   sunriseTime     Sa, 24 Dez 2022 08:33
     2022-12-24 13:36:00   sunsetTime      Sa, 24 Dez 2022 16:33
     2022-12-24 13:36:00   tempFeelsLike_c 7
     2022-12-24 13:36:00   tempHigh        11
     2022-12-24 13:36:00   tempLow         9
     2022-12-24 13:36:00   temp_c          9
     2022-12-24 13:36:00   temperature     9
     2022-12-24 13:36:00   validity        up-to-date
     2022-12-24 13:36:00   visibility      10000
     2022-12-24 13:36:00   wind            13
     2022-12-24 13:36:00   wind_condition  Wind: WSW 13 km/h
     2022-12-24 13:36:00   wind_direction  250
     2022-12-24 13:36:00   wind_gust       0
     2022-12-24 13:36:00   wind_speed      13
   fhem:
     LOCATION   50.489,6.448
     allowCache 1
     interfaces temperature;humidity;wind
Attributes:
   forecast   hourly
   forecastLimit 6
   room       Programme


Ahh, jetzt sind die Vorhersagen drin  :). Ich hatte vorher daily als forecast gesetzt. Wind ist auch drin, Regen nicht. Temperatur stimmt auch nicht mit -265 (meint tempHigh und tempLow).

CoolTux

regen kommt nur wenn es auch regnet.
Wenn Wind da ist dann verstehe ich nicht woher die Fehlermeldung kommt mit

2022.12.24 13:17:37 1: PERL WARNING: Use of uninitialized value in multiplication (*) at lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm line 572.

Das kann nur current Weather sein und irgendwas mit Wind, denn nur da wird multipliziert.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

softwear

#32
Sehe ich auch so. Als Hinweis vielleicht: wind_gust ist 0, wind_speed und wind immer gleich. Bei den stündlichen Vorhersagen ist wind_gust grundsätzlich größer als die beiden anderen wind-Werte. Auch die Tiefst- und Höchsttemperatur stimmt zum aktuellen Zeitpunkt, nicht aber in den Vorhersageintervallen.

Frau scharrt mit den Hufen, ich muss los, die Kinder warten^^. Bis später!

softwear

#33
Die beiden Warnings tauchen nicht erneut auf, wenn z.B. die Readings updated werden. Jetzt nur noch einmal beim fhem-Neustart.

Ich würde tippen, dass $data->{wind}->{gust} in Zeile 589 nicht definiert ist beim ersten Aufruf nach Systemstart bzw. der ersten Definition eines OpenWeather Geräts.

CoolTux

Zitat von: softwear am 24 Dezember 2022, 21:23:57
Die beiden Warnings tauchen nicht erneut auf, wenn z.B. die Readings updated werden. Jetzt nur noch einmal beim fhem-Neustart.

Ich würde tippen, dass $data->{wind}->{gust} in Zeile 589 nicht definiert ist beim ersten Aufruf nach Systemstart bzw. der ersten Definition eines OpenWeather Geräts.

Ne das ist es nicht. Du kannst aber bitte einmal alles mit Dumper und print in OpenWeatherMapAPI auskommentieren und dann neustarten. Dann siehst Du den Response als JSON und das dann hier bitte als quote einfügen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

softwear

#35
Zitat!!! DEBUG !!! - Endpoint: weather
Can't call method "Dumper" on unblessed reference at lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm line 458.
Damit hängt dann auch wieder fhem.

Ich mache Feierabend für heute.

CoolTux

Also das verstehe ich beim besten willen nicht. Scheint ja gerade so als wenn das ganze keine Daten bekommt.

Du hast aber schon ganz oben auch use Data::Dumper; auskommentiert?

Ansonsten bin ich etwas überfragt.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

Kannst Du mir mal bitte Deinen API Key zum testen zur Verfügung stellen? Einfach per PM
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

softwear

#38
Debug-Dump zu groß für den code-Tag. Habe ich als Datei angehängt. Wenn Du trotzdem noch den api-key brauchst, schreib mir bitte eine kurze PM, dann schicke ich ihn Dir.
Ich hatte gestern vergessen, die use-Direktive auszukommentieren. What a shame! Sry, dass Du schwer irritiert warst!

List <device> noch dazu, da ich beim forecast bei den Tests inzwischen einmal hourly,daily getestet habe.

Internals:
   .FhemMetaInternals 1
   API        OpenWeatherMapAPI
   APIKEY     ...
   APIOPTIONS cachemaxage:600
   DEF        API=OpenWeatherMapAPI,cachemaxage:600 apikey=... interval=3600 lang=de
   FUUID      63a6edb1-f33f-527b-34e2-70d293ea817408f2
   INTERVAL   3600
   LANG       de
   MODEL      OpenWeatherMapAPI
   NAME       HeWeather
   NOTIFYDEV  global
   NR         310
   NTFY_ORDER 50-HeWeather
   STATE      T: 8 °C F: 98 % W: 9 km/h P: 1012 hPa
   TYPE       Weather
   VERSION    v2.2.10
   eventCount 1
   .attraggr:
   .attrminint:
   READINGS:
     2022-12-25 08:20:27   .license        none
     2022-12-25 08:20:27   apiMaintainer   Marko Oldenburg (<a href=https://forum.fhem.de/index.php?action=profile;u=13684>CoolTux</a>)
     2022-12-25 08:20:27   apiVersion      v3.0.10
     2022-12-25 08:20:27   city           
     2022-12-25 08:20:27   cloudCover      100
     2022-12-25 08:20:27   code            9
     2022-12-25 08:20:27   condition       Leichtes Nieseln
     2022-12-25 08:20:27   current_date_time So, 25 Dez 2022 08:20
     2022-12-25 08:20:27   dewpoint        7.7
     2022-12-25 08:20:27   hfc1_cloudCover 100
     2022-12-25 08:20:27   hfc1_code       35
     2022-12-25 08:20:27   hfc1_condition  Leichter Regen
     2022-12-25 08:20:27   hfc1_day_of_week So, 10:00
     2022-12-25 08:20:27   hfc1_high_c     -265
     2022-12-25 08:20:27   hfc1_humidity   97
     2022-12-25 08:20:27   hfc1_icon       heavyrain
     2022-12-25 08:20:27   hfc1_iconAPI    10d
     2022-12-25 08:20:27   hfc1_low_c      8
     2022-12-25 08:20:27   hfc1_pressure   1013
     2022-12-25 08:20:27   hfc1_pubDate    So, 25 Dez 2022 10:00
     2022-12-25 08:20:27   hfc1_rain3h     0.53
     2022-12-25 08:20:27   hfc1_tempHigh   -265
     2022-12-25 08:20:27   hfc1_tempLow    -265
     2022-12-25 08:20:27   hfc1_temp_c     8
     2022-12-25 08:20:27   hfc1_temperature 8
     2022-12-25 08:20:27   hfc1_wind       14
     2022-12-25 08:20:27   hfc1_wind_gust  41
     2022-12-25 08:20:27   hfc1_wind_speed 14
     2022-12-25 08:20:27   hfc2_cloudCover 98
     2022-12-25 08:20:27   hfc2_code       35
     2022-12-25 08:20:27   hfc2_condition  Leichter Regen
     2022-12-25 08:20:27   hfc2_day_of_week So, 13:00
     2022-12-25 08:20:27   hfc2_high_c     -263
     2022-12-25 08:20:27   hfc2_humidity   89
     2022-12-25 08:20:27   hfc2_icon       heavyrain
     2022-12-25 08:20:27   hfc2_iconAPI    10d
     2022-12-25 08:20:27   hfc2_low_c      9
     2022-12-25 08:20:27   hfc2_pressure   1011
     2022-12-25 08:20:27   hfc2_pubDate    So, 25 Dez 2022 13:00
     2022-12-25 08:20:27   hfc2_rain3h     0.77
     2022-12-25 08:20:27   hfc2_tempHigh   -263
     2022-12-25 08:20:27   hfc2_tempLow    -264
     2022-12-25 08:20:27   hfc2_temp_c     9
     2022-12-25 08:20:27   hfc2_temperature 9
     2022-12-25 08:20:27   hfc2_wind       27
     2022-12-25 08:20:27   hfc2_wind_gust  62
     2022-12-25 08:20:27   hfc2_wind_speed 27
     2022-12-25 08:20:27   hfc3_cloudCover 65
     2022-12-25 08:20:27   hfc3_code       26
     2022-12-25 08:20:27   hfc3_condition  Überwiegend bewölkt
     2022-12-25 08:20:27   hfc3_day_of_week So, 16:00
     2022-12-25 08:20:27   hfc3_high_c     -263
     2022-12-25 08:20:27   hfc3_humidity   80
     2022-12-25 08:20:27   hfc3_icon       cloudy
     2022-12-25 08:20:27   hfc3_iconAPI    04d
     2022-12-25 08:20:27   hfc3_low_c      10
     2022-12-25 08:20:27   hfc3_pressure   1010
     2022-12-25 08:20:27   hfc3_pubDate    So, 25 Dez 2022 16:00
     2022-12-24 21:21:12   hfc3_rain3h     0.29
     2022-12-25 08:20:27   hfc3_tempHigh   -263
     2022-12-25 08:20:27   hfc3_tempLow    -263
     2022-12-25 08:20:27   hfc3_temp_c     10
     2022-12-25 08:20:27   hfc3_temperature 10
     2022-12-25 08:20:27   hfc3_wind       29
     2022-12-25 08:20:27   hfc3_wind_gust  66
     2022-12-25 08:20:27   hfc3_wind_speed 29
     2022-12-25 08:20:27   hfc4_cloudCover 78
     2022-12-25 08:20:27   hfc4_code       26
     2022-12-25 08:20:27   hfc4_condition  Überwiegend bewölkt
     2022-12-25 08:20:27   hfc4_day_of_week So, 19:00
     2022-12-25 08:20:27   hfc4_high_c     -264
     2022-12-25 08:20:27   hfc4_humidity   88
     2022-12-25 08:20:27   hfc4_icon       cloudy
     2022-12-25 08:20:27   hfc4_iconAPI    04n
     2022-12-25 08:20:27   hfc4_low_c      9
     2022-12-25 08:20:27   hfc4_pressure   1011
     2022-12-25 08:20:27   hfc4_pubDate    So, 25 Dez 2022 19:00
     2022-12-25 00:48:35   hfc4_rain3h     0.28
     2022-12-25 08:20:27   hfc4_tempHigh   -264
     2022-12-25 08:20:27   hfc4_tempLow    -264
     2022-12-25 08:20:27   hfc4_temp_c     9
     2022-12-25 08:20:27   hfc4_temperature 9
     2022-12-25 08:20:27   hfc4_wind       31
     2022-12-25 08:20:27   hfc4_wind_gust  58
     2022-12-25 08:20:27   hfc4_wind_speed 31
     2022-12-25 08:20:27   hfc5_cloudCover 96
     2022-12-25 08:20:27   hfc5_code       28
     2022-12-25 08:20:27   hfc5_condition  Bedeckt
     2022-12-25 08:20:27   hfc5_day_of_week So, 22:00
     2022-12-25 08:20:27   hfc5_high_c     -264
     2022-12-25 08:20:27   hfc5_humidity   89
     2022-12-25 08:20:27   hfc5_icon       mostlycloudy
     2022-12-25 08:20:27   hfc5_iconAPI    04n
     2022-12-25 08:20:27   hfc5_low_c      9
     2022-12-25 08:20:27   hfc5_pressure   1013
     2022-12-25 08:20:27   hfc5_pubDate    So, 25 Dez 2022 22:00
     2022-12-24 21:21:12   hfc5_rain3h     0.28
     2022-12-25 08:20:27   hfc5_tempHigh   -264
     2022-12-25 08:20:27   hfc5_tempLow    -264
     2022-12-25 08:20:27   hfc5_temp_c     9
     2022-12-25 08:20:27   hfc5_temperature 9
     2022-12-25 08:20:27   hfc5_wind       30
     2022-12-25 08:20:27   hfc5_wind_gust  58
     2022-12-25 08:20:27   hfc5_wind_speed 30
     2022-12-25 08:20:27   hfc6_cloudCover 98
     2022-12-25 08:20:27   hfc6_code       28
     2022-12-25 08:20:27   hfc6_condition  Bedeckt
     2022-12-25 08:20:27   hfc6_day_of_week Mo, 01:00
     2022-12-25 08:20:27   hfc6_high_c     -265
     2022-12-25 08:20:27   hfc6_humidity   88
     2022-12-25 08:20:27   hfc6_icon       mostlycloudy
     2022-12-25 08:20:27   hfc6_iconAPI    04n
     2022-12-25 08:20:27   hfc6_low_c      8
     2022-12-25 08:20:27   hfc6_pressure   1015
     2022-12-25 08:20:27   hfc6_pubDate    Mo, 26 Dez 2022 01:00
     2022-12-25 06:48:43   hfc6_rain3h     0.19
     2022-12-25 08:20:27   hfc6_tempHigh   -265
     2022-12-25 08:20:27   hfc6_tempLow    -265
     2022-12-25 08:20:27   hfc6_temp_c     8
     2022-12-25 08:20:27   hfc6_temperature 8
     2022-12-25 08:20:27   hfc6_wind       24
     2022-12-25 08:20:27   hfc6_wind_gust  51
     2022-12-25 08:20:27   hfc6_wind_speed 24
     2022-12-25 08:20:27   high_c          9
     2022-12-25 08:20:27   humidity        98
     2022-12-25 08:20:27   icon            drizzle
     2022-12-25 08:20:27   iconAPI         09n
     2022-12-25 08:20:27   lastError       
     2022-12-25 08:20:27   lat             50.489
     2022-12-25 08:20:27   long            6.448
     2022-12-25 08:20:27   low_c           7
     2022-12-25 08:20:27   pressure        1012
     2022-12-25 08:20:27   pubDate         So, 25 Dez 2022 08:20
     2022-12-25 08:20:27   state           T: 8 °C F: 98 % W: 9 km/h P: 1012 hPa
     2022-12-25 08:20:27   status          ok
     2022-12-25 08:20:27   sunriseTime     So, 25 Dez 2022 08:34
     2022-12-25 08:20:27   sunsetTime      So, 25 Dez 2022 16:34
     2022-12-25 08:20:27   tempFeelsLike_c 6
     2022-12-25 08:20:27   tempHigh        9
     2022-12-25 08:20:27   tempLow         7
     2022-12-25 08:20:27   temp_c          8
     2022-12-25 08:20:27   temperature     8
     2022-12-25 08:20:27   validity        up-to-date
     2022-12-25 08:20:27   visibility      4500
     2022-12-25 08:20:27   wind            9
     2022-12-25 08:20:27   wind_condition  Wind: S 9 km/h
     2022-12-25 08:20:27   wind_direction  170
     2022-12-25 08:20:27   wind_gust       0
     2022-12-25 08:20:27   wind_speed      9
   fhem:
     LOCATION   50.489,6.448
     allowCache 1
     interfaces temperature;humidity;wind
Attributes:
   forecast   hourly,daily
   forecastLimit 6
   room       Programme

CoolTux

Ok sollte nun gefixt sein. Bitte noch mal OpenWeatherMapAPI runterladenn und testen. Danke Dir
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

softwear

Der API-Fehler ist nun behoben. Der Encode-Fehler bleibt. Hängt damit die "defekte" Temperatur (hfc1_tempHigh und *_tempLow) der Forecasts zusammen? Die beiden sind Ganzzahlen, keine Floats, die sie eigentlich sein müssten.

CoolTux

Zitat von: softwear am 25 Dezember 2022, 09:34:39
Der API-Fehler ist nun behoben. Der Encode-Fehler bleibt. Hängt damit die "defekte" Temperatur (hfc1_tempHigh und *_tempLow) der Forecasts zusammen? Die beiden sind Ganzzahlen, keine Floats, die sie eigentlich sein müssten.

Nein, das Encode bezieht sich auf encode_utf8 also eine "string umwandung". Wird eigentlich nur bei condition verwendet
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

softwear

Jo, da geht defintiv ein undef zur Encodierung rein (aber nur bei fhem-Start bzw. bei Update des weather-Device). Das warning ist ohnehin nur Information, dass der Parameter nicht undef sein sollte und wird dann als Leerstring initialisiert. Insofern erstmal kein grobes Problem. Liegt aber nicht am alten Perl.

Danke Dir!

softwear

#43
Was die Temperatur bei den forecasts angeht: Die Daten werden bereits in Celsius geliefert, Du gehst von Kelvin aus und ziehst die 273.15 davon ab (Zeilen 641-649). Deshalb passt das nicht.
Bei mir geändert, neu gestartet, korrekte Temperturwerte in den forecasts.

octek0815

Moin,

bekommen noch beim FHEM Start den folgenden Fehler:


PERL WARNING: Use of uninitialized value in multiplication (*) at FHEM/OpenWeatherMapAPI.pm line 504.


Grüße
Olli