Skip to content

This NodeJS application publish messages which stored by mqtt-mongo-recorder to MQTT

License

Notifications You must be signed in to change notification settings

inhedron/mqtt-mongo-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mqtt-mongo-player

This NodeJS application publish messages which stored by mqtt-mongo-recorder to MQTT

Example

Clone the repository

$ git clone https://github.com/inhedron/mqtt-mongo-player.git
$ cd mqtt-mongo-player/mqtt-mongo-player
$ npm install

You can set options by environment variables

$ MQTT_HOSTNAME="192.168.0.1" node app.js

Options

Option Type Default Description
MQTT_NAMESPACE String # Matching topics will be published
MQTT_HOSTNAME String localhost IP Or Hostname of mqtt broker
MQTT_PORT Number 1883 Mqtt Broker Port Number
MONGODB_HOSTNAME String localhost IP Or Hostname of MongoDB
MONGODB_PORT String 27017 MongoDB Port Number
MONGODB_DATABASE String mqtt The database name of stored records
MONGODB_COLLECTION String message The collection name of stored records

Arguments

You can set some options by command line arguments

$ node app.js --speed=2
Option Type Default Description
start Date-ISO8601 or Unix Time (milisecond) null The player will be published message if the record time is greater than or equal to this option
end Date-ISO8601 or Unix Time (milisecond) null The player will be published message if the record time is less than or equal to this option
speed Number 1 Indicates the current playback speed of stored records. 1.0 is normal speed. 0.5 is half speed (slower). 2.0 is double speed (faster)

About

This NodeJS application publish messages which stored by mqtt-mongo-recorder to MQTT

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published