From 96250b3764b91c67a5c304c61f8e20623fb861f2 Mon Sep 17 00:00:00 2001 From: Tim Connors Date: Mon, 16 Oct 2023 13:45:06 +1100 Subject: [PATCH] updated comment per PR suggestion --- plugins/power/tasmota_ | 64 +++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/plugins/power/tasmota_ b/plugins/power/tasmota_ index 1e6a7dca..c7787ab5 100755 --- a/plugins/power/tasmota_ +++ b/plugins/power/tasmota_ @@ -1,27 +1,45 @@ #!/bin/sh -# -# Copyright (C) 2019-2022 Tim Connors -# GNU Library General Public License v2 or later -# -# -# munin plugin that logs voltage, energy usage, power, power factor and current logged from tasmota power switches -# -# To install the plugin, copy or move the plugin to /usr/share/munin/plugins/ set -# the chmod to 755 and create a symbolic link: -# ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_voltage -# ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_energy -# ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_power -# ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_powerfactor -# ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_current -# -# Plugin also implements suggests, so if you have /etc/genders -# populated with "tasmota,powermon" flags for those tasmota devices -# that implement energy monitoring, and nodeattr installed, you can -# run an ansible play like this to set up your links: -# https://github.com/spacelama/ansible-initial-server-setup/tree/master/roles/monitoring/tasks -# -#%# family=auto -#%# capabilities=autoconf + +: << =cut + +=head1 NAME + +tasmota_ - logs voltage, energy usage, power, power factor and current logged from tasmota power switches + +To install the plugin, copy or move the plugin to /usr/share/munin/plugins/ set +the chmod to 755 and create a symbolic link: +ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_voltage +ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_energy +ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_power +ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_powerfactor +ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_current + +Plugin also implements suggests, so if you have /etc/genders +populated with "tasmota,powermon" flags for those tasmota devices +that implement energy monitoring, and nodeattr installed, you can +run an ansible play like this to set up your links: +https://github.com/spacelama/ansible-initial-server-setup/tree/master/roles/monitoring/tasks + +=head1 APPLICABLE SYSTEMS + +Any host that can access tasmota systems and has "jq" installed. Can +auto suggest values if nodeattr genders (debian: apt install genders) +installed and configured with tasmota,powermon flag. + +=head1 AUTHOR + +Tim Connors + +=head1 LICENSE + +GPLv2 or later + +=head1 MAGICK MARKERS + + #%# family=auto + #%# capabilities=autoconf + +=cut SWITCH=$(basename "$0" | cut -d_ -f2) FUNCTION=$(basename "$0" | cut -d_ -f3)