mqtt-db-sync
v1.0.0
Published
Synchronise MQTT messages with storage systems like Firebase, MySQL or MongoDB
Downloads
7
Maintainers
Readme
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.