1. Oct 25th, 2011

    Hubot does HipChat

    To use Hubot with HipChat you’ll first need to create a new account for your ‘bot. HipChat requires  that all accounts have first name, last name (sigh). We called ours “Hubot, I”, but inside HipChat always use @hubot.

    Once you have an account, and while signed in to that account, head to the XMPP/Jabber account information page and get the Jabber ID, and Room nickname.

    You will also need an admin API authentication token (used to list all rooms and users), which you can get from the Group Admin API page.

    Now set these four environment variables and start Hubot:

    export HUBOT_HIPCHAT_JID=<Jabber ID>
    export HUBOT_HIPCHAT_NAME=<Room nickname>
    export HUBOT_HIPCHAT_PASSWORD=<Account password>
    export HUBOT_HIPCHAT_TOKEN=<Admin authentication token>
    bin/hubot -a hipchat

    Hubot will be available in all rooms, where you can refer to it as @hubot. You can also have a private conversation with Hubot, in which case just chat with it directly.

    Enjoy.

    1. Oct 26th, 2011

      David John

      Awesome :)

    2. Oct 26th, 2011

      ehmo

      Thanks, very helpful. Unfortunately, our hubot doesn’t get the list of people and rooms
      GET /v1/rooms/list null
      GET /v1/users/list null

      He is trying to join but not really joining the rooms. Any idea?

      Thanks again

    3. Oct 26th, 2011

      Assaf

      @ehmo you need to set the HUBOT_HIPCHAT_TOKEN to authentication token that has Admin role, not Notification.

    4. Oct 27th, 2011

      ehmo

      @Assaf yes I figured it out. Without it hubot will crash. But with admin right hubot doesn’t connect anyway. He is still waiting or something.

    5. Oct 27th, 2011

      Assaf

      Connecting is done over XMPP, so requires JID, name and password. And it will fail silently if either is wrong, or, if someone else is already logged in to the same account.

    6. Oct 27th, 2011

      ehmo

      Yes, I do understand that. Hubot connects correctly, I can see him online in the hipchat dashboard but he doesn’t join the room. So he stops probably here (hipchat.coffee) “bot.join room.xmpp_jid”. I tried to define one room only with no success. But when I tried to use this script https://gist.github.com/940969 everything works fine.

      I tried to change the name, create new account, but nothing works. So maybe there is another issue.

      Anyway thanks for your help

    7. Oct 27th, 2011

      Joël Perras

      @ehmo Try manually enabling the ‘debug’ flag in the ‘wobot’ module that should be residing in hubot/node_modules: https://github.com/cjoudrey/wobot/blob/master/lib/bot.js#L128

      That should dump out quit a bit of XML the next time you run hubot, but there should be some information in there as to why it’s not able to join rooms properly.

      I’d be willing to bet that your bot name doesn’t match up with what you have registered for that account, but there could be any number of issues.

    Your comment, here ⇓