!!! WICHTIG !!! 59_Weather.pm neue Version mit Änderungen

Begonnen von CoolTux, 15 Dezember 2022, 10:08:23

Vorheriges Thema - Nächstes Thema

CoolTux

Hallo Leute,

Im Zuge der Änderung des Modules OpenWeatherMapAPI wurden auch weitreichende Änderungen am Modul 59_Weather durchgeführt. Dies betrifft das Attribut forecase. Hier haben sich die Werte welche man für das Attribut setzen kann weitreichend geändert. Bitte achtet beim kommenden Update im neuen Jahr darauf.

Warum das ganze? Nun DarkSky wird kommenden Jahres eingestellt. Also nicht das Modul sondern die Plattform/API. Daher wird das DarkSky Modul wohl als bald Funktionslos sein. Ich habe zusammen mit einem User das OpenWeatherMapAPI Modul auf eine aktuelle Version umgeschrieben. API Version 3.0 von OpenWeatherMap. Die aktuelle 2.5 wird sicherlich irgendwann eingestellt werden. Daher die Weiterentwicklung. Ab Version 3.0 benötigt man einen gesonderten API Key welchen man nur mit neuer Subscription bekommt.

Hier kurz die Änderungen für das Modul 59_Weather

  • forecast - es gibt nur noch hourly und daily, kein off oder both mehr. Wenn nichts angegeben wird erfolgt keine forecast Abfrage
  • version - Als apioption kann nun version mit übergeben werden. per Default 2.5 wer aber eine extra Subscription hat für 3.0 kann version:3.0 als API Option setzen. Bsp: API=OpenWeatherMapAPI,cachemaxage:600,version:3.0
  • alerts - ein neues Attribut namens alerts kann mit 1 gesetzt werden. Dadurch kommen auch alerts Meldungen ähnlich wie bei Unwetterzentrale mit rein

Die Änderen API Module musste ich auch anpassen daher erfolgt ein Update auf alle API Module im neuen Jahr.


Grüße
Marko
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

octek0815

Moin,

mal eben die Module ausgetauscht und sehe die folgenden Meldungen im Log:

2022.12.21 19:07:46 1: PERL WARNING: Bareword found where operator expected at ./FHEM/59_Weather.pm line 2, near ""de-DE" class"
2022.12.21 19:07:46 1: PERL WARNING: (Missing operator before class?)
2022.12.21 19:07:46 1: PERL WARNING: Bareword found where operator expected at ./FHEM/59_Weather.pm line 6, near "<title>mod"
2022.12.21 19:07:46 1: PERL WARNING: (Missing operator before mod?)
2022.12.21 19:07:46 1: PERL WARNING: Bareword found where operator expected at ./FHEM/59_Weather.pm line 6, near "59_Weather"
2022.12.21 19:07:46 1: PERL WARNING: (Missing operator before Weather?)
2022.12.21 19:07:46 1: reload: Error:Modul 59_Weather deactivated:
Excessively long <> operator at ./FHEM/59_Weather.pm line 7, <$fh> line 6792.

2022.12.21 19:07:46 0: Excessively long <> operator at ./FHEM/59_Weather.pm line 7, <$fh> line 6792.


Grüße
Olli

CoolTux

Hallo Olli,

Du scheinst die Module falsch ausgetauscht zu haben. Wie oder was hast Du genau gemacht?


Grüße
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

Entweder auf die Module gehen und dann auf Originalformat oder das Repo als ZIP oder tar.gz runter laden.
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

octek0815

Zitat von: CoolTux am 21 Dezember 2022, 20:07:45
Entweder auf die Module gehen und dann auf Originalformat oder das Repo als ZIP oder tar.gz runter laden.

Hi,

meine Schuld, falsch geladen. Läuft nun. Teste nun ob alle läuft.

VG und Danke nochmal

CoolTux

Super. Welche API Module verwendest Du?

Und kannst Du von der OpenWeatherMapAPI bitte einmal ein list vom Device zeigen.
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

octek0815

Zitat von: CoolTux am 21 Dezember 2022, 20:42:46
Super. Welche API Module verwendest Du?

Und kannst Du von der OpenWeatherMapAPI bitte einmal ein list vom Device zeigen.

na klar...


Internals:
   API        OpenWeatherMapAPI
   APIKEY     xxxyyy
   APIOPTIONS
   DEF        API=OpenWeatherMapAPI apikey=xxxyyy
   FUUID      63a35266-f33f-445e-bd85-13d878f4b34147a5
   INTERVAL   3600
   LANG       de
   MODEL      OpenWeatherMapAPI
   NAME       System_OpenWeatherMapAPI_Wetter
   NOTIFYDEV  global
   NR         1272
   NTFY_ORDER 50-System_OpenWeatherMapAPI_Wetter
   STATE      T: 6 °C F: 93 % W: 12 km/h P: 1005 hPa
   TYPE       Weather
   VERSION    v2.2.6
   eventCount 1
   READINGS:
     2022-12-21 20:46:37   apiMaintainer   Marko Oldenburg (<a href=https://forum.fhem.de/index.php?action=profile;u=13684>CoolTux</a>)
     2022-12-21 20:46:37   apiVersion      v3.0.2
     2022-12-21 20:30:00   city            xxxyyy
     2022-12-21 20:46:37   cloudCover      100
     2022-12-21 20:46:37   code            28
     2022-12-21 20:46:37   condition       Bedeckt
     2022-12-21 20:30:00   country         DE
     2022-12-21 20:46:37   current_date_time Wed, 21 Dec 2022 20:32
     2022-12-21 20:46:37   dew_point       5
     2022-12-21 20:46:37   fc1_cloudCover  100
     2022-12-21 20:46:37   fc1_code        35
     2022-12-21 20:46:37   fc1_condition   Leichter Regen
     2022-12-21 20:46:37   fc1_day_of_week Wed, 12:00
     2022-12-21 20:46:37   fc1_dew_point   7
     2022-12-21 20:46:37   fc1_high_c      8
     2022-12-21 20:46:37   fc1_humidity    98
     2022-12-21 20:46:37   fc1_icon        heavyrain
     2022-12-21 20:46:37   fc1_iconAPI     10d
     2022-12-21 20:46:37   fc1_low_c       6
     2022-12-21 20:46:37   fc1_moon_phase  0.92
     2022-12-21 20:46:37   fc1_moonrise    Wed, 06:08
     2022-12-21 20:46:37   fc1_moonset     Wed, 14:10
     2022-12-21 20:46:37   fc1_pressure    1011
     2022-12-21 20:46:37   fc1_pubDate     Wed, 21 Dec 2022 12:00
     2022-12-21 20:46:37   fc1_rain        2.05
     2022-12-21 20:46:37   fc1_sunrise     08:28
     2022-12-21 20:46:37   fc1_sunset      Wed, 16:06
     2022-12-21 20:46:37   fc1_tempFeelsLike_day 6
     2022-12-21 20:46:37   fc1_tempFeelsLike_eve 4
     2022-12-21 20:46:37   fc1_tempFeelsLike_morn 5
     2022-12-21 20:46:37   fc1_tempFeelsLike_night 3
     2022-12-21 20:46:37   fc1_tempHigh    8
     2022-12-21 20:46:37   fc1_tempLow     6
     2022-12-21 20:46:37   fc1_temp_c      8
     2022-12-21 20:46:37   fc1_temperature 8
     2022-12-21 20:46:37   fc1_temperature_eve 6
     2022-12-21 20:46:37   fc1_temperature_morn 7
     2022-12-21 20:46:37   fc1_temperature_night 6
     2022-12-21 20:46:37   fc1_uvi         0.39
     2022-12-21 20:46:37   fc1_wind        15
     2022-12-21 20:46:37   fc1_wind_condition Wind: SSW 15 km/h
     2022-12-21 20:46:37   fc1_wind_direction 208
     2022-12-21 20:46:37   fc1_wind_gust   38
     2022-12-21 20:46:37   fc1_wind_speed  15
     2022-12-21 20:46:37   fc2_cloudCover  100
     2022-12-21 20:46:37   fc2_code        35
     2022-12-21 20:46:37   fc2_condition   Leichter Regen
     2022-12-21 20:46:37   fc2_day_of_week Thu, 12:00
     2022-12-21 20:46:37   fc2_dew_point   7
     2022-12-21 20:46:37   fc2_high_c      8
     2022-12-21 20:46:37   fc2_humidity    98
     2022-12-21 20:46:37   fc2_icon        heavyrain
     2022-12-21 20:46:37   fc2_iconAPI     10d
     2022-12-21 20:46:37   fc2_low_c       4
     2022-12-21 20:46:37   fc2_moon_phase  0.96
     2022-12-21 20:46:37   fc2_moonrise    Thu, 07:40
     2022-12-21 20:46:37   fc2_moonset     Thu, 14:45
     2022-12-21 20:46:37   fc2_pressure    1003
     2022-12-21 20:46:37   fc2_pubDate     Thu, 22 Dec 2022 12:00
     2022-12-21 20:46:37   fc2_rain        2.18
     2022-12-21 20:46:37   fc2_sunrise     08:28
     2022-12-21 20:46:37   fc2_sunset      Thu, 16:07
     2022-12-21 20:46:37   fc2_tempFeelsLike_day 5
     2022-12-21 20:46:37   fc2_tempFeelsLike_eve 2
     2022-12-21 20:46:37   fc2_tempFeelsLike_morn 5
     2022-12-21 20:46:37   fc2_tempFeelsLike_night 1
     2022-12-21 20:46:37   fc2_tempHigh    8
     2022-12-21 20:46:37   fc2_tempLow     4
     2022-12-21 20:46:37   fc2_temp_c      7
     2022-12-21 20:46:37   fc2_temperature 7
     2022-12-21 20:46:37   fc2_temperature_eve 5
     2022-12-21 20:46:37   fc2_temperature_morn 7
     2022-12-21 20:46:37   fc2_temperature_night 4
     2022-12-21 20:46:37   fc2_uvi         0.27
     2022-12-21 20:46:37   fc2_wind        18
     2022-12-21 20:46:37   fc2_wind_condition Wind: W 18 km/h
     2022-12-21 20:46:37   fc2_wind_direction 274
     2022-12-21 20:46:37   fc2_wind_gust   42
     2022-12-21 20:46:37   fc2_wind_speed  18
     2022-12-21 20:46:37   fc3_cloudCover  100
     2022-12-21 20:46:37   fc3_code        35
     2022-12-21 20:46:37   fc3_condition   Mäßiger Regen
     2022-12-21 20:46:37   fc3_day_of_week Fri, 12:00
     2022-12-21 20:46:37   fc3_dew_point   5
     2022-12-21 20:46:37   fc3_high_c      5
     2022-12-21 20:46:37   fc3_humidity    98
     2022-12-21 20:46:37   fc3_icon        heavyrain
     2022-12-21 20:46:37   fc3_iconAPI     10d
     2022-12-21 20:46:37   fc3_low_c       4
     2022-12-21 20:46:37   fc3_moon_phase  0
     2022-12-21 20:46:37   fc3_moonrise    Fri, 09:03
     2022-12-21 20:46:37   fc3_moonset     Fri, 15:39
     2022-12-21 20:46:37   fc3_pressure    1004
     2022-12-21 20:46:37   fc3_pubDate     Fri, 23 Dec 2022 12:00
     2022-12-21 20:46:37   fc3_rain        11.84
     2022-12-21 20:46:37   fc3_sunrise     08:28
     2022-12-21 20:46:37   fc3_sunset      Fri, 16:07
     2022-12-21 20:46:37   fc3_tempFeelsLike_day 5
     2022-12-21 20:46:37   fc3_tempFeelsLike_eve 3
     2022-12-21 20:46:37   fc3_tempFeelsLike_morn 4
     2022-12-21 20:46:37   fc3_tempFeelsLike_night 4
     2022-12-21 20:46:37   fc3_tempHigh    5
     2022-12-21 20:46:37   fc3_tempLow     4
     2022-12-21 20:46:37   fc3_temp_c      5
     2022-12-21 20:46:37   fc3_temperature 5
     2022-12-21 20:46:37   fc3_temperature_eve 5
     2022-12-21 20:46:37   fc3_temperature_morn 5
     2022-12-21 20:46:37   fc3_temperature_night 5
     2022-12-21 20:46:37   fc3_uvi         0.06
     2022-12-21 20:46:37   fc3_wind        10
     2022-12-21 20:46:37   fc3_wind_condition Wind: SSW 10 km/h
     2022-12-21 20:46:37   fc3_wind_direction 193
     2022-12-21 20:46:37   fc3_wind_gust   22
     2022-12-21 20:46:37   fc3_wind_speed  10
     2022-12-21 20:46:37   fc4_cloudCover  100
     2022-12-21 20:46:37   fc4_code        35
     2022-12-21 20:46:37   fc4_condition   Mäßiger Regen
     2022-12-21 20:46:37   fc4_day_of_week Sat, 12:00
     2022-12-21 20:46:37   fc4_dew_point   6
     2022-12-21 20:46:37   fc4_high_c      9
     2022-12-21 20:46:37   fc4_humidity    84
     2022-12-21 20:46:37   fc4_icon        heavyrain
     2022-12-21 20:46:37   fc4_iconAPI     10d
     2022-12-21 20:46:37   fc4_low_c       6
     2022-12-21 20:46:37   fc4_moon_phase  0.04
     2022-12-21 20:46:37   fc4_moonrise    Sat, 10:08
     2022-12-21 20:46:37   fc4_moonset     Sat, 16:53
     2022-12-21 20:46:37   fc4_pressure    1011
     2022-12-21 20:46:37   fc4_pubDate     Sat, 24 Dec 2022 12:00
     2022-12-21 20:46:37   fc4_rain        2.29
     2022-12-21 20:46:37   fc4_sunrise     08:29
     2022-12-21 20:46:37   fc4_sunset      Sat, 16:08
     2022-12-21 20:46:37   fc4_tempFeelsLike_day 5
     2022-12-21 20:46:37   fc4_tempFeelsLike_eve 3
     2022-12-21 20:46:37   fc4_tempFeelsLike_morn 5
     2022-12-21 20:46:37   fc4_tempFeelsLike_night 3
     2022-12-21 20:46:37   fc4_tempHigh    9
     2022-12-21 20:46:37   fc4_tempLow     6
     2022-12-21 20:46:37   fc4_temp_c      8
     2022-12-21 20:46:37   fc4_temperature 8
     2022-12-21 20:46:37   fc4_temperature_eve 6
     2022-12-21 20:46:37   fc4_temperature_morn 9
     2022-12-21 20:46:37   fc4_temperature_night 6
     2022-12-21 20:46:37   fc4_uvi         0.14
     2022-12-21 20:46:37   fc4_wind        33
     2022-12-21 20:46:37   fc4_wind_condition Wind: WSW 33 km/h
     2022-12-21 20:46:37   fc4_wind_direction 251
     2022-12-21 20:46:37   fc4_wind_gust   63
     2022-12-21 20:46:37   fc4_wind_speed  33
     2022-12-21 20:46:37   fc5_cloudCover  92
     2022-12-21 20:46:37   fc5_code        35
     2022-12-21 20:46:37   fc5_condition   Leichter Regen
     2022-12-21 20:46:37   fc5_day_of_week Sun, 12:00
     2022-12-21 20:46:37   fc5_dew_point   4
     2022-12-21 20:46:37   fc5_high_c      10
     2022-12-21 20:46:37   fc5_humidity    83
     2022-12-21 20:46:37   fc5_icon        heavyrain
     2022-12-21 20:46:37   fc5_iconAPI     10d
     2022-12-21 20:46:37   fc5_low_c       4
     2022-12-21 20:46:37   fc5_moon_phase  0.08
     2022-12-21 20:46:37   fc5_moonrise    Sun, 10:53
     2022-12-21 20:46:37   fc5_moonset     Sun, 18:23
     2022-12-21 20:46:37   fc5_pressure    1014
     2022-12-21 20:46:37   fc5_pubDate     Sun, 25 Dec 2022 12:00
     2022-12-21 20:46:37   fc5_rain        3.3
     2022-12-21 20:46:37   fc5_sunrise     08:29
     2022-12-21 20:46:37   fc5_sunset      Sun, 16:08
     2022-12-21 20:46:37   fc5_tempFeelsLike_day 4
     2022-12-21 20:46:37   fc5_tempFeelsLike_eve 5
     2022-12-21 20:46:37   fc5_tempFeelsLike_morn 1
     2022-12-21 20:46:37   fc5_tempFeelsLike_night 10
     2022-12-21 20:46:37   fc5_tempHigh    10
     2022-12-21 20:46:37   fc5_tempLow     4
     2022-12-21 20:46:37   fc5_temp_c      7
     2022-12-21 20:46:37   fc5_temperature 7
     2022-12-21 20:46:37   fc5_temperature_eve 9
     2022-12-21 20:46:37   fc5_temperature_morn 4
     2022-12-21 20:46:37   fc5_temperature_night 10
     2022-12-21 20:46:37   fc5_uvi         0.32
     2022-12-21 20:46:37   fc5_wind        27
     2022-12-21 20:46:37   fc5_wind_condition Wind: W 27 km/h
     2022-12-21 20:46:37   fc5_wind_direction 262
     2022-12-21 20:46:37   fc5_wind_gust   62
     2022-12-21 20:46:37   fc5_wind_speed  27
     2022-12-21 20:30:00   high_c          9
     2022-12-21 20:46:37   humidity        93
     2022-12-21 20:46:37   icon            mostlycloudy
     2022-12-21 20:46:37   iconAPI         04n
     2022-12-21 20:46:37   lastError       
     2022-12-21 20:46:37   lat             xxx
     2022-12-21 20:46:37   long            yyy
     2022-12-21 20:30:00   low_c           5
     2022-12-21 20:46:37   pressure        1005
     2022-12-21 20:46:37   pubDate         Wed, 21 Dec 2022 20:32
     2022-12-21 20:46:37   state           T: 6 °C F: 93 % W: 12 km/h P: 1005 hPa
     2022-12-21 20:46:37   status          ok
     2022-12-21 20:46:37   sunriseTime     Wed, 21 Dec 2022 08:28
     2022-12-21 20:46:37   sunsetTime      Wed, 21 Dec 2022 16:06
     2022-12-21 20:46:37   tempFeelsLike_c 3
     2022-12-21 20:30:00   tempHigh        9
     2022-12-21 20:30:00   tempLow         5
     2022-12-21 20:46:37   temp_c          6
     2022-12-21 20:46:37   temperature     6
     2022-12-21 20:46:37   timezone        Europe/Berlin
     2022-12-21 20:46:37   timezone_offset 3600
     2022-12-21 20:46:37   uvi             0
     2022-12-21 20:46:37   validity        up-to-date
     2022-12-21 20:46:37   visibility      10000
     2022-12-21 20:46:37   warnCount       0
     2022-12-21 20:46:37   wind            12
     2022-12-21 20:46:37   wind_condition  Wind: SSW 12 km/h
     2022-12-21 20:46:37   wind_direction  209
     2022-12-21 20:46:37   wind_gust       36
     2022-12-21 20:46:37   wind_speed      12
   fhem:
     LOCATION   xxx,yyy
     allowCache 1
     interfaces temperature;humidity;wind
Attributes:
   alerts     1
   event-on-change-reading .*
   forecast   daily
   room       System

octek0815

Bekomme noch bei der aktualisierung ein...


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

CoolTux

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

octek0815


Persuasiv

Hi,
ist die neue Version schon über die Update-Funktion verfügbar?
Besten Dank!

CoolTux

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

Trinidad

Habe heute meine Fham Module upgedatet und bekomme jetzt:

2023.01.12 13:58:39 1: reload: Error:Modul 59_Weather deactivated:
Can't locate Readonly.pm in @INC (you may need to install the Readonly module) (@INC contains: ./FHEM/lib ./lib ./FHEM . /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at ./FHEM/59_Weather.pm line 36.
BEGIN failed--compilation aborted at ./FHEM/59_Weather.pm line 36.

2023.01.12 13:58:39 0: Can't locate Readonly.pm in @INC (you may need to install the Readonly module) (@INC contains: ./FHEM/lib ./lib ./FHEM . /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at ./FHEM/59_Weather.pm line 36.
BEGIN failed--compilation aborted at ./FHEM/59_Weather.pm line 36.


Was ist da falsch?

CoolTux

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