XMPP Actions

This set of actions allows you to send a message to an XMPP user or multi-user chat, or send a message with an attachment to an XMPP user.


  • sendXMPP(String to, String message): Sends a message to an XMPP user
  • sendXMPP(String to, String message, String attachmentUrl): Sends a message with an attachment to an XMPP user
  • chatXMPP(String message): Sends a message to a multi user chat


The XMPP Action service can be configured in services/xmpp.cfg.

Property Default Required Description
username     The username of the XMPP account used by openHAB. Most services will require that you use only the localpart of the account’s JID. For example if your accounts JID is [email protected], then only configure myuser.
password     The password of the XMPP account used by openHAB
servername     The XMPP service to use, e.g. jabber.de. A list of public XMPP services can be found at https://xmpp.net/directory.php
securitymode disabled No The Security mode used for the XMPP connection. Can be either required 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.
tlspin     The TLS Pin used to verify the XMPP service’s certificate. Set this in case openHAB’s default SSLContext is unable to verfiy it (e.g. because the XMPP service uses a self-signed certificate). The PIN value is bascially the hash of the certificate in hexadecimal notation. You have to set securitymode to required to enable TLS for XMPP connections. For information on how to generate the PIN visit https://github.com/Flowdalic/java-pinning . Example: tlspin=CERTSHA256:83:F9:17:1E:06:A3:13:11:88:89:F7:D7:93:02:BD:1B:7A:20:42:EE:0C:FD:02:9A:BF:8D:D0:6F:FA:6C:D9:D3
proxy     The XMPP Proxyserver to use, e.g. gmail.com
port 5222   The server port to use
consoleusers     A comma-separated list of users that are allowed to use the XMPP console
chatroom     The multi user chat to join, e.g. [email protected]
chatnickname openhab-bot No The nickname used in the multi-user chat
chatpassword     The password required to join the multi user chat

Note: openHAB does not resolve SRV entries like other XMPP clients do, you have to setup the server details manually. Generally, if [email protected] is your XMPP user ID and xmpp.example.net points to the server running the service, set servername to the actual server xmpp.example.net, the user name username to joe and proxy to the domain name part of your user ID example.org.

Example: Google

# You need this "tlspin" if openhab cannot verify the certificat from the google server
[email protected]
# you may need to add the cryptic talk.google.com address of your private google account to the allowed users
# check you openhab.log to found the address after you send something via Hangouts to your openHAB account
consoleusers=**cryptic**@public.talk.google.com,[email protected]