Hubot Integration - abhinav-jhanwar/devilbot GitHub Wiki
Requires plugin: webbridge_hubot
Hubot integration is experimental! So expect things to break
- 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 cloneit)
- Both hubot and hangoutsbot should run on the same server to reduce network connectivity issues
-
git cloneALL 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.coffeewithhubot-web/index.coffeefrom the forked version -
You will now add a custom sink configuration by modifying your hangoutsbot
config.json. As like [any other sink] (https://github.com/hangoutsbot/hangoutsbot/wiki/Sinks-(2.4-and-above)#configuring-sinks), 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.