stas-dovgodko / mqtt-influx
dev-master
2017-06-13 19:07 UTC
Requires
- hassankhan/config: 0.10.0
- influxdb/influxdb-php: 1.14.4
- oliverlorenz/php-mqtt-client: master
- symfony/yaml: 2.5.x-dev
Requires (Dev)
- kherge/box: ~2.5
This package is auto-updated.
Last update: 2024-10-23 22:29:27 UTC
README
PHP-React based mqtt to influxdb gateway.
For IoT diy stuff to upload and visualize data in grafana
Please add local config just like config/default.yml somewhere near and run:
php daemon.phar --config=my_config.yml
or put config to config.local.yml
php daemon.phar
Can use plain daemon.php instead of phar too
Config example:
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}