1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-21 01:27:01 +02:00

update mosquitto

This commit is contained in:
kev 2024-01-24 15:57:59 +08:00
parent 3aa42b62f5
commit 222ceac712
2 changed files with 26 additions and 1 deletions

View File

@ -29,7 +29,7 @@ $ docker-compose exec mosquitto sh
>>> cat pwfile
username:$6$IuF7JUzS1k/QoF3y$YpiClom7/==
>>> exit
$ docker-compose restart
$ docker-compose kill -s SIGHUP
$ tails -f data/log/mosquitto.log
2022-12-08T06:59:00: mosquitto version 1.4.8 (build date 2016-05-16 14:17:19+0000) starting
2022-12-08T06:59:01: Config loaded from /etc/mosquitto/mosquitto.conf.

View File

@ -0,0 +1,25 @@
#
# See: https://www.influxdata.com/integration/mqtt-telegraf-consumer/
#
[[inputs.mqtt_consumer]]
servers = ["ssl://mqtt.easypi.duckdns.org:8883"]
topics = [
"zigbee2mqtt/+",
]
data_format = "json"
username = "telegraf"
password = "telegraf"
[[processors.enum]]
order = 2
[[processors.enum.mapping]]
field = "contact"
[processors.enum.mapping.value_mappings]
false = 0
true = 1
[[processors.enum.mapping]]
field = "occupancy"
[processors.enum.mapping.value_mappings]
false = 0
true = 1