Hauptmenü

[gelöst]MQTT

Begonnen von chanky, 20 Januar 2019, 22:13:49

Vorheriges Thema - Nächstes Thema

chanky

Hallo zusammen,
Ich versuche gerade ein MQTT_GENERIC_BRIDGE anzulegen, ich bekommen es nicht hin, ich brauche hier eure Hilfe. Hat Jemand da einen Idee woran's liegt?

defmod mqttGeneric MQTT_GENERIC_BRIDGE mqtt room=myRoom


Im Logfile steht's das Module::Pluggable installiert werden muss, das ist aber bereit installiet

cpan[1]> install Module::Pluggable                                                                                                   
Reading '/root/.cpan/Metadata'
  Database was generated on Sun, 20 Jan 2019 18:41:02 GMT
Module::Pluggable is up to date (5.2).


Die Log-Dateie schaut so aus:

2019.01.20 21:02:16 1: reload: Error:Modul 00_MQTT deactivated:
Can't locate Module/Pluggable.pm in @INC (you may need to install the Module::Pluggable module) (@INC contains: . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM ./FHEM/lib) at FHEM/lib/Net/MQTT/Message.pm line 9.
BEGIN failed--compilation aborted at FHEM/lib/Net/MQTT/Message.pm line 9.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.

2019.01.20 21:02:16 0: Can't locate Module/Pluggable.pm in @INC (you may need to install the Module::Pluggable module) (@INC contains: . /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/arm-linux-gnueabihf/perl5/5.24 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base ./FHEM ./FHEM/lib) at FHEM/lib/Net/MQTT/Message.pm line 9.
BEGIN failed--compilation aborted at FHEM/lib/Net/MQTT/Message.pm line 9.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.

2019.01.20 21:02:16 1: PERL WARNING: "all" is not defined in %MQTT::EXPORT_TAGS at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 407.
2019.01.20 21:02:16 1: reload: Error:Modul 10_MQTT_GENERIC_BRIDGE deactivated:
Can't continue after import errors at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 370.
BEGIN failed--compilation aborted at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 407.

2019.01.20 21:02:16 0: Can't continue after import errors at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 370.
BEGIN failed--compilation aborted at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 407.


Danke im Voraus!
LG
Chanky

chanky

Ich hab im Forum dieses hier unten gefunden:

https://forum.fhem.de/index.php/topic,90489.msg829579.html#msg829579


ich musste nur das libmodule-pluggable-perl Library nachinstallieren.

Es wäre hilfreich wenn solche Dependencies im Commandref auch stehen wurde.

LG

andies

Bei mir reicht dieses Paket nicht aus,
2020.11.27 12:14:19 0: Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.

2020.11.27 12:14:19 1: reload: Error:Modul 10_MQTT_GENERIC_BRIDGE deactivated:
Can't continue after import errors at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 456.
BEGIN failed--compilation aborted at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 495.

2020.11.27 12:14:19 0: Can't continue after import errors at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 456.
BEGIN failed--compilation aborted at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 495.

2020.11.27 12:14:19 0: ERROR: Cannot autoload MQTT_GENERIC_BRIDGE
2020.11.27 12:14:19 1: reload: Error:Modul 00_MQTT deactivated:
Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.

2020.11.27 12:14:19 0: Attempt to reload Net/MQTT/Message.pm aborted.
Compilation failed in require at ./FHEM/00_MQTT.pm line 80.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 80.

2020.11.27 12:14:19 1: reload: Error:Modul 10_MQTT_GENERIC_BRIDGE deactivated:
Can't continue after import errors at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 456.
BEGIN failed--compilation aborted at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 495.

2020.11.27 12:14:19 0: Can't continue after import errors at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 456.
BEGIN failed--compilation aborted at ./FHEM/10_MQTT_GENERIC_BRIDGE.pm line 495.

Noch jemand eine Idee? Hier gibt es Ärger
BEGIN {
  main::LoadModule("MQTT");
  MQTT->import(qw(:all));

und
sudo cpan install Net::MQTT::Message
reichte auch nicht.
FHEM 6.3 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Beta-User

Hmm, scheint uU. auch von der Perl-Version abzuhängen, bei mir war es nach der Erinnerung auch so, dass "pluggable" ausgereicht hatte.

Im Wiki ist es etwas unklar formuliert, dann stimmt aber wohl, dass man (leider) eben auch die Installationsvoraussetzungen für 00_MQTT.pm erfüllen muss (https://wiki.fhem.de/wiki/MQTT#MQTT_.28Modul.29):

Für "debianisiert" siehe https://wiki.fhem.de/wiki/MQTT#cite_note-7, für cpan direkt:
sudo cpan install Net::MQTT::Simple
sudo cpan install Net::MQTT::Constants
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

andies

update von FHEM und Neustart brachte dann die Lösung. Danke!
FHEM 6.3 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Beta-User

...also doch nur "pluggable"...?
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: ZigBee2mqtt, MiLight@ESP-GW, BT@OpenMQTTGw | ZWave | SIGNALduino | MapleCUN | RHASSPY
svn: u.a Weekday-&RandomTimer, Twilight,  div. attrTemplate-files, MySensors

andies

Bei mir reichte pluggable und neustart.
FHEM 6.3 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

rasti

Hallo zusammen,

ich ziehe mit meinem FHEM gerade um..... Upgrade eines alten FHEM 2016 auf PI auf aktuelles FHEM auf einem PI5
Ich möchte den "externen" Mosquitto Broker nutzen, der ist auch nun installiert und sollte laufen.

Allerdings meckert FHEM rum...ich habe wohl dasselbe Problem wie die o.g. User....muss wohl irgendwas nachinstallieren ??!

Leider weiss ich nicht, was ich da nun machen muss damit das läuft....unten die fhem.cfg und der log-File......kann hier jemand helfen ?

Viele Grüße
Ralf



Hier meine Definition in fhem.cfg

define Mosquitto MQTT 192.168.178.199:1883
attr Mosquitto keep-alive 120
attr Mosquitto room 2__MQTT

und hier die Fehlermeldung

2024.01.24 11:24:45 1: Including ./log/fhem.save
2024.01.24 11:24:45 3: Opening Haus_Strom_Meter1 device 192.168.178.20:502
2024.01.24 11:24:45 3: Haus_Strom_Meter1 device opened
2024.01.24 11:24:57 0: Server shutdown
2024.01.24 11:24:58 1: Including fhem.cfg
2024.01.24 11:24:58 3: WEB: port 8083 opened
2024.01.24 11:24:58 2: eventTypes: loaded 11 lines from ./log/eventTypes.txt
2024.01.24 11:24:58 1: reload: Error:Modul 00_MQTT deactivated:
 Can't locate Net/MQTT/Constants.pm in @INC (you may need to install the Net::MQTT::Constants module) (@INC contains: ./lib ./FHEM . /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/aarch64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl ./FHEM/lib) at ./FHEM/00_MQTT.pm line 42, <$fh> line 59.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 42, <$fh> line 59.

2024.01.24 11:24:58 0: Can't locate Net/MQTT/Constants.pm in @INC (you may need to install the Net::MQTT::Constants module) (@INC contains: ./lib ./FHEM . /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/aarch64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl ./FHEM/lib) at ./FHEM/00_MQTT.pm line 42, <$fh> line 59.
BEGIN failed--compilation aborted at ./FHEM/00_MQTT.pm line 42, <$fh> line 59.

2024.01.24 11:24:58 1: Including ./log/fhem.save
2024.01.24 11:24:58 1: Messages collected while initializing FHEM:configfile: Cannot load module MQTT

betateilchen

#8
Einen seit über drei Jahren als "gelöst" markierten Thread für ein eigenes neues Problem auszugraben, ist nicht sehr sinnvoll.

Zitat von: rasti am 24 Januar 2024, 11:34:33Ich möchte den "externen" Mosquitto Broker nutzen, der ist auch nun installiert und sollte laufen.

Du willst doch zum externen mosquitto verbinden, dann brauchst Du in Deinem FHEM kein MQTT device, sondern MQTT2_CLIENT.

https://commandref.fhem.de/#MQTT2_CLIENT

Edit: sorry, hatte zuerst den falschen Link gepostet
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

rasti

#9
Zitat von: betateilchen am 24 Januar 2024, 11:42:34Einen seit über drei Jahren als "gelöst" markierten Thread für ein eigenes neues Problem auszugraben, ist nicht sehr sinnvoll.
Sorry.

Zitat
Zitat von: rasti am 24 Januar 2024, 11:34:33Ich möchte den "externen" Mosquitto Broker nutzen, der ist auch nun installiert und sollte laufen.

Du willst doch zum externen mosquitto verbinden, dann brauchst Du in Deinem FHEM kein MQTT device, sondern MQTT2_CLIENT.
https://commandref.fhem.de/#MQTT2_CLIENT
Edit: sorry, hatte zuerst den falschen Link gepostet

Genau so wie die Definition ist läuft es auf meinem alten Fhem/Pi.
Gebe ich nun define Mosquitto MQTT2_CLIENT 192.168.178.199:1883 ein kann ich mich nicht damit verbinden. (immer Status disconnected)

Habe nun das hier eingegeben
sudo cpan install Net::MQTT:Simple sudo cpan install Net::MQTT:Constants
damit ist die Fehlermeldung dass FHEM das Modul nicht laden kann weg.
Erscheint aber immer noch als disconnected.

DasQ

Mach doch bitte einen neuen Thread auf. Der Thread ist oben als gelöst markiert.

Dann wäre ein ,,List" vom Modul und ein log ganz toll.

So ist das blindes stochern im Heuhaufen
Fhem on MacMini/Ubuntu.
Absoluter Befürworter der Konsequenten-Kleinschreibung https://de.wikipedia.org/wiki/Kleinschreibung
Infos zu Klimawandel http://www.globalcarbonatlas.org