Giter Site home page Giter Site logo

mqttie's Introduction

mqttie ๐Ÿ‘”

๐Ÿšง This is a pre-alpha project, tread carefully ๐Ÿšง

An interactive MQTT client for the CLI, inspired from httpie and built with rumqttc.

Users will be able to use the mqtt command as follows:

  1. Publish to this/is/a/topic on the broker at host:port:
mqtt PUB this/is/a/topic --json { "key": value } --broker host:port
  1. Subscribe to this/is/a/topic on the broker at host:port:
mqtt SUB this/is/a/topic --broker host:port

When connecting to the broker, a user must provide their protocol of choice using the host field, by default it shall be tcp://. The broker's port address may also be left empty, in which case mqttie will connect to the default MQTT port 1883. To connect with TLS support, users can provide their .pem files with the flags --ca_certificate, --device_certificate and --device_private_key (-ca, -cert and -key in short).

For simplicity, one may prefer to provide broker details in a JSON file with the following format, along with the --auth or -a flags:

{
    "device_id": "1234",
    "broker": "example.com",
    "port": 1883,
    "authentication": {
        "ca_certificate": "-----BEGIN CERTIFICATE...",
        "device_certificate": "-----BEGIN CERTIFICATE...",
        "device_private_key": "-----BEGIN RSA PRIVATE KEY..."
    }
}

NOTE: In case of non-TLS connections, just omit the "authentication" entry.

When publishing, users can also set the QoS value for publish messages by using the --qos or -q flag and providing one of 0, 1 or 2. Users can also choose whether or not the message should be retained by the broker by using the --retained or -r flag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.