aun-receiver
receives tweets and IRC messages and sends them to MQTT.
It is intended to use in combination with aun-subscreen
.
$ heroku create --buildpack https://github.com/kr/heroku-buildpack-go.git
$ heroku addons:add cloudmqtt:test
See below.
$ git push heroku master
$ heroku ps:scale worker=1
If you want to receive twitter stream, you need to set these variables.
URL of destination MQTT. Note that you can not specify mqtt
here; you need use tcp
instead.
If you are using CloudMQTT, you can set MQTT_URL automatically as follows:
$ heroku config:set MQTT_URL=`heroku config:get CLOUDMQTT_URL | sed -e "s/^mqtt/tcp/"`
Credentials for twitter. Tokens should be concatenated with ':'.
TWITTER_AUTH=[Consumer key]:[Consumer secret]:[Access token]:[Access token secret]
Strings to track.
Example:
TWITTER_QUERY=aun,rubykaigi
TWITTER_QUERY
should be comma separated
If you want to receive messages from IRC, you need to set these variables.
Hostname of the IRC server.
Example:
IRC_SERVER=irc.example.com
Port number of the IRC server.
Example:
IRC_PORT=6667
Nick to use to connect the IRC server.
Example:
IRC_NICK=aun-receiver
Channels to join.
Example:
IRC_CHANNELS=#test1,#test2
IRC_CHANNELS
should be comma separated