DEPRECATED: Please use https://github.com/marksull/err-backend-cisco-webex-teams
This is an errbot (http://errbot.io) backend for Cisco Spark (https://www.ciscospark.com)
This backend is currently under development.
git checkout https://github.com/marksull/err-backend-cisco-spark.git
To your errbot config.py file add the following:
BACKEND = 'CiscoSpark'
BOT_EXTRA_BACKEND_DIR = '/path_to/err-backend-cisco-spark'
To configure the bot you will need:
-
A Bot TOKEN. If you don't already have a bot setup on Cisco Spark details can be found here (https://developer.ciscospark.com/bots.html)
-
An Internet reachable URL for the Webhook. Spark uses a Spark initiated Webhooks to notify of any events. As a result the URL you provide must be reachable from the net. For testing/evaluation (http://ngrok.com) is a fantastic tool to expose a single port on a private device to Spark.
-
A webhook secret pass phrase (free text of your choosing). This secret will be included when the errbot webhooks are created and then used to validate and webhooks initiated from Spark. Further details can be found here: (https://communities.cisco.com/community/developer/spark/blog/2016/07/25/using-a-webhook-secret)
BOT_IDENTITY = {
'TOKEN': '<insert your token in here>x',
'WEBHOOK_DESTINATION': 'http://<your-host.some.domain>/',
'WEBHOOK_SECRET': '<insert your webhook pass phrase in here>'
}
As the backend starts, for each room listed in CHATROOM_PRESENCE it will automatically:
- Send a room join request
- Create a webhook
Once the backend shuts down, all created webhooks will be cleaned up.
When configuring CHATROOM_PRESENCE use the Spark ID for each room. For example, your config.py might look like:
DEV_ROOM = 'Y2lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1'
MY_ROOM = 'Y2lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2'
CHATROOM_PRESENCE = (DEV_ROOM, MY_ROOM)
This backend requires:
-
The errbot plugin err-webhook-cisck-spark (https://github.com/marksull/err-webhook-cisco-spark).
-
The library cmlCiscoSparkSDK (https://github.com/cmlccie/cmlCiscoSparkSDK)
cmlCiscoSparkSDK uses versioneer to version the package but unfortunately this has not worked reliably for me in later versions of pip. As per the recommendations on versioneer (https://github.com/warner/python-versioneer) install cmlCiscoSparkSDK with the following command as a workaround:
pip install --editable .
I unrestrainedly plagiarized from most of the already existing errbot backends.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D