0.1.0-alpha.0 • Published 3 years ago

mqtt-restifier v0.1.0-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

MQTT Restifier

Access MQTT messages through HTTP calls.

                      ┌─────────────────────────────────────────────────────┐
                      │                   mqtt-restifier                    │
                      │                                                     │
                    ┌─┴──────────────────────┐       ┌──────────────────────┴─┐
┌─────────┐         │                        │       │                        │        ┌─────────┐
│         │         │                        │       │                        │        │         │
│  MQTT   │         │                        │       │                        │        │  HTTP   │
│ Client  │────────▶│      MQTT Broker       │──────▶│       WebServer        │───────▶│ Client  │
│         │         │                        │       │                        │        │         │
└─────────┘         │                        │       │                        │        └─────────┘
                    │                        │       │                        │
                    └─┬──────────────────────┘       └──────────────────────┬─┘
                      └─────────────────────────────────────────────────────┘
publish({                                                        GET:
  topic: "/my/awesome/topic",                                    http://host:port/my/awesome/topic
  payload: {                                                     Response:
    "timestamp": 1617800660341,                                  {
    "value": "OPEN"                                                "timestamp": 1617800660341,
  }                                                                "value": "OPEN"
})                                                               }

Requirements

Node.js v14 LTS (14.15.1) or later.

Install & Usage

$ npm install -g mqtt-restifier
$ mqtt-restifier -c <PATH_TO_CONF_FILE>

Contributing

Contributions are very welcome and wanted.

To submit your custom hook, please make sure your read our CONTRIBUTING guidelines.

Before submitting a new merge request, please make sure:

  1. You have updated the package.json version and reported your changes into the CHANGELOG file
  2. make sure you run npm test and npm build before submitting your merge request.

Credits

This library is provided and sponsored by:

As part of our commitment to support and contribute to the open source community.

License

Licensed under MIT.