diff --git a/plugins/power/tasmota_ b/plugins/power/tasmota_ index c0bd01fd..52abb017 100755 --- a/plugins/power/tasmota_ +++ b/plugins/power/tasmota_ @@ -16,9 +16,9 @@ ln -s /usr/share/munin/plugins/tasmota_ /etc/munin/plugins/tasmota_hostname_curr Plugin also implements suggests, so if you have nodeattr installed and /etc/genders populated with "tasmota" as well as "powermon", -"DS18B20","SCD40", "PMS5003" or "millivolts" flags for those tasmota -devices that implement energy or temperature monitoring, you can run -an ansible play like this to set up your links: +"DS18B20", "temperature", "SCD40", "PMS5003" or "millivolts" flags for +those tasmota devices that implement energy or temperature monitoring, +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 @@ -84,38 +84,8 @@ if [ "$1" = "suggest" ]; then echo "${device}_${i}" done done - nodeattr -n '(tasmota || beken) && temperature' | while read -r device ; do - for i in temperature ; do - echo "${device}_${i}" - done - done - nodeattr -n '(tasmota || beken) && DS18B20' | while read -r device ; do - for i in DS18B20 ; do - echo "${device}_${i}" - done - done - nodeattr -n '(tasmota || beken) && SCD40' | while read -r device ; do - for i in SCD40 ; do - echo "${device}_${i}" - done - done - nodeattr -n '(tasmota || beken) && PMS5003' | while read -r device ; do - for i in PMS5003 ; do - echo "${device}_${i}" - done - done - nodeattr -n '(tasmota || beken) && millivolts' | while read -r device ; do - for i in millivolts ; do - echo "${device}_${i}" - done - done - nodeattr -n '(tasmota || beken) && switch' | while read -r device ; do - for i in switch ; do - echo "${device}_${i}" - done - done - nodeattr -n '(tasmota || beken) && dimmer' | while read -r device ; do - for i in dimmer ; do + for i in temperature DS18B20 SCD40 PMS5003 millivolts switch dimmer ; do + nodeattr -n "(tasmota || beken) && $i" | while read -r device ; do echo "${device}_${i}" done done