-
Notifications
You must be signed in to change notification settings - Fork 272
Hubot Integration
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
- 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)
- Both hubot and hangoutsbot should run on the same server to reduce network connectivity issues
-
git clone
ALL THE THINGS (as usual). -
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). -
Important: Overwrite the installed version of
hubot/node_modules/hubot-web/index.coffee
withhubot-web/index.coffee
from the forked version -
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) intoconfig.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/" } ]
-
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/"
- Restart hubot with
bin/hubot --adapter web
. You will not get a shell prompt, the server will just start and become non-interactive. - Restart hangupsbot, and ensure that the new sink and hook starts properly.
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.
Plugin List | Developer Reference: [ Intro | Plugins | Sinks | In-built Functionality | Configuration ]