picogw-plugin-slack
v0.0.2
Published
Slack plugin of picogw
Downloads
2
Readme
This is a plugin module for PicoGW, a Home Automation and Building Automation devices gateway server, developed by Kanagawa Institute of Technology, Smart House Research Center, released under MIT license.
Plugin API
Slack plugin works after the bot token is specified to the settings. The token can be generated by:
- Log in to your slack team in your browser.
- Access https://[Your Team].slack.com/apps/A0F7YS25R-bots
- Click 'Add Configuration' link
- Set bot name (We recommend 'nanogw-[NanoGW Place]') and click 'Add Bot Integration'
- The token is shown in Integration Settings => API Token. Copy-paste it to NanoGW plugin's setting.
- Add this bot to your favorite channel(s).
GET|POST /v1/slack/post
with the parameter text to post to slack
SUB /v1/slack/[free string]
If there is a mention or a private message to this bot, the first word is recognized as a command and any following string becomes the parameter.
For example, if the API client subscribes /v1/slack/hello, a string is published when there is a mention such as @nanogw-bot hello slack!