Skip to content
Innocent Bystander edited this page May 4, 2017 · 11 revisions

Requires plugin: [ver=2.x.x] webbridge_hubot / [ver>=3.0.0] hubot

  • plugin has been experimental for a long time - expect things to break!
  • support is limited, as hubot integration does not seem to be a popular topic

Requirements

  • A functional version of hubot. Configuring this is beyond the scope of this document. Please refer to the installation instructions on the GitHub repo.
  • A functional copy of hangoutsbot with the webbridge_hubot plugin activated
  • A copy of the forked hubot-web adapter (git clone it)

Recommendations

  • Both hubot and hangoutsbot should run on the same server to reduce network connectivity issues

Setup

  1. git clone ALL THE THINGS (as usual).

  2. Proceed to your hubot folder, and execute npm install hubot-web - this acquires the dependencies for hubot-web and installs the npm version (which we will modify shortly).

  3. Important: Overwrite the installed version of hubot/node_modules/hubot-web/index.coffee with hubot-web/index.coffee from the forked version

  4. You will now add a custom sink configuration by modifying your hangoutsbot config.json. As like any other sink, you will need to replace <path to .pem file> with the actual path to your PEM file (a self-signed one will do!). You will also have to add the conversation id(s) ("<conv id>") you want hubot to monitor. You can identify the conversation id of a chat by using /bot whereami. Add the following key (with the appropriate configuration) into config.json:

    "hubot": [
      {
        "certfile": "<path to .pem file>",
        "name": "127.0.0.1",
        "port": 8081,
        "synced_conversations": [
          "<conv id>",
          "<conv id>"
        ],
        "HUBOT_URL": "http://127.0.0.1:8080/receive/"
      }
    ]
  5. On the console in the hubot server, use the following configuration:

export HUBOT_HTML_RESPONSE="true"
export HUBOT_REST_SEND_URL="https://127.0.0.1:8081/"
  1. Restart hubot with bin/hubot --adapter web. You will not get a shell prompt, the server will just start and become non-interactive.
  2. Restart hangupsbot, and ensure that the new sink and hook starts properly.

Testing

Open your hangout with hangupsbot, and type a standard hubot command e.g. hubot time, hubot ping. After a brief lag, you should see hubot's responses in the hangout.

Clone this wiki locally