{"id":20501993,"url":"https://github.com/5HT/mq-nynja","last_synced_at":"2025-05-09T06:30:50.068Z","repository":{"id":62429930,"uuid":"88650617","full_name":"5HT/mq-nynja","owner":"5HT","description":"💠 EMQ: N2O over MQTT for NYNJA 1.0","archived":false,"fork":false,"pushed_at":"2019-08-18T18:29:50.000Z","size":999,"stargazers_count":15,"open_issues_count":3,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T04:31:51.347Z","etag":null,"topics":["erlang","iot","messaging","mqtt","websockets"],"latest_commit_sha":null,"homepage":"https://mq.n2o.space","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5HT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-18T17:09:31.000Z","updated_at":"2022-04-11T07:42:22.000Z","dependencies_parsed_at":"2022-11-01T20:07:09.043Z","dependency_job_id":null,"html_url":"https://github.com/5HT/mq-nynja","commit_stats":null,"previous_names":["voxoz/mq"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5HT%2Fmq-nynja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5HT%2Fmq-nynja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5HT%2Fmq-nynja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5HT%2Fmq-nynja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5HT","download_url":"https://codeload.github.com/5HT/mq-nynja/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253205882,"owners_count":21871158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erlang","iot","messaging","mqtt","websockets"],"created_at":"2024-11-15T19:18:50.786Z","updated_at":"2025-05-09T06:30:49.637Z","avatar_url":"https://github.com/5HT.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"N2O over MQTT using EMQ Broker\n==============================\n\nFeatures\n--------\n\n* EMQ Version 2.1.1 MQTT Protocol 5\n* MAD Compatible\n* N2O Bridge as EMQ Plugin\n* N2O Review Application\n\nSetup\n-----\n\n```console\n$ curl -fsSL https://raw.github.com/synrc/mad/master/mad \u003e mad \\\n              \u0026\u0026 chmod +x mad \\\n              \u0026\u0026 sudo cp mad /usr/local/bin\n$ git clone https://github.com/voxoz/mq\n$ cd mq\n$ mad dep com rep\nConfiguration: [{n2o,\n                    [{port,8000},\n                     {app,review},\n                     {pickler,n2o_secret},\n                     {formatter,bert},\n                     {log_modules,config},\n                     {log_level,config}]},\n                {emq_dashboard,\n                    [{listeners_dash,\n                         [{http,18083,[{acceptors,4},{max_clients,512}]}]}]},\n                {emq_modules,\n                    [{modules,\n                         [{emq_mod_presence,[{qos,1}]},\n                          {emq_mod_subscription,[{\u003c\u003c\"%u/%c/#\"\u003e\u003e,2}]},\n                          {emq_mod_rewrite,\n                              [{rewrite,\"x/#\",\"^x/y/(.+)$\",\"z/y/$1\"},\n                               {rewrite,\"y/+/z/#\",\"^y/(.+)/z/(.+)$\",\n                                   \"y/z/$2\"}]}]}]},\n                {emqttd,\n                    [{listeners,\n                         [{http,8083,[{acceptors,4},{max_clients,512}]},\n                          {tcp,1883,[{acceptors,4},{max_clients,512}]}]},\n                     {sysmon,\n                         [{long_gc,false},\n                          {long_schedule,240},\n                          {large_heap,8000000},\n                          {busy_port,false},\n                          {busy_dist_port,true}]},\n                     {session,\n                         [{upgrade_qos,off},\n                          {max_inflight,32},\n                          {retry_interval,20},\n                          {max_awaiting_rel,100},\n                          {await_rel_timeout,20},\n                          {enable_stats,off}]},\n                     {queue,[]},\n                     {allow_anonymous,true},\n                     {protocol,\n                         [{max_clientid_len,1024},{max_packet_size,64000}]},\n                     {acl_file,\"etc/acl.conf\"},\n                     {plugins_etc_dir,\"etc/plugins/\"},\n                     {plugins_loaded_file,\"etc/loaded_plugins\"},\n                     {pubsub,\n                         [{pool_size,8},{by_clientid,true},{async,true}]}]},\n                {kvs,\n                    [{dba,store_mnesia},\n                     {schema,[kvs_user,kvs_acl,kvs_feed,kvs_subscription]}]}]\nApplications:  [kernel,stdlib,gproc,lager_syslog,pbkdf2,asn1,fs,ranch,mnesia,\n                compiler,inets,crypto,syntax_tools,xmerl,gen_logger,esockd,\n                cowlib,goldrush,public_key,lager,ssl,cowboy,mochiweb,emqttd,\n                erlydtl,kvs,mad,emqttc,nitro,rest,sh,syslog,review]\nErlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4]\n              [async-threads:10] [hipe] [kernel-poll:false] [dtrace]\n\nEshell V8.3  (abort with ^G)\nstarting emqttd on node 'nonode@nohost'\nNonexistent: []\nPlugins: [{mqtt_plugin,emq_auth_username,\"2.1.1\",\n                       \"Authentication with Username/Password\",false},\n          {mqtt_plugin,emq_dashboard,\"2.1.1\",\"EMQ Web Dashboard\",false},\n          {mqtt_plugin,emq_modules,\"2.1.1\",\"EMQ Modules\",false},\n          {mqtt_plugin,n2o,\"4.5-mqtt\",\"N2O Server\",false}]\nNames: [emq_dashboard,n2o]\ndashboard:http listen on 0.0.0.0:18083 with 4 acceptors.\nAsync Start Attempt {handler,\"timer\",n2o,system,n2o,[],[]}\nProc Init: init\nmqtt:ws listen on 0.0.0.0:8083 with 4 acceptors.\nmqtt:tcp listen on 0.0.0.0:1883 with 4 acceptors.\nemqttd 2.1.1 is running now\n\u003e\n```\n\nOpen http://127.0.0.1:18083/#/websocket with `admin:public` credentials, Press Connect, Subscribe, Sned and observe statistics http://127.0.0.1:18083/#/overview.\n\nCreate Authorized User\n----------------------\n\n```\n\u003e emq_auth_username:cli([\"add\",\"maxim\",\"public\"]).\n```\n\nThen enable `emq_auth_username` plugin in the dashboard http://127.0.0.1:18083/#/plugins\nLater you can connect specifying `User Name:` and `Password:` credentials\nat http://127.0.0.1:18083/#/websocket\n\nCreating Single File Bundle\n---------------------------\n\n```\n$ mad release emqttd\n$ ./emqttd rep\n```\n\nControl Panel\n-------------\n\n```\n\u003e emqttd_ctl:run([\"plugins\",\"list\"]).\nPlugin(emq_auth_username, version=2.1.1, description=Authentication, active=false)\nPlugin(emq_dashboard, version=2.1.1, description=EMQ Web Dashboard, active=true)\nPlugin(emq_modules, version=2.1.1, description=EMQ Modules, active=true)\nPlugin(emq_persistence, version=1.1.2, description=Synrc KVS for MQTT, active=true)\nok\n\n\u003e emqttd_ctl:run([\"clients\",\"list\"]).\nClient(C_1492632081463, clean_sess=true, username=5HT,\n       peername=127.0.0.1:58225, connected_at=1492632082)\nok\n\n\u003e emqttd_ctl:run([\"help\"]).\n```\n\nMQTT Erlang Client\n------------------\n\n```\n$ mad com\n==\u003e \"/Users/maxim/depot/voxoz/emqttc/examples/gen_server\"\nCompiling /src/gen_server_example.erl\nWriting /ebin/gen_server_example.app\nOK\nbash-3.2$ ./run\nErlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4]\n              [async-threads:10] [hipe] [kernel-poll:false] [dtrace]\n\nEshell V8.2  (abort with ^G)\n1\u003e [info] [Client \u003c0.58.0\u003e]: connecting to 127.0.0.1:1883\n[info] [Client \u003c0.58.0\u003e] connected with 127.0.0.1:1883\n[info] [Client \u003c0.58.0\u003e] RECV: CONNACK_ACCEPT\nClient \u003c0.58.0\u003e is connected\n[warning] [simpleClient@127.0.0.1:64618] resubscribe [{\u003c\u003c\"TopicA\"\u003e\u003e,1}]\nMessage from TopicA: \u003c\u003c\"hello...1\"\u003e\u003e\nMessage from TopicB: \u003c\u003c\"hello...1\"\u003e\u003e\n```\n\nCredits\n-------\n\n* Maxim Sokhatsky\n\nOM A HUM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5HT%2Fmq-nynja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5HT%2Fmq-nynja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5HT%2Fmq-nynja/lists"}