Files
rpi-mqtt-monitor/src/config.py.example
j-broo a2091f4b64 Update config.py.example
Add configurable settings for QOS and retain flag.
2023-09-29 22:22:00 +03:00

45 lines
1.3 KiB
Plaintext

from random import randrange
# MQTT server configuration
mqtt_host = "ip address or host"
mqtt_user = "username"
mqtt_password = "password"
mqtt_port = "1883"
mqtt_topic_prefix = "rpi-MQTT-monitor"
# Messages configuration
# Uncomment the line bellow to send just one CSV message containing all values (this method don't support HA discovery_messages)
# group_messages = True
# If this is set, then the script will send MQTT discovery messages meaning a config less setup in HA. Only works
# when group_messages is not used
discovery_messages = True
# Random delay in seconds before measuring the values
# - this is used for de-synchronizing message if you run this script on many hosts.
# - if you want a fixed delay you can remove the randrange function and just set the needed value.
# random_delay = randrange(10)
# This is the time between sending the individual messages
sleep_time = 0.1
cpu_load = True
cpu_temp = True
used_space = True
used_space_path = '/'
voltage = False
sys_clock_speed = False
swap = False
memory = True
uptime = True
# Enable wifi_signal for unit of measuring % or wifi_signal_dbm for unit of meaning dBm
wifi_signal = True
wifi_signal_dbm = False
# Retain flag for published topics
retain = True
# QOS setting for published topics: 0,1,2 are acceptable values
qos = 0