1.0.0 • Published 8 years ago

mqtt-db-sync v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

mqtt-db-sync

Synchronise MQTT messages with storage systems like Firebase, MySQL or MongoDB

Installation

Install the tool with npm:

npm install -g mqtt-db-sync

Usage Examples

Send all topics to Firebase:

mqtt-db-sync \
  --mqtt.url mqtt://mqtt.server.com \
  --mqtt.query "#" \
  --firebase.database https://my-firebase-database \
  --firebase.serviceAccount /path/to/service-account.json

Send a filtered list of topics to Firebase

mqtt-db-sync \
  --mqtt.url mqtt://mqtt.server.com \
  --mqtt.query "/device/+/temperature" \
  --firebase.database https://my-firebase-database \
  --firebase.serviceAccount /path/to/service-account.json

Prepend text to the topic before sending to Firebase

mqtt-db-sync \
  --mqtt.url mqtt://mqtt.server.com \
  --mqtt.query "/device/#" \
  --firebase.database https://my-firebase-database \
  --firebase.serviceAccount /path/to/service-account.json \
  --firebase.prepend "/sensors"

Parameters

General

-v, --verbose

Log everything to stdout.