FHEM Forum

FHEM - Hausautomations-Systeme => Homematic => Thema gestartet von: jv21 am 23 Januar 2019, 21:04:46

Titel: Cannot load module HMCCU
Beitrag von: jv21 am 23 Januar 2019, 21:04:46
Hallo,

ich habe FHEM auf ein Raspi laufen und da ich letzte Woche meine CCU2 erhalten habe wollte ich sie mit dem FHEM verbinden.

Leider bekomme ich eine Fehlermeldung bei der Installation der Pearl Module. (s. Anhang)
Die Folge ist natürlich, wenn ich in FHEM define d_ccu HMCCU 192.168.x.xx eingebe, eine neue Fehlermeldung kommt dass das Modul nicht geladen werden kann.
"Cannot load modul HMCCU"

Was mach ich falsch? Woran könnte es liegen?
Kann einer helfen?

MfG
Jannis
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 24 Januar 2019, 07:27:56
steht doch da: die notwendigen Perl Module können nicht installiert werden. Ohne die läuft HMCCU aber nicht. Du hast also ein Linux Problem, kein FHEM Problem.
Zunächst musst Dj die Paketverwaltung deines Linux bereinigen. Google halt mal die Fehlermeldung.
Titel: Antw:Cannot load module HMCCU
Beitrag von: jv21 am 24 Januar 2019, 14:39:09
Hallo,

leider habe ich keine Lösung gefunden, deswegen hatte ich die Frage hier in Forum gestellt.

Es sind hier bestimmt viele Linux Spezialisten unterwegs  :)

Titel: Antw:Cannot load module HMCCU
Beitrag von: Wernieman am 24 Januar 2019, 14:56:57
- Was für eine Distri in welcher Version
- Was für Sourcen
- Was ist alles darauf installiert?
- .......

Was mich wundert:
"Soll nicht installiert werden", hast Du irgendwelche Pakete geblockt???
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 24 Januar 2019, 19:02:07
Kannst mal folgendes versuchen:

sudo apt-get install -f

Fix broken packages.

Habe ich von hier, da gibt es noch weitere Hinweise:

https://www.rosehosting.com/blog/how-to-fix-broken-packages-on-ubuntu-16-04-and-debian-9/
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 18 März 2020, 00:19:26
Zitat von: zap am 24 Januar 2019, 19:02:07
Kannst mal folgendes versuchen:

sudo apt-get install -f

Fix broken packages.

Habe ich von hier, da gibt es noch weitere Hinweise:

https://www.rosehosting.com/blog/how-to-fix-broken-packages-on-ubuntu-16-04-and-debian-9/

Hallo liebe Fhem-Gemeinde,
ich stehe vor einer leider für mich unlösbaren Herausforderung. Ich bekomme auch den Fehler "
Cannot load module HMCCU" wenn ich das Modul in Fhem einbinden möchte.

Die benötigten Module auf einem PI zu installieren geht sehr gut und habe ich auch schon oft erfolgreich durchführen können. Aber jetzt versuche ich das Modul auf einem MAC mit MAC-OS zum laufen zu bringen und ich finde im Internet keine Anleitung wie ich die benötigten Module für MACOS installieren kann. Falls es wichtig ist, es ist ein MiniMAC Server  Ende2012 mit macOS Catalina.

Ich hoffe mir kann jemand dabei weiterhelfen. Viele Grüße
Tim
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 18 März 2020, 11:37:51
Wenn auf dem Mac CPAN installiert ist, kannst Du damit die Perl Module installieren. Einfach mal "cpan" eingeben.

Vermutlich will das Tool erst mal konfiguriert werden.

Danach geht sowas:

cpan> install Modulname
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 18 März 2020, 12:07:47
Hallo ZAP,
danke für eine Rückmeldung.
Das heißt wenn ich CPAN am laufen habe kann ich statt apt-get install Modulname 
install Modulname eingeben. Die Module sind bei apt-get und cpan auch immer gleich benannt?

Wenn ich Cpan Eingebe kommt folgende Meldung:

Last login: Wed Mar 18 12:05:44 on ttys000
-bash: /Users/macmini/perl5/perlbrew/etc/bashrc: No such file or directory

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
benutzers-Mini:~ macmini$ cpan


Your configuration suggests that CPAN.pm should use a working
directory of
    /Users/macmini/.cpan
Unfortunately we could not create the lock file
    /Users/macmini/.cpan/.lock
due to 'Permission denied'.

Please make sure that the configuration variable
    $CPAN::Config->{cpan_home}
points to a directory where you can write a .lock file. You can set
this variable in either a CPAN/MyConfig.pm or a CPAN/Config.pm in your
@INC path;

cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.

nolock_cpan[1]>               

Kann es sein, dass ich noch mehr zu tun habe als in ersten Schritt "cpan" zum laufen zu bringen?

Viele Grüße
Tim
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 18 März 2020, 12:53:35
Du kannst es natürlich mal mit

sudo cpan

versuchen. Ist aber ein weites Feld. Wenn Du gar keine Ahnung von Linux oder Unix / MacOS hast, wird das eine ziemlich langwierige Veranstaltung
Titel: Antw:Cannot load module HMCCU
Beitrag von: Wernieman am 18 März 2020, 14:38:24
Dann wäre die Frage, ob nicht das docker-fhem besser wäre .. allerdings ist das auch nicht "ohne" ....
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 20 März 2020, 19:10:42
Hallo,

Cpan funktioniert. Aber ich glaube die Module die es zu installieren gilt heißen nicht so wie z.B. beim PI.

Wenn ich es versuche zu Intallieren kommt folgende Meldung:

cpan[6]> install librpc-xml-perl                                               
Warning: Cannot install librpc-xml-perl, don't know what it is.
Try the command

    i /librpc-xml-perl/

to find objects with matching identifiers.

Auch wenn ich den Vorschlag folge und i /librpc-xml-perl/ eingebe kommt nur die Meldung, dass er kein passendes Objekt findet. Wo habe ich meinen Denkfehler?

VG Tim
Titel: Antw:Cannot load module HMCCU
Beitrag von: Wernieman am 20 März 2020, 19:37:50
Du verwendet die Libary-Namen vom apt-get. Du brauchst aber den CPAN Namen ...

zu Suchen: https://metacpan.org (https://metacpan.org)
Ich "glaube" es ist XML::RPC

Edit:
Nur Rechtschreibkorrektur ...
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 21 März 2020, 08:12:55
Die Module stehen auf der Wiki Seite zu HMCCU unter dem Abschnitt Installation. Es gibt keinen Unterschied bei Modulnamen zwischen verschiedenen Plattformen.
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 21 März 2020, 10:33:52
Zitat von: Wernieman am 20 März 2020, 19:37:50
Du verwendet die Libary-Namen vom apt-get. Du brauchst aber den CPAM Namen ...

zu Suchen: https://metacpan.org (https://metacpan.org)
Ich "glaube" es ist XML::RPC

Danke! Ja, dein Gedächtnis hat dich nicht in Stich gelassen.

@ZAP: Ich habe die Namen der Module aus der von dir benannten Beschreibung zur Installation.
           Daher habe ich ja die Namen der Module aber wie ja richrtig erkannt auf apt-get.

Ich werde jetzt mal alle in der Übersicht genannten Module in der von Wernieman genannten Library suchen. Ich hoffe ich kann die richtigen Module auch identifizieren. Ich berichte.

Danke erst mal für die Gehstütze bis an diese Stelle. ;)

VG Tim

Nachtrag: Jetzt weiß ich was ZAP gemeint hat.

siehe hier:

Alle HMCCU Module sind Teil von FHEM. HMCCU benötigt die Perl Module RPC::XML::Server und RPC::XML::Client. Und beide konnte ich mit cpan --> und dann mit Install Modul installieren.

Manchmal sieht man den Wald vor lauter Bäumen nicht.
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 28 März 2020, 20:04:19
Guten Abend,
ein Vorteil hat es, dass wir alle mehr oder weniger Zuhause "eingesperrt" sind.
Ich habe mich nochmal dem Thema HMCCU auf der Fhem-Instanz des Mac zum laufen zu bringen.

Ist wirklich keine leichte Aufgabe. Jetzt habe ich verstanden, welche Befehle ich einzugeben habe, aber das "install RPC::XML::Server" unter CPAN wirft mir schon ein Fehler aus.
Ich habe die angezeigten Fehler auch alle brav gegoogelt, aber es ist kein Hinweis zu finden mit dem ich etwas anfangen könnte oder einen weiteren Hinweis darauf gibt, was ich tun könnte.

Deswegen mein Beitrag in der Hoffnung des die Meldung jemanden einleuchtet und mir weiterhelfen kann. Ich habe auch schon überlegt jemanden zu suchen, der es mir gegen Entgelt einrichtet, aber nach welcher Dienstleistung sucht man da? Ich möchte gerne den PI durch den MAC ablösen, er hat einfach mehr Rechenleistung.



cpan[8]> install RPC::XML::Server                                                                                                   
Running install for module 'RPC::XML::Server'
Running make for R/RJ/RJRAY/RPC-XML-0.80.tar.gz
  Has already been unwrapped into directory /Users/macmini/.cpan/build/RPC-XML-0.80-zn3VM5
  Has already been made
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ..................... ok     
t/10_data.t ..................... ok       
t/11_base64_fh.t ................ ok     
t/12_nil.t ...................... ok     
t/13_no_deep_recursion.t ........ ok     
t/14_datetime_iso8601.t ......... skipped: DateTime::Format::ISO8601 not available
t/15_serialize.t ................ ok     
t/20_xml_parser.t ............... ok       
t/21_xml_libxml.t ............... ok       
t/25_parser_negative.t .......... ok     
t/29_parserfactory.t ............ ok     
t/30_procedure.t ................ ok     
t/35_namespaces.t ............... ok   
t/40_server.t ................... ok     
t/40_server_xmllibxml.t ......... ok     
t/41_server_hang.t .............. ok   
t/50_client.t ................... ok     
t/51_client_with_host_header.t .. ok   
t/60_net_server.t ............... 2/30
#   Failed test 'system.identity matches $srv->product_tokens'
#   at t/60_net_server.t line 94.
#          got: undef
#     expected: 'RPC::XML::Server/1.73'

#   Failed test 'system.listMethods returned ARRAY ref'
#   at t/60_net_server.t line 103.
#          got: ''
#     expected: 'ARRAY'

#   Failed test 'system.listMethods returned ARRAY ref'
#   at t/60_net_server.t line 118.
#          got: ''
#     expected: 'ARRAY'

#   Failed test 'system.listMethods returned ARRAY ref'
#   at t/60_net_server.t line 131.
#          got: ''
#     expected: 'ARRAY'

#   Failed test 'system.status returned HASH ref'
#   at t/60_net_server.t line 145.
#          got: ''
#     expected: 'HASH'

#   Failed test 'system.methodHelp returned correct string'
#   at t/60_net_server.t line 159.
#          got: undef
#     expected: 'Return the server name and version as a string'

#   Failed test 'system.methodHelp returned ARRAY ref'
#   at t/60_net_server.t line 165.
#          got: ''
#     expected: 'ARRAY'

#   Failed test ''system.methodHelp (bad arg) response' isa 'RPC::XML::fault''
#   at t/60_net_server.t line 180.
#     'system.methodHelp (bad arg) response' isn't a 'RPC::XML::fault'

#   Failed test 'system.methodSignature returned ARRAY ref'
#   at t/60_net_server.t line 193.
#          got: ''
#     expected: 'ARRAY'

#   Failed test ''system.methodSignature (bad arg) response' isa 'RPC::XML::fault''
#   at t/60_net_server.t line 209.
#     'system.methodSignature (bad arg) response' isn't a 'RPC::XML::fault'

#   Failed test 'system.multicall returned ARRAY ref'
#   at t/60_net_server.t line 266.
#          got: ''
#     expected: 'ARRAY'
# Looks like you planned 30 tests but ran 29.
# Looks like you failed 11 tests of 29 run.
t/60_net_server.t ............... Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 12/30 subtests
(less 16 skipped subtests: 2 okay)
t/70_compression_detect.t ....... ok   
t/90_rt50013_parser_bugs.t ...... ok   
t/90_rt54183_sigpipe.t .......... 1/4
#   Failed test 'Initial request alarmed-out correctly'
#   at t/90_rt54183_sigpipe.t line 67.
#                   'RPC::XML::Client::send_request: HTTP server error: Can't connect to localhost:60231 (Connection refused)'
#     doesn't match '(?^:alarm)'

#   Failed test 'Second request correct value'
#   at t/90_rt54183_sigpipe.t line 77.

#   Failed test 'Good system.status return'
#   at t/90_rt54183_sigpipe.t line 85.
# Looks like you failed 3 tests of 4.
t/90_rt54183_sigpipe.t .......... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/4 subtests
t/90_rt54494_blessed_refs.t ..... ok   
t/90_rt58065_allow_nil.t ........ ok   
t/90_rt58323_push_parser.t ...... ok   

Test Summary Report
-------------------
t/60_net_server.t             (Wstat: 2816 Tests: 29 Failed: 11)
  Failed tests:  3-4, 7, 9, 11, 14-15, 17, 19, 21, 24
  Non-zero exit status: 11
  Parse errors: Bad plan.  You planned 30 tests but ran 29.
t/90_rt54183_sigpipe.t        (Wstat: 768 Tests: 4 Failed: 3)
  Failed tests:  1, 3-4
  Non-zero exit status: 3
Files=25, Tests=987, 31 wallclock secs ( 0.17 usr  0.05 sys +  3.83 cusr  0.85 csys =  4.90 CPU)
Result: FAIL
Failed 2/25 test programs. 14/987 subtests failed.
make: *** [test_dynamic] Error 255
  RJRAY/RPC-XML-0.80.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports RJRAY/RPC-XML-0.80.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
RJRAY/RPC-XML-0.80.tar.gz                    : make_test NO

cpan[9]>
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 31 März 2020, 18:00:00
Hat niemand eine Idee? Ich hänge an dieser stelle leider. Ohne das HMCCU kann ich nicht auf den Mac umziehen. :(

VG Tim
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 31 März 2020, 18:54:40
Mach mal bitte auf dem Mac folgendes:

cat /etc/hosts
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 31 März 2020, 19:12:02
Hallo zap,

hier die angezeigten Werte.


cpan[5]> exit                                                                                                             
Lockfile removed.
macmini@benutzers-Mini fhem % cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1             localhost
macmini@benutzers-Mini fhem %



Vg Tim
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 31 März 2020, 19:20:17
Ändere mal die letzte Zeile in

# ::1   localhost

oder lösche die Zeile. Das geht wahrscheinlich nur mit "sudo"

Danach bitte nochmal versuchen, RPC::XML::Server zu installieren.
Titel: Antw:Cannot load module HMCCU
Beitrag von: desasterguy am 31 März 2020, 19:33:34
Hallo zap,

es hat funktioniert! Es hat an dem Localhost gelegen. Danke für die Hilfe!
Kannst du mir sagen, wie du darauf gekommen bist?

VG und nochmals Danke!
Tim
Titel: Antw:Cannot load module HMCCU
Beitrag von: zap am 31 März 2020, 19:53:51
Zitat von: desasterguy am 31 März 2020, 19:33:34
Hallo zap,

es hat funktioniert! Es hat an dem Localhost gelegen. Danke für die Hilfe!
Kannst du mir sagen, wie du darauf gekommen bist?

VG und nochmals Danke!
Tim

Google ist Dein Freund, zumindest in diesem Fall ;)

Ich habe nach "RPC::XML::Server Failed test 'system.identity matches $srv->product_tokens" gesucht. Einer der ersten Treffer enthielt den Hinweis.

Ich denke, nach der Installation kannst Du die Zeile in /etc/hosts wieder rein nehmen, dürfte aber nur notwendig sein, wenn Du nur IPv6 auf dem Mac verwendest.