Gateway running on Heroku for routing Slash command requests to Particle.io and Blynk.cc devices.
From Slack:
/particle on
/particle off
/particle value
/blynk on
/blynk off
/blynk value
Clone this repo:
$ git clone https://github.com/pambrose/slack-gateway.git
$ cd slack-gateway
Install Heroku CLI with:
$ brew install heroku
Create Heroku app with:
$ heroku create app-name
The Slack /blynk command is mapped to a POST on https://slack-gateway.herokuapp.com/blynk and the /particle command is mapped to a POST on https://slack-gateway.herokuapp.com/particle.
The sketch for the Photon sets the LED to D0.
The Blynk device is a SparkFun Blynk Board. The LED in this example is the onboard LED at D5.
Assign slack.token, particle.token, and blynk.token values as Heroku Config Vars or in application.conf.
Deploy the gateway server to Heroku with:
$ mvn heroku:deploy
View the request params of a /particle or /blynk Slack command with:
/particle debug
/blynk debug
View the Heroku logs with:
$ heroku logs -t