Configuring errbot presence in HipChat


Keywords:python 


Question: 

I'm trying to use Errbot with HipChat server (not cloud). It looks like Errbot is confused between a room name and its xmpp jid. For example, testing with room named BotTest that has jid of 1_bottest@conf.btf.hipchat.com:

  • When I set CHATROOM_PRESENCE to the room name and send any message in that room, Errbot crashes with the error "Room '1_bottest@conf.btf.hipchat.com' not found".
  • When I set it instead to the room's jid, Errbot creates a new room with the same name as the jid, and a jid of '1_1_bottestconf.btf.hipchat.com@conf.btf.hipchat.com'. Then when I send a message in that new room it crashes with the error "Room '1_1_bottestconf.btf.hipchat.com@conf.btf.hipchat.com' not found".

My config.py is below:

import logging
BACKEND = 'XMPP'  # defaults to XMPP
BOT_DATA_DIR = r'/auto/home.nas03/eeshel/work/errbot/data'
BOT_EXTRA_PLUGIN_DIR = '/auto/home.nas03/eeshel/work/errbot/plugins'
BOT_LOG_FILE = r'/auto/home.nas03/eeshel/work/errbot/errbot.log'
BOT_LOG_LEVEL = logging.DEBUG
TEXT_COLOR_THEME = 'dark'
BOT_ADMINS = ('1_8@chat.btf.hipchat.com', )
BOT_PREFIX = '\\'
BOT_ALT_PREFIXES = ('Hermes',)
BOT_ALT_PREFIX_SEPARATORS = (':', ',', ';')
BOT_ALT_PREFIX_CASEINSENSITIVE = True
CHATROOM_FN = 'Hermes the Bot'
CHATROOM_PRESENCE = ('1_bottest@conf.btf.hipchat.com',)
BOT_IDENTITY = {
    'username' : '1_2@hipchat.eng.<ourdomain>',
    'password' : '*****',
    'token'    : '*****',
    'endpoint' : '10.18.0.185',
}
XMPP_KEEPALIVE_INTERVAL = 60
XMPP_USE_IPV6 = False
XMPP_CA_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt"

1 Answer: 

You can refer below link ,which will help you