Skip to content
Insert incoming MQTT values into InfluxDB. Follows mqtt-smarthome architecture.
Branch: master
Clone or download
Latest commit 72e1ac1 Feb 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml es6, request, replace-sys, ... Feb 7, 2018
LICENSE es6, request, replace-sys, ... Feb 7, 2018
README.md update readme Feb 7, 2018
config.js es6, request, replace-sys, ... Feb 7, 2018
index.js es6, request, replace-sys, ... Feb 7, 2018
package.json es6, request, replace-sys, ... Feb 7, 2018

README.md

influx4mqtt

mqtt-smarthome NPM version Dependency Status Build Status XO code style License

Insert incoming MQTT values into InfluxDB.

see https://github.com/mqtt-smarthome/mqtt-smarthome

Removes the mqtt-smarthome status from the topic (e.g. hm/status/lamp gets replaced by hm//lamp). Inserts numeric value only to InfluxDB, booleans are converted to 0.0 respectively 1.0. Strings are ignored.

Install & Usage

$ sudo npm install -g influx4mqtt

I suggest to use pm2 to manage the influx4mqtt process (start on system boot, manage log files, ...)

Command Line Parameters

Usage: influx4mqtt [options]
   
Options:
  -n, --name         instance name. used as prefix for connection-state topic
                                                             [default: "influx"]
  -v, --verbosity    possible values: "error", "warn", "info", "debug"
                                                               [default: "info"]
  -u, --url          mqtt broker url. May contain user/password
                                                   [default: "mqtt://127.0.0.1"]
  -k, --insecure     allow ssl connections with invalid certs          [boolean]
  --buf-length       maximum number of buffered messages         [default: 1000]
  --buf-interval     maximum age of buffered messages in seconds   [default: 30]
  --replace-sys      replace $SYS/ by              [default: "$SYS/<hostname>/"]
  -h, --help         Show help                                         [boolean]
  --version          Show version number                               [boolean]
  -s, --subscribe    topics to subscribe to (may be repeated)         [required]
  -i, --influx-host                                       [default: "127.0.0.1"]
  -p, --influx-port                                              [default: 8086]
  -d, --influx-db                                              [default: "mqtt"]

License

MIT © Sebastian Raff

You can’t perform that action at this time.