[gelöst] HMCCU: RPC möchte nicht mit Server sprechen

Begonnen von TomHB, 13 November 2021, 10:04:05

Vorheriges Thema - Nächstes Thema

TomHB

Hallo Zusammen,
ich habe, um auch mal einige neue Geräte zu testen HM-IP Geräte gekauft und mit einer VM (homematic-raspi) zum Laufen gebracht.
Es wurden auch die Geräte in FHEM importiert und weitere angelegt (RPC HmIP-RF / RPC VirtualDevices // ein HMCCURPCPROC kann ich allerdings nicht finden (laut Doku)).

Nun zu meinem Problem: Ich bekomme den RPC-Server nicht zum laufen... Manuell per Update bekomme ich Werte von den HM-IP Geräten.
Habe auch gerade auf die neuste HMCCU-Version aktualisiert.


defmod HMCCU HMCCU https://homematic-raspi
attr HMCCU room HMCCU
attr HMCCU rpcserver on
attr HMCCU stateFormat rpcstate/state

setstate HMCCU inactive/OK
setstate HMCCU 2021-11-13 09:44:02 count_channels 65
setstate HMCCU 2021-11-13 09:44:02 count_devices 4
setstate HMCCU 2021-11-13 09:44:02 count_groups 0
setstate HMCCU 2021-11-13 09:44:02 count_interfaces 2
setstate HMCCU 2021-11-13 09:44:02 count_programs 1
setstate HMCCU 2021-11-13 09:44:02 rpcstate inactive
setstate HMCCU 2021-11-13 09:44:02 state OK


Fehlermeldung im Log / sie murmeln davon das es Probleme mit dem Server gibt

2021.11.13 09:56:09 2: HMCCU [HMCCU] RPC device for interface VirtualDevices: d_rpc188061VirtualDevices
2021.11.13 09:56:09 2: HMCCU [HMCCU] RPC device for interface HmIP-RF: d_rpc188061HmIP_RF
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server process started for interface VirtualDevices with PID=505861
2021.11.13 09:56:09 1: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server starting
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Initializing RPC server CB9292188052188061 for interface VirtualDevices
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server process started for interface HmIP-RF with PID=505862
2021.11.13 09:56:09 1: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server starting
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Initializing RPC server CB2010188052188061 for interface HmIP-RF
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Callback server CB9292188052188061 created. Listening on port 14702
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Callback server CB2010188052188061 created. Listening on port 7420
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] CB2010188052188061 accepting connections. PID=505862
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server CB2010188052188061 enters server loop
2021.11.13 09:56:09 4: HMCCU [HMCCU] Build URL = https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@192.168.188.61:42010
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Registering callback http://192.168.188.52:7420/fh2010 of type A with ID CB2010188052188061 at https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@192.168.188.61:42010
2021.11.13 09:56:09 4: HMCCU [HMCCU] Build URL = https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@192.168.188.61:42010
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] CB9292188052188061 accepting connections. PID=505861
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC request error RPC::XML::Client::simple_request: RPC::XML::Client::send_request: HTTP server error: Can't connect to [FHEM:xCQvQHpv$TFM]:443 (»Servname« wird für »ai_soctype« nicht unterstützt)
2021.11.13 09:56:09 1: HMCCURPCPROC [d_rpc188061HmIP_RF] Failed to register callback for ID CB2010188052188061
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server CB9292188052188061 enters server loop
2021.11.13 09:56:09 4: HMCCU [HMCCU] Build URL = https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@192.168.188.61:49292/groups
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Registering callback http://192.168.188.52:14702/fh9292 of type A with ID CB9292188052188061 at https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@192.168.188.61:49292/groups
2021.11.13 09:56:09 4: HMCCU [HMCCU] Build URL = https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@192.168.188.61:49292/groups
2021.11.13 09:56:09 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC request error RPC::XML::Client::simple_request: RPC::XML::Client::send_request: HTTP server error: Can't connect to [FHEM:xCQvQHpv$TFM]:443 (»Servname« wird für »ai_soctype« nicht unterstützt)
2021.11.13 09:56:09 1: HMCCURPCPROC [d_rpc188061VirtualDevices] Failed to register callback for ID CB9292188052188061
2021.11.13 09:56:09 4: HMCCU [HMCCU] Set rpcstate to error
2021.11.13 09:56:09 1: HMCCU [HMCCU] All RPC servers error
2021.11.13 09:56:34 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Checking if RPC server process is running
2021.11.13 09:56:34 1: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server process not running. Cleaning up
2021.11.13 09:56:34 1: HMCCURPCPROC [d_rpc188061VirtualDevices] Housekeeping called. Cleaning up RPC environment
2021.11.13 09:56:34 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Sending signal INT to RPC server process CB9292188052188061 with PID=505861
2021.11.13 09:56:34 2: HMCCURPCPROC [d_rpc188061VirtualDevices] CB9292188052188061 received signal INT
2021.11.13 09:56:34 1: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server CB9292188052188061 stopped handling connections. PID=505861
2021.11.13 09:56:34 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Number of I/O errors = 0
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server process CB9292188052188061 deleted
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Stop I/O handling
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server stopped. Cancel delayed shutdown.
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Checking if RPC server process is running
2021.11.13 09:56:36 1: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server process not running. Cleaning up
2021.11.13 09:56:36 1: HMCCURPCPROC [d_rpc188061HmIP_RF] Housekeeping called. Cleaning up RPC environment
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Sending signal INT to RPC server process CB2010188052188061 with PID=505862
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061HmIP_RF] CB2010188052188061 received signal INT
2021.11.13 09:56:36 1: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server CB2010188052188061 stopped handling connections. PID=505862
2021.11.13 09:56:36 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Number of I/O errors = 0
2021.11.13 09:56:38 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server process CB2010188052188061 deleted
2021.11.13 09:56:38 4: HMCCU [HMCCU] Set rpcstate to inactive
2021.11.13 09:56:38 1: HMCCU [HMCCU] All RPC servers inactive
2021.11.13 09:56:38 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Stop I/O handling
2021.11.13 09:56:38 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server stopped. Cancel delayed shutdown.


Meldungen wenn 'get xxx update' (erfolgreich) ausgelöst wurde.

2021.11.13 10:01:42 2: HMCCU [HMCCU] Updating 3 of 3 client devices matching devexp=.* filter=ccudevstate=active
2021.11.13 10:01:42 4: HMCCU [HMCCU] Build URL = https://FHEM:xCQvQHpv$TFM#SaDp#m!x;)PA@homematic-raspi:48181/tclrega.exe
2021.11.13 10:01:45 2: HMCCU [HMCCU] Can't get device description for 00019BE99E75DA  HMCCU_DetectDevice:7906 HMCCU_SetDefaultSCDatapoints:8025 HMCCU_GetSCDatapoints:4583 HMCCU_UpdateParamsetReadings:4791 HMCCU_UpdateMultipleDevices:9415 HMCCU_UpdateCB:3020 HMCCU_UpdateClients:1728 HMCCU_Get:3895 CallFn:2004 CommandGet:1265 AnalyzeCommand:2777 FW_fC:963 FW_answerCall:598 FW_Read:3895 CallFn:773
2021.11.13 10:01:45 2: HMCCU [HMCCU] Can't get device description for 002C1BE9996BBE  HMCCU_DetectDevice:7906 HMCCU_SetDefaultSCDatapoints:8025 HMCCU_GetSCDatapoints:4583 HMCCU_UpdateParamsetReadings:4791 HMCCU_UpdateMultipleDevices:9415 HMCCU_UpdateCB:3020 HMCCU_UpdateClients:1728 HMCCU_Get:3895 CallFn:2004 CommandGet:1265 AnalyzeCommand:2777 FW_fC:963 FW_answerCall:598 FW_Read:3895 CallFn:773
2021.11.13 10:01:45 2: HMCCU [HMCCU] Can't get device description for 0001DBE99157DA  HMCCU_DetectDevice:7906 HMCCU_SetDefaultSCDatapoints:8025 HMCCU_GetSCDatapoints:4583 HMCCU_UpdateParamsetReadings:4791 HMCCU_UpdateMultipleDevices:9415 HMCCU_UpdateCB:3020 HMCCU_UpdateClients:1728 HMCCU_Get:3895 CallFn:2004 CommandGet:1265 AnalyzeCommand:2777 FW_fC:963 FW_answerCall:598 FW_Read:3895 CallFn:773
2021.11.13 10:01:45 2: HMCCU [HMCCU] Update success=3 failed=0

zap

Hast Du die Firewall der CCU freigeschaltet wie im Wiki beschrieben?

Wenn nicht, mach das mal und starte FHEM neu.

Falls das nicht hilft:
Du verwendest HTTPS und Authentifizierung. Das ist zwar sehr sicher, aber vielleicht kannst Du es ja erst einmal ohne die Authentifizierung versuchen. Dazu in der CCU unter Einstellungen > Systemsteuerung > Sicherheit "Authentifizierung" ausschalten (das bezieht sich lediglich auf die RPC Schnittstelle, nicht die Weboberfläche).

Dann löschst Du Username/Password für das I/O Device in FHEM:

set HMCCU authentication

Dann speicherst Du die Config und startest FHEM mal neu.
2xCCU3, Fenster, Rollläden, Themostate, Stromzähler, Steckdosen ...)
Entwicklung: FHEM auf AMD NUC (Ubuntu)
Produktiv inzwischen auf Home Assistant gewechselt.
Maintainer: FULLY, Meteohub, HMCCU, AndroidDB

Wernieman

Und ist die VM direkt vom Hausnetz erreichbar, also eine HausNetz-IP?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

zap

Zitat von: Wernieman am 13 November 2021, 16:36:24
Und ist die VM direkt vom Hausnetz erreichbar, also eine HausNetz-IP?

Richtig, wenn die VM eigene IPs verwendet und "nattet", wird's kompliziert.
2xCCU3, Fenster, Rollläden, Themostate, Stromzähler, Steckdosen ...)
Entwicklung: FHEM auf AMD NUC (Ubuntu)
Produktiv inzwischen auf Home Assistant gewechselt.
Maintainer: FULLY, Meteohub, HMCCU, AndroidDB

TomHB

#4
Danke für eure Antworten...

@zap:
Ich hab nun für den Test alle Schotten auf gemacht:
Die Firewalls (FHEM-Server / homematic) aus, Authentifizierung  aus.
Vorsichtshalber noch mal librpc-xml-perl und RPC::XML (über)installiert.
Ich habe nach dem Wiki nun auch das ccuflags:procrpc  und rpcinterfaces:HmIP-RF,VirtualDevices zusätzlich gesetzt.

Der "Erfolg" ist, das nun der RPC-Server manuell gestartet werden kann, allerdings kommt er beim FHEM-Neustart immer noch nicht mit hoch.


@Wernieman/zap:
Die VM hängt im gleich LAN.


defmod HMCCU HMCCU https://homematic-raspi
attr HMCCU DbLogExclude .*
attr HMCCU ccuflags procrpc
attr HMCCU room HMCCU
attr HMCCU rpcinterfaces HmIP-RF,VirtualDevices
attr HMCCU rpcserver on
attr HMCCU stateFormat rpcstate/state
attr HMCCU verbose 5

setstate HMCCU running/OK
setstate HMCCU 2021-11-14 09:04:30 count_channels 65
setstate HMCCU 2021-11-14 09:04:30 count_devices 4
setstate HMCCU 2021-11-14 09:04:30 count_groups 0
setstate HMCCU 2021-11-14 09:04:30 count_interfaces 2
setstate HMCCU 2021-11-14 09:04:30 count_programs 1
setstate HMCCU 2021-11-14 09:07:41 rpcstate running
setstate HMCCU 2021-11-14 09:07:41 state OK




2021.11.14 09:07:31 2: HMCCU [HMCCU] RPC device for interface HmIP-RF: d_rpc188061HmIP_RF
2021.11.14 09:07:31 2: HMCCU [HMCCU] RPC device for interface VirtualDevices: d_rpc188061VirtualDevices
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server process started for interface HmIP-RF with PID=616792
2021.11.14 09:07:31 1: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server starting
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Initializing RPC server CB2010188052188061 for interface HmIP-RF
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server process started for interface VirtualDevices with PID=616793
2021.11.14 09:07:31 1: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server starting
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Initializing RPC server CB9292188052188061 for interface VirtualDevices
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Callback server CB2010188052188061 created. Listening on port 7420
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] CB2010188052188061 accepting connections. PID=616792
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server CB2010188052188061 enters server loop
2021.11.14 09:07:31 4: HMCCU [HMCCU] Build URL = https://192.168.188.61:42010
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] Registering callback http://192.168.188.52:7420/fh2010 of type A with ID CB2010188052188061 at https://192.168.188.61:42010
2021.11.14 09:07:31 4: HMCCU [HMCCU] Build URL = https://192.168.188.61:42010
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Callback server CB9292188052188061 created. Listening on port 14702
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061VirtualDevices] CB9292188052188061 accepting connections. PID=616793
2021.11.14 09:07:31 1: HMCCURPCPROC [d_rpc188061HmIP_RF] RPC server CB2010188052188061 running
2021.11.14 09:07:31 1: HMCCURPCPROC [d_rpc188061HmIP_RF] Scheduled CCU ping every 300 seconds
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server CB9292188052188061 enters server loop
2021.11.14 09:07:31 4: HMCCU [HMCCU] Build URL = https://192.168.188.61:49292/groups
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061VirtualDevices] Registering callback http://192.168.188.52:14702/fh9292 of type A with ID CB9292188052188061 at https://192.168.188.61:49292/groups
2021.11.14 09:07:31 4: HMCCU [HMCCU] Build URL = https://192.168.188.61:49292/groups
2021.11.14 09:07:31 2: HMCCURPCPROC [d_rpc188061HmIP_RF] CB2010188052188061 NewDevice received 69 device and channel specifications
2021.11.14 09:07:41 1: HMCCURPCPROC [d_rpc188061VirtualDevices] RPC server CB9292188052188061 running
2021.11.14 09:07:41 4: HMCCU [HMCCU] Set rpcstate to running
2021.11.14 09:07:41 1: HMCCU [HMCCU] All RPC servers running
2021.11.14 09:07:41 2: HMCCU [HMCCU] Updating 3 of 3 client devices matching devexp=.* filter=ccudevstate=active,ccuif=HmIP-RF|VirtualDevices
2021.11.14 09:07:41 4: HMCCU [HMCCU] Build URL = https://homematic-raspi:48181/tclrega.exe
2021.11.14 09:07:41 2: HMCCU [HMCCU] Can't get device description for 002C1BE9996BBE  HMCCU_DetectDevice:7912 HMCCU_SetDefaultSCDatapoints:8031 HMCCU_GetSCDatapoints:4583 HMCCU_UpdateParamsetReadings:4796 HMCCU_UpdateMultipleDevices:9439 HMCCU_UpdateCB:647 __ANON__:770
2021.11.14 09:07:41 2: HMCCU [HMCCU] Can't get device description for 0001DBE99157DA  HMCCU_DetectDevice:7912 HMCCU_SetDefaultSCDatapoints:8031 HMCCU_GetSCDatapoints:4583 HMCCU_UpdateParamsetReadings:4796 HMCCU_UpdateMultipleDevices:9439 HMCCU_UpdateCB:647 __ANON__:770
2021.11.14 09:07:41 2: HMCCU [HMCCU] Can't get device description for 00019BE99E75DA  HMCCU_DetectDevice:7912 HMCCU_SetDefaultSCDatapoints:8031 HMCCU_GetSCDatapoints:4583 HMCCU_UpdateParamsetReadings:4796 HMCCU_UpdateMultipleDevices:9439 HMCCU_UpdateCB:647 __ANON__:770
2021.11.14 09:07:41 2: HMCCU [HMCCU] Update success=3 failed=0

zap

Wenn Du noch das Attribut rpcserver auf on setzt, sollte er automatisch starten
2xCCU3, Fenster, Rollläden, Themostate, Stromzähler, Steckdosen ...)
Entwicklung: FHEM auf AMD NUC (Ubuntu)
Produktiv inzwischen auf Home Assistant gewechselt.
Maintainer: FULLY, Meteohub, HMCCU, AndroidDB

TomHB


TomHB

Nun, aus Mangel habe ich mich nun entschieden einen Notify zu verwenden:


defmod n_HMCCU_RPC_Server_starten_nachNeustart notify global:INITIALIZED.* {\
print strftime("%Y.%m.%d %H:%M:%S", localtime)," :n_HMCCU_RPC_Server_starten_nachNeustart - verzögerter Start in 15 Sekunden... ","\n";; \
fhem("sleep 15;;set HMCCU rpcserver on");;\
}


Das funktioniert wenigstens.

zap

Scheint ein Problem zu sein, wenn man delayedinit verwendet
2xCCU3, Fenster, Rollläden, Themostate, Stromzähler, Steckdosen ...)
Entwicklung: FHEM auf AMD NUC (Ubuntu)
Produktiv inzwischen auf Home Assistant gewechselt.
Maintainer: FULLY, Meteohub, HMCCU, AndroidDB

TomHB

delayedinit hatte ich nicht verwendet.

Nach dem Neueinrichten mit der neuen Version ging später auch der autom. RPC-Start wieder.