FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: tplus am 15 Januar 2024, 12:05:47

Titel: [gelöst] Cannot load module Weather
Beitrag von: tplus am 15 Januar 2024, 12:05:47
Hallo,

wenn ich Weather definieren will mit:

define MyWeather Weather API=OpenWeatherMapAPI,cachemaxage:600 apikey=cedca...23 location=78.16832946262855,15.460791578221727 interval=3600 lang=de
bekomme ich die Fehlermeldung "Cannot load module Weather".

Libraries habe ich installiert:

apt-get install libdatetime-format-strptime-perl

apt-get install libjson-perl

Wo ist der Fehler? Besten Dank für Tipps...
Titel: Aw: Cannot load module Weather
Beitrag von: JoWiemann am 15 Januar 2024, 12:28:34
Hallo,

und was steht im Fhem Log?

Grüße Jörg
Titel: Aw: Cannot load module Weather
Beitrag von: cetri am 15 Januar 2024, 12:45:51
Zitat von: tplus am 15 Januar 2024, 12:05:47define MyWeather Weather API=OpenWeatherMapAPI,cachemaxage:600 apikey=cedca...23 location=78.16832946262855,15.460791578221727 interval=3600 lang=de

Hi,

wo hast du denn die Geokoordinaten her? Das sind ein paar Nachkommastellen zuviel. 5 Nachkommastellen bedeutet in unseren Breitengraden eine Genauigkeit von ca 1m, 8 Nachkommastellen sind auf ca. 0,8mm genau. Du hast 14. Da bist du wahrscheinlich irgendwo im Pikometerbereich und die Position einer einzelnen Bakterie willst du bestimmt nicht angeben.

Eventuell ist das einfach zuviel für das Modul. Probier mal 4 Nachkommastellen wie in der Ref angegeben.

LG
Cetri
Titel: Aw: Cannot load module Weather
Beitrag von: tplus am 15 Januar 2024, 19:31:02
Koordinaten kommen aus Google Maps, weniger Nachkommastellen lösen das Problem nicht.

FHEM log:

2024.01.15 19:29:08 0: Attempt to reload FHEM/Core/Weather.pm aborted.
Compilation failed in require at ./FHEM/59_Weather.pm line 35.

Das kam beim ersten Installationsversuch:

2024.01.14 12:22:50 1: reload: Error:Modul 59_Weather deactivated:
 Can't locate Readonly.pm in @INC (you may need to install the Readonly module) (@INC contains: ./lib ./FHEM . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/arm-linux-gnueabihf/perl5/5.32 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl-base /usr/lib/arm-linux-gnueabihf/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl ./FHEM/lib) at lib/FHEM/Core/Weather.pm line 40.
BEGIN failed--compilation aborted at lib/FHEM/Core/Weather.pm line 40.
Compilation failed in require at ./FHEM/59_Weather.pm line 35.

2024.01.14 12:22:50 0: Can't locate Readonly.pm in @INC (you may need to install the Readonly module) (@INC contains: ./lib ./FHEM . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/arm-linux-gnueabihf/perl5/5.32 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl-base /usr/lib/arm-linux-gnueabihf/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl ./FHEM/lib) at lib/FHEM/Core/Weather.pm line 40.
BEGIN failed--compilation aborted at lib/FHEM/Core/Weather.pm line 40.
Compilation failed in require at ./FHEM/59_Weather.pm line 35.

2024.01.14 12:26:29 1: PERL WARNING: Subroutine ::Weather_Initialize redefined at ./FHEM/59_Weather.pm line 39.
2024.01.14 12:26:29 1: PERL WARNING: Subroutine Initialize redefined at ./FHEM/59_Weather.pm line 41.
2024.01.14 12:26:29 1: reload: Error:Modul 59_Weather deactivated:
 Attempt to reload FHEM/Core/Weather.pm aborted.
Compilation failed in require at ./FHEM/59_Weather.pm line 35.
Titel: Aw: Cannot load module Weather
Beitrag von: Beta-User am 15 Januar 2024, 19:37:28
Läuft dein update sauber durch?

(Vermutung: ein Rechteproblem, durch das du bestimmte Zweige gar nicht installiert bekommen hast)
Titel: Aw: Cannot load module Weather
Beitrag von: tplus am 15 Januar 2024, 19:43:48
Update läuft sauber und jetzt nach dem Update ist der Fehler auch weg. Sorry, hätte ich vorher probieren können.

Besten Dank für die Hilfe.
Titel: Aw: Cannot load module Weather
Beitrag von: Beta-User am 15 Januar 2024, 19:49:53
Gerne!

[gelöst] ?!?
Titel: Aw: Cannot load module Weather
Beitrag von: tplus am 16 Januar 2024, 10:45:25
Ja, gelöst. Kann man den Thread markieren?