2017 © Pedro Peláez
 

library mqtt-influx

image

stas-dovgodko/mqtt-influx

  • Tuesday, June 13, 2017
  • by stas-dovgodko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

mqtt-influx

PHP-React based mqtt to influxdb gateway., (*1)

For IoT diy stuff to upload and visualize data in grafana, (*2)

Please add local config just like config/default.yml somewhere near and run:, (*3)

php daemon.phar --config=my_config.yml, (*4)

or put config to config.local.yml, (*5)

php daemon.phar, (*6)

Can use plain daemon.php instead of phar too, (*7)

Config example:, (*8)

influxdb:
  database: test_db
  server:
    host: influxdb
    port: 8086

mqtt:
  broker:
    host: m12.cloudmqtt.com
    port: 14775
    user: zxcsec
    password: xcvdx5xcv

subscribe:
   - topic: "#"
     qos: 0
     topics:
       - {pattern: "'(.*?\/vq_0)'", measurement: "$1", tags: {}, type: percent}
       - {pattern: "'(.*?\/rms_0)'", measurement: "$1", tags: {}, type: int}
       - {pattern: "'(.*?\/trms_0)'", measurement: "$1", tags: {}, type: int}
       - {pattern: "'(.*?\/wifi-signal)'", measurement: "$1", tags: {}, type: float}

The Versions

13/06 2017