[0.8.0-3085] Kommunikation mit openHAB funktioniert nicht mehr mit externer Adresse

Ich habe heute festgestellt, dass openHAB nicht mehr mit Homegear kommunizieren kann. Im Log finde ich immer den gleichen Zyklus:

09/28/20 21:47:20.676 Info: Client with IP 10.10.10.30 is calling "init".
09/28/20 21:47:20.677 Info: Adding server "binary://10.10.10.30".
09/28/20 21:47:20.677 Info: Settings for host "10.10.10.30" found in "rpcclients.conf".
09/28/20 21:47:20.677 Info: Calling init methods on server "binary://10.10.10.30".
09/28/20 21:47:20.763 No CA certificates specified (2). Removing server. Server has to send "init" again.
09/28/20 21:47:35.692 Info: Client with IP 10.10.10.30 is calling "init".
09/28/20 21:47:35.692 Info: Removing server "binary://10.10.10.30".

Ich habe schon in rpcservers.conf rumgebastelt, das hat aber nicht geholfen:

[OpenHAB]
hostname = 10.10.10.30
timeout = 30000
retries = 1
forceSSL = false
authType = none
verifyCertificate = false

Weiss jemand, seit wann da etwas geändert wurde?

So, habe es rausgefunden.

  • 0.8.0-3069 (20200819) => gleiches Fehlerbild
  • 0.8.0-3067 (20200814) => Kommunikation funktioniert wieder

Jetzt wäre noch zu klären, wie man mit Versionen > 0.8.0-3067 die Verbindung zu openHAB wieder aufbauen kann.

2 Likes

Funktioniert bei jemandem mit einer Version > 0.8.0-3067 die Verbindung zu openHAB? Oder bin ich der einzige mit dieser Konstellation?

Niemand? Wirklich?

Sorry, ich fuer meinen Teil hab nur pure Homegear hier :no_mouth:

– Micha

1 Like

Ja, bei denen die regelmäßig hier posten, weiss ich das ja. Mich wundert nur, dass regelmässig irgendwelche Fragen zu openHAB/openHabian kommen, aber anscheinend das niemand einsetzt. Oder die Fragesteller reagieren nur auf ihre eigenen Threads. :frowning:

1 Like

Hi Job,

Bin normalerweise auch immer dabei sowas zu testen, aber ich habe vor einiger Zeit meine Homegear Installation von einer VM auf einen RockPi4 umgezogen, mich aber noch nicht ganz damit angefreundet. Deswegen bin ich aktuell noch nicht ganz so “probierfreudig” wie mit meiner VM vorher, wo ich nach Belieben Snapshots machen konnte. Deswegen habe ich schon länger kein Update auf ein neues Nightly gemacht und aktuell läuft bei mir die 0.8.0-2942. Bei mir ist beruflich wegen dem lieben Corona-Dreck auch bisschen “Land unter”, weswegen mir gerade auch ein bisschen die Zeit für das Thema fehlt. Ich schaue mal ob ich am Wochenende Zeit finde, die aktuelle Version zu testen. Aber zuletzt bin ich an der Einführung von Int64 bei einigen Variablen seitens Homegear gescheitert, aber mittlerweile gibt es dafür wohl ein aktualisiertes Binding für OpenHAB.

Kleine Ergänzung:
Das war der Thread im OH-Forum zu dem oben genannten Problem mit Int64:
Binding fails to parse device description from homegear
Vielleicht hilft dir das auch schon weiter, aber das Problem besteht schon mindestens seit 0.8.3031, weswegen ich damals auf -2942 zurĂĽck bin, mit der das Binding kein Trouble hatte.

GruĂź Andreas

3 Likes

Ich nutze 0.8.0-3085 - damit funktioniert die Kommunikation zu OpenHab bei mir

1 Like

Danke @Andreas.Fink und @rolandw

@rolandw, könntest du mir deine rpcservers.conf zeigen, falls Passwörter drin sind brauche ich die nicht, es geht halt nur darum, was eingestellt werden muss.

Da habe ich glaube ich alles auf default gelassen - also da das noch ein Testsystem ist, ist das nicht abgesichert:

#[FamilyRPCServer]

# Enable Family RPC server. If you want to listen on other addresses than
# localhost, you need to enable SSL and authentication. Otherwise the server
# won't start. WebSocket, Webserver and REST server are disabled.
#familyServer = true

# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
#interface = ::1

# The port number to bind the RPC server to. This setting is mandatory.
#port = 2000

# Enable Homegear's XML-RPC and binary RPC server on this port. 
# Default: true
#xmlrpcServer = true

# Enable Homegear's JSON-RPC server on this port. 
# Default: true
#jsonrpcServer = true

# Set ssl to "true" to enable SSL support
#ssl = false

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
#authType = none

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
#validGroups = 1

[RPCServer1]
# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
interface = ::

# The port number to bind the RPC server to. This setting is mandatory.
port = 2001

# Enable Homegear's XML-RPC and binary RPC server on this port. 
# Default: true
xmlrpcServer = true

# Enable Homegear's JSON-RPC server on this port. 
# Default: true
jsonrpcServer = true

# Enable Homegear's build-in web server on this port
# Default: false
webServer = true

# Enable Homegear's REST server on this port
# Default: false
restServer = true

# Path to static web content used by the web server
# Default: /var/lib/homegear/www
contentPath = /var/lib/homegear/www/rpc

# Default: contentPathPermissions = 550
# contentPathPermissions = 550

# Default: contentPathUser =
# contentPathUser = homegear

# Default: contentPathGroup =
# contentPathGroup = homegear

# Enable Homegear's build-in WebSocket server on this port
# WARNING: Enabling Websockets without authentication is a high security risk!
# So make sure, webSocketAuthType is not set to none!
# Default: false
webSocket = true

# Set ssl to "true" to enable SSL support
ssl = false

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
authType = none

# You can specify the websocket authentication type here. Never ever use basic auth
# over an unencrypted connection!
# Can be one of the following: none, basic, session
# "session" checks for the PHP session variable "authorized", which must be set to
# "true" for the authentication to succeed.
# Default: webSocketAuthType = session
webSocketAuthType = session

# Set to the number of seconds, assets (CSS files, JS files, images, ...) should be cached by the browser.
# "0" disables the caching.
# Default: cacheAssets = 2592000
cacheAssets = 2592000

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
validGroups = 1

[RPCServer2]
# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
interface = ::

# The port number to bind the RPC server to. This setting is mandatory.
port = 2002

# Enable Homegear's XML-RPC and binary RPC server on this port. 
# Default: true
xmlrpcServer = true

# Enable Homegear's JSON-RPC server on this port. 
# Default: true
jsonrpcServer = true

# Enable Homegear's build-in web server on this port
# Default: false
webServer = true

# Enable Homegear's REST server on this port
# Default: false
restServer = true

# Path to static web content used by the web server
# Default: /var/lib/homegear/www
contentPath = /var/lib/homegear/www/rpc

# Default: contentPathPermissions = 550
# contentPathPermissions = 550

# Default: contentPathUser = 
# contentPathUser = homegear

# Default: contentPathGroup = 
# contentPathGroup = homegear

# Enable Homegear's build-in WebSocket server on this port
# WARNING: Enabling Websockets without authentication is a high security risk!
# Default: false
webSocket = true

# Set ssl to "true" to enable SSL support
ssl = true

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
authType = none

# You can specify the websocket authentication type here. Never ever use basic auth
# over an unencrypted connection!
# Can be one of the following: none, basic, session
# "session" checks for the PHP session variable "authorized", which must be set to
# "true" for the authentication to succeed.
# Default: webSocketAuthType = session
webSocketAuthType = session

# Needed for client certificate login
# Default: caPath = /etc/homegear/homegearca.crt
caPath = /etc/homegear/ca/cacert.pem

# Default: certPath = /etc/homegear/homegear.crt
certPath = /etc/homegear/homegear.crt

# Default: keyPath = /etc/homegear/homegear.key
keyPath = /etc/homegear/homegear.key

# Default: dhParamPath = /etc/homegear/dh1024.pem
dhParamPath = /etc/homegear/dh1024.pem

# Set to the number of seconds, assets (CSS files, JS files, images, ...) should be cached by the browser.
# "0" disables the caching.
# Default: cacheAssets = 2592000
cacheAssets = 2592000

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
validGroups = 1

[RPCServer3]
# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
interface = ::

# The port number to bind the RPC server to. This setting is mandatory.
port = 2003

# Enable Homegear's XML-RPC and binary RPC server on this port. 
# Default: true
xmlrpcServer = true

# Enable Homegear's JSON-RPC server on this port. 
# Default: true
jsonrpcServer = true

# Enable Homegear's build-in web server on this port
# Default: false
webServer = true

# Enable Homegear's REST server on this port
# Default: false
restServer = true

# Path to static web content used by the web server
# Default: /var/lib/homegear/www
contentPath = /var/lib/homegear/www/rpc

# Default: contentPathPermissions = 550
# contentPathPermissions = 550

# Default: contentPathUser = 
# contentPathUser = homegear

# Default: contentPathGroup = 
# contentPathGroup = homegear

# Enable Homegear's build-in WebSocket server on this port
# Default: false
webSocket = true

# Set ssl to "true" to enable SSL support
ssl = true

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
authType = basic, cert

# You can specify the websocket authentication type here. Never ever use basic auth
# over an unencrypted connection!
# Can be one of the following: none, basic, session
# "session" checks for the PHP session variable "authorized", which must be set to
# "true" for the authentication to succeed.
# Default: webSocketAuthType = session
webSocketAuthType = session

# Needed for client certificate login
# Default: caPath = /etc/homegear/homegearca.crt
caPath = /etc/homegear/ca/cacert.pem

# Default: certPath = /etc/homegear/homegear.crt
certPath = /etc/homegear/homegear.crt

# Default: keyPath = /etc/homegear/homegear.key
keyPath = /etc/homegear/homegear.key

# Default: dhParamPath = /etc/homegear/dh1024.pem
dhParamPath = /etc/homegear/dh1024.pem

# Set to the number of seconds, assets (CSS files, JS files, images, ...) should be cached by the browser.
# "0" disables the caching.
# Default: cacheAssets = 2592000
cacheAssets = 2592000

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
validGroups = 1

[RPCServer4]
# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
interface = ::1

# The port number to bind the RPC server to. This setting is mandatory.
port = 2004

# Enable Homegear's XML-RPC and binary RPC server on this port.
# Default: true
xmlrpcServer = true

# Enable Homegear's JSON-RPC server on this port.
# Default: true
jsonrpcServer = true

# Enable Homegear's build-in web server on this port
# Default: false
webServer = true

# Enable Homegear's REST server on this port
# Default: false
restServer = true

# Path to static web content used by the web server
# Default: /var/lib/homegear/www
contentPath = /var/lib/homegear/www/rpc

# Default: contentPathPermissions = 550
# contentPathPermissions = 550

# Default: contentPathUser =
# contentPathUser = homegear

# Default: contentPathGroup =
# contentPathGroup = homegear

# Enable Homegear's build-in WebSocket server on this port
# WARNING: Enabling Websockets without authentication is a high security risk!
# So make sure, webSocketAuthType is not set to none!
# Default: false
webSocket = true

# Set ssl to "true" to enable SSL support
ssl = false

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
authType = none

# You can specify the websocket authentication type here. Never ever use basic auth
# over an unencrypted connection!
# Can be one of the following: none, basic, session
# "session" checks for the PHP session variable "authorized", which must be set to
# "true" for the authentication to succeed.
# Default: webSocketAuthType = session
webSocketAuthType = session

# Set to the number of seconds, assets (CSS files, JS files, images, ...) should be cached by the browser.
# "0" disables the caching.
# Default: cacheAssets = 2592000
cacheAssets = 2592000

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
validGroups = 1

#[WebServer1]
# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
#interface = ::

# The port number to bind the RPC server to. This setting is mandatory.
#port = 80

# Enable Homegear's rpc server on this port
# Default: true
#rpcServer = false

# Enable Homegear's build-in web server on this port
# Default: false
#webServer = true

# Enable Homegear's REST server on this port
# Default: false
#restServer = true

# Path to static web content used by the web server
# Default: /var/lib/homegear/www
#contentPath = /var/lib/homegear/www

# Default: contentPathPermissions = 550
# contentPathPermissions = 550

# Default: contentPathUser = 
# contentPathUser = homegear

# Default: contentPathGroup =
# contentPathGroup = homegear

# Enable Homegear's build-in WebSocket server on this port
# WARNING: Enabling Websockets without authentication is a high security risk!
# So make sure, webSocketAuthType is not set to none!
# Default: false
#webSocket = true

# Set ssl to "true" to enable SSL support
#ssl = false

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
#authType = none

# You can specify the websocket authentication type here. Never ever use basic auth
# over an unencrypted connection!
# Can be one of the following: none, basic, session
# "session" checks for the PHP session variable "authorized", which must be set to
# "true" for the authentication to succeed.
# Default: webSocketAuthType = session
#webSocketAuthType = session

# Set to the number of seconds, assets (CSS files, JS files, images, ...) should be cached by the browser.
# "0" disables the caching.
# Default: cacheAssets = 2592000
cacheAssets = 2592000

# Redirect HTTP requests to this address
# redirectTo = https://myserver.com

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
#validGroups = 1

#[WebServer2]
# Interface to bind the RPC server to. By default IPv4 and IPv6 are
# enabled. If you want to only use IPv4 set "interface" to "0.0.0.0".
# Default: interface = ::
#interface = ::

# The port number to bind the RPC server to. This setting is mandatory.
#port = 443

# Enable Homegear's rpc server on this port
# Default: true
#rpcServer = false

# Enable Homegear's build-in web server on this port
# Default: false
#webServer = true

# Enable Homegear's REST server on this port
# Default: false
#restServer = true

# Path to static web content used by the web server
# Default: /var/lib/homegear/www
#contentPath = /var/lib/homegear/www

# Default: contentPathPermissions = 550
# contentPathPermissions = 550

# Default: contentPathUser = 
# contentPathUser = homegear

# Default: contentPathGroup =
# contentPathGroup = homegear

# Enable Homegear's build-in WebSocket server on this port
# WARNING: Enabling Websockets without authentication is a high security risk!
# So make sure, webSocketAuthType is not set to none!
# Default: false
#webSocket = true

# Set ssl to "true" to enable SSL support
#ssl = true

# You can specify the authentication types you want to enable here.
# Can be one or more of the following (seperated by ","):
# - none: No authentication is required
# - basic: Use basic authentication
# - cert: Use certificate authentication (only works when "ssl" is "true")
# Default: authType = cert
#authType = none

# You can specify the websocket authentication type here. Never ever use basic auth
# over an unencrypted connection!
# Can be one of the following: none, basic, session
# "session" checks for the PHP session variable "authorized", which must be set to
# "true" for the authentication to succeed.
# Default: webSocketAuthType = session
#webSocketAuthType = session

# Needed for client certificate login
# Default: caPath = /etc/homegear/homegearca.crt
#caPath = /etc/homegear/ca/cacert.pem

# Default: certPath = /etc/homegear/homegear.crt
#certPath = /etc/homegear/homegear.crt

# Default: keyPath = /etc/homegear/homegear.key
#keyPath = /etc/homegear/homegear.key

# Default: dhParamPath = /etc/homegear/dh1024.pem
#dhParamPath = /etc/homegear/dh1024.pem

# Set to the number of seconds, assets (CSS files, JS files, images, ...) should be cached by the browser.
# "0" disables the caching.
# Default: cacheAssets = 2592000
cacheAssets = 2592000

# Comma separated list of accepted group IDs. Only relevant when authType is specified.
#validGroups = 1
2 Likes

Danke, das wars wohl. Ich habe immer über die externe Adresse zugegriffen, da ich openHAB manchmal auf einem amd64 server laufen lasse, wegen dem Resourcenhunger. Umstellung auf localhost (127.0.0.1) hat es ermöglicht.

Das sollte mit einem grossen Ausrufezeichen irgendwo vermerkt sein.

Achso, openHAB kann auf Homematic/Homegear nicht mit Authentifizierung zugreifen, das ist meines Wissens im Binding nicht implementiert.

4 Likes

Oh, das ist ja sehr unschön für mich. Bei mir läuft Homegear und OpenHAB auf getrennten Systemen. Homegear läuft bereits auf einem RockPi 4 mit 4GB RAM, OpenHAB aktuell auf einer VM auf einem VMware ESXi auf MacMini Basis, soll aber demnächst auf einem 2. RockPi 4 mit 4GB RAM laufen. Damit bekomme ich zwangsläufig Probleme mit der Kommunikation zwischen OpenHAB und Homegear.

Kann man diese Zwangsauthentifizierung irgendwie seitens Homegear abschalten bis das OH Binding Authentifizierung beherrscht?

1 Like

Ich glaube nicht, dass das ĂĽberhaupt angedacht ist. Abgeschaltete Authentifizierung ist laut Binding Dokumentation eine Voraussetzung fĂĽr das Homematic Binding.

Kurze Frage fuer mich als nicht-OpenHAB-User … warum benoetigt das OpenHAB-Binding den Family RPC-Server von Homegear? IIRC hat er nichts mit den “normalen” RCP-Servern zu tun, und diese lassen sich ohne Probleme auch ohne Authentifizierung betreiben :thinking:

– Micha

Hmm. Das liegt wohl an meiner Ahnungslosigkeit bzgl. der verschiedenen Homegear Server.
Gibt es irgendwo einen Beschreibung, wofĂĽr welcher Server gedacht ist?

Hier ist die Dokumentation des openHAB-Homematic-Bindings:

In meiner Installation und Konfiguration konnte ich halt erst wieder kommunizieren, als ich das Binding angewiesen habe ĂĽber 127.0.0.1 Verbindung aufzunehmen. Die externe Adresse von Homegear ist mit oben angegebenen Fehlerzyklus immer wider abgebrochen. Und zwar reproduzierbar ab Homegear 0.8.0-3069 (0.8.0-3067 war die letzte Version die funktioniert hat).

Zugegeben, wofuer der “Family-RPCServer” da ist weiss ich auch nicht :wink:

Der Rest sind halt die “normalen” RPC/RESTServer. Da kann man je nach Laune Authentisierung de-/aktivieren, bzw. an unterschiedliche Interfaces “binden”. Wir benutzen einen davon z.B. fuer unsere App … mir sind da grad keine Kommunikationsprobleme bekannt, aber die App kommuniziert auch nicht so intensiv wie OpenHAB.

– Micha

Der ist aktuell noch nicht fertig, aber dafür gedacht, Familienmodule per RPC anbinden zu können. Dadurch lassen sich Familienmodule in beliebigen Sprachen schreiben.

Funktioniert es über Port 2001? Auch hier ist es unschön, eine unverschlüsselte Verbindung zu verwenden, aber funktionieren sollte es.

Ich habe den Family-RPC-Server jetzt mal nach ganz unten in die Konfiguration gepackt und mit einem Kommentar ergänzt.

Es scheint aktuell, dass es an der Konfiguration in rpcclients.conf lag. Ich habe den betreffenden Block mal auskommentiert:

#[OpenHAB]
#hostname = 10.10.10.30
#timeout = 30000
#retries = 5
#forceSSL = false
#authType = none
#verifyCertificate = false

Das erzeugt folgendes Log:

==> /var/log/homegear/homegear.log <==

10/30/20 02:49:32.030 Info: Client with IP 10.10.10.30 is calling "init".
10/30/20 02:49:32.041 Info: Client with IP 10.10.10.30 is calling "init".
10/30/20 02:49:32.041 Info: Adding server "binary://10.10.10.30".
10/30/20 02:49:32.042 Info: Calling init methods on server "binary://10.10.10.30".
10/30/20 02:49:36.209 Debug: Adding method system.multicall
10/30/20 02:49:36.209 Debug: Adding method event
10/30/20 02:49:36.209 Debug: Adding method deleteDevices
10/30/20 02:49:36.209 Debug: Adding method newDevice

Die Fehlermeldung mit der CA erscheint nicht mehr. Die wichtigsten Parameter sollten eigentlich default sein, nur den Timeout hatte ich hochgesetzt.

1 Like

Hallo @job,

das war der entscheidende Hinweis. Natürlich sollte es funktionieren, nur timeout zu setzen. Der Fehler sollte im nächsten Nightly korrigiert sein.

Vielen Dank und viele GrĂĽĂźe

Sathya

1 Like