Skip to content

glaubercezar/MQTT-Web-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQTT-Web-Client

This tool runs on any modern browser, which supports websockets. You can use it to publish and subscribe to JSON messages. Very useful for testing and developing applications which use MQTT over websockets.

Features

  • Send and receive JSON messages
  • Send and receive serialized messages in Avro
  • Store and manage messages from publish and subscribe
  • Store and manage connection environments
  • Subscriptions control and received messages

See it in action at http://glauber.info/apps/mqtt_web_client

Installation

Open the terminal in root of the project

Install bower dependencies

bower install

Install npm dependencies

npm install

Type gulp to run local Browsersync server

gulp

How to use

You must connect to MQTT broker which supports websockets. Some public brokers:

  • Mosquitto,   Host: iot.eclipse.org   Port: 443   SSL: true
  • Mosquitto,   Host: test.mosquitto.org   Port: 8080   SSL: false
  • HiveMQ,   Host: broker.mqttdashboard.com   Port: 8000   SSL: false

Examples

To publish a message avro:

Topic: your/topic/here

Json:

{"name":"Glauber", "age":27}

Schema:

{
    "name": "UserData",
    "type": "record",
    "fields": [
        {"name":"name", "type":"string"},
        {"name":"age", "type":"int"}
    ]
}

To receive the message, you must subscribe with same schema

publish_box.png

Dependencies

This project utilizes: