* proof of principle, a DS18B20 is read and its value is transferred via MQTT, also discovery message works * added names for ext sensors * bugfix for names: there was a problem with the topics & added SHT21 support * catch exceptions if a problem during readout occurs, shrink comments in config-file * include ext_sensors in README file * work in progress * bugfix, also for ID of ds18b20 sensor * Revert "bugfix, also for ID of ds18b20 sensor" This reverts commit 1353b840b0b6142670ec59438db4b33fab764b8e. file was intended for another branch * Revert "work in progress" This reverts commit b3e884f79f5356b79f64931cb4d45a150bfce2c7. these changes were intended for another branch * bugfix for ID of ds18b20 sensor
88 lines
2.5 KiB
Plaintext
88 lines
2.5 KiB
Plaintext
from random import randrange
|
|
|
|
# Script version
|
|
version = "0.6.2"
|
|
# MQTT server configuration
|
|
mqtt_host = "ip address or host"
|
|
mqtt_user = "username"
|
|
mqtt_password = "password"
|
|
mqtt_port = "1883"
|
|
mqtt_discovery_prefix = "homeassistant"
|
|
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
|
|
|
|
# Enable remote restart button in Home Assistant
|
|
restart_button = True
|
|
|
|
# Enable remote shutdown button in Home Assistant
|
|
shutdown_button = True
|
|
|
|
# Enable control of attached display(s) via Home Assistant
|
|
display_control = False
|
|
|
|
# user for which display_control is enabled
|
|
os_user = 'os_user_to_be_replaced'
|
|
|
|
# Binary sensor that displays when there are updates
|
|
git_update = True
|
|
|
|
# Enable remote update of the script via Home Assistant
|
|
update = True
|
|
|
|
# Retain flag for published topics
|
|
retain = True
|
|
|
|
# QOS setting for published topics: 0,1,2 are acceptable values
|
|
qos = 0
|
|
|
|
# Random delay in seconds before taking probes
|
|
# - 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)
|
|
|
|
# Interval in seconds between probes when running the script as a service (--service option)
|
|
service_sleep_time = 120
|
|
|
|
update_check_interval = 3600 # 1 hour
|
|
cpu_load = True
|
|
cpu_temp = True
|
|
used_space = True
|
|
used_space_path = '/'
|
|
voltage = False
|
|
sys_clock_speed = False
|
|
swap = False
|
|
memory = True
|
|
uptime = True
|
|
uptime_seconds = False
|
|
|
|
# Check storage devices temperatures - experimental feature, disabled by default
|
|
drive_temps = False
|
|
|
|
# Enable wifi_signal for unit of measuring % or wifi_signal_dbm for unit of meaning dBm
|
|
wifi_signal = False
|
|
wifi_signal_dbm = False
|
|
|
|
# This works only on raspbery pi version 5 with stock fan
|
|
rpi5_fan_speed = False
|
|
|
|
# this works only on raspbery pi
|
|
rpi_power_status = False
|
|
|
|
# Check for apt updates - experimental feature, disabled by default, updateed with update_check_interval
|
|
apt_updates = False
|
|
|
|
# Change the thermal zone if you have issues with cpu temps
|
|
cpu_thermal_zone = 'cpu'
|
|
|
|
# read external sensors for temperature, humidity, pressure etc.
|
|
ext_sensors = False
|
|
#ext_sensors = [["Housing", "ds18b20", "0014531448ff", -300], ["ext2", "sht21", 0, [-300, 0]]]
|