I have an issue which I have been trying to solve myself to no avail.
On OH1 I am using the XMPP action to communicate to Google Talk. It works without problems.
I moved the configuration to OH2 into a xmpp.cfg file which has the following contents:
########################## XMPP Action configuration ##################################
#
# The XMPP server to use, e.g. "jabber.org", "talk.google.com" or "talkx.l.google.com"
servername=talk.google.com
# The Security mode used for the XMPP connection. Can be either 'required', 'enabled'
# or 'disabled'. Defaults to 'disabled', which means that TLS will not be used.
# Warning: If you change this to non-disabled, then you must make sure that your
# TLS server certificate can be validated, otherwhise the connection will fail.
securitymode=required
# You need this "tlspin" if openhab cannot verify the certificate from the google server
tlspin=CERTSHA256:9e670d6624fc0c451d8d8e3efa81d4d8246ff9354800de09b549700e8d2a730a
# The XMPP Proxyserver to use, e.g. "gmail.com"
proxy=gmail.com
# the server port to use (optional, defaults to 5222)
#port=5222
# the username and password for the sending XMPP account
username=myusername@gmail.com
password=mynicepassword
# a comma separated list of users that are allowed to use the XMPP console
#consoleusers=
# the multi user chat to join, e.g. openhab@chat.example.com
#chatroom=
# the nickname used in the multi user chat (optional, defaults to openhab-bot)
#chatnickname=
# the password required to join the multi user chat
#chatpassword=
This configuration is similar to OH1 but it always gives me the following error: [WARN ] [rg.openhab.action.xmpp.internal.XMPP] - Could not send XMPP message as connection is not correctly initialised!
I don’t get anymore information if I set the log:level to DEBUG. It must have something to do with improper handshaking or not reading the TLS PIN from the config file.
So who has a working configuration on OH2?
Or any ideas what might work?
Update. Did see the following error as well in the log:
[WARN ] [rg.jivesoftware.smack.XMPPConnection] - Connection closed with error
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not pinned. Use 'CERTPLAIN:
Again, the xmpp.cfg does pin the tls cert needed to communicate with Google.