MQ: Simple MQTT Kick Start
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
etc cleanup Sep 12, 2017
.applist protocols Nov 5, 2018
.travis.yml 20.3.8 Oct 21, 2018
CNAME cname Nov 10, 2018
LICENSE init Apr 18, 2017
Makefile Apr 19, 2017 README: redo 7ab9efe Sep 20, 2017
index.html index Nov 10, 2018 fixed basic routing May 26, 2017
package.exs git:// Oct 21, 2018
rebar.config cowboy free voxoz/mq by @pal-alex Nov 4, 2018
sys.config protocols Nov 5, 2018
vm.args make console, mad rep Apr 18, 2017

N2O over MQTT using EMQ Broker


  • EMQ Version 2.1.1 MQTT Protocol 5
  • MAD Compatible
  • N2O Bridge as EMQ Plugin
  • N2O Review Application


$ curl -fsSL > mad \
              && chmod +x mad \
              && sudo cp mad /usr/local/bin
$ git clone
$ cd mq
$ mad dep com rep
Configuration: [{n2o,
Applications:  [kernel,stdlib,gproc,lager_syslog,pbkdf2,asn1,fs,ranch,mnesia,
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4]
              [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V8.3  (abort with ^G)
starting emqttd on node 'nonode@nohost'
Nonexistent: []
Plugins: [{mqtt_plugin,emq_auth_username,"2.1.1",
                       "Authentication with Username/Password",false},
          {mqtt_plugin,emq_dashboard,"2.1.1","EMQ Web Dashboard",false},
          {mqtt_plugin,emq_modules,"2.1.1","EMQ Modules",false},
          {mqtt_plugin,n2o,"4.5-mqtt","N2O Server",false}]
Names: [emq_dashboard,n2o]
dashboard:http listen on with 4 acceptors.
Async Start Attempt {handler,"timer",n2o,system,n2o,[],[]}
Proc Init: init
mqtt:ws listen on with 4 acceptors.
mqtt:tcp listen on with 4 acceptors.
emqttd 2.1.1 is running now

Open with admin:public credentials, Press Connect, Subscribe, Sned and observe statistics

Create Authorized User

> emq_auth_username:cli(["add","maxim","public"]).

Then enable emq_auth_username plugin in the dashboard Later you can connect specifying User Name: and Password: credentials at

Creating Single File Bundle

$ mad release emqttd
$ ./emqttd rep

Control Panel

> emqttd_ctl:run(["plugins","list"]).
Plugin(emq_auth_username, version=2.1.1, description=Authentication, active=false)
Plugin(emq_dashboard, version=2.1.1, description=EMQ Web Dashboard, active=true)
Plugin(emq_modules, version=2.1.1, description=EMQ Modules, active=true)
Plugin(emq_persistence, version=1.1.2, description=Synrc KVS for MQTT, active=true)

> emqttd_ctl:run(["clients","list"]).
Client(C_1492632081463, clean_sess=true, username=5HT,
       peername=, connected_at=1492632082)

> emqttd_ctl:run(["help"]).

MQTT Erlang Client

$ mad com
==> "/Users/maxim/depot/voxoz/emqttc/examples/gen_server"
Compiling /src/gen_server_example.erl
Writing /ebin/
bash-3.2$ ./run
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4]
              [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V8.2  (abort with ^G)
1> [info] [Client <0.58.0>]: connecting to
[info] [Client <0.58.0>] connected with
[info] [Client <0.58.0>] RECV: CONNACK_ACCEPT
Client <0.58.0> is connected
[warning] [simpleClient@] resubscribe [{<<"TopicA">>,1}]
Message from TopicA: <<"hello...1">>
Message from TopicB: <<"hello...1">>


  • Maxim Sokhatsky